Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp540964ybj; Thu, 7 May 2020 01:40:47 -0700 (PDT) X-Google-Smtp-Source: APiQypLxgcBvgZAsypeSa1UsLeg5IO7cR+spWCPB7Gd3nUqHgV7Xf7X0dUi7Av/RL54SFIreMFcx X-Received: by 2002:aa7:df0a:: with SMTP id c10mr10688686edy.306.1588840847612; Thu, 07 May 2020 01:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588840847; cv=none; d=google.com; s=arc-20160816; b=jfFMQJTYfxYTJgfSgsSpXn4w5GwDqU5QzyaZ6NBO5HpSjt31Moe1RYiuR8/ulYytQJ +r+19xrtSCGO5Dxw9mvJeBbuu4I+jyhYOS8OhSFiVVfjEiNmK9lkH6vUqzOqAk80u0Cs C83s5gc4hDIMJeL6Xznhp2OzCAeS0HmSGiKff7G/cBoa3H78hJA+W+rua5xVhtdup24M xBkgh2aFi9s/Si04D3Go8iQLzQ41kt+g/K2X72WbJ7SBvXGjJFDPdYNUIi+9sTI1rIwW XE4B2gNOWbDbZl/K6q7sGot2O0pxFKJVpWIiPRpuwixeDx5hD4mkOR2bcJoeDSwZ4AQZ 1lvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature:dkim-filter; bh=Sizgvkow12UlMRPJ88fhJx797WUVfBKXkAG1rgsf2c0=; b=znA/3eJVs26Dg6zYxusHQh/ydbzyQNJ6cIf3uQFMWMjrNvU6i3F6rRE89jgXb3Muiy eGhcPPA/gb6bNAlOh7zMEv18nsz/O8TtcWKf1AWcHL4G2T1RWwFY1izKFqd81Cq2kDAy DBnHZ8/0ZJ+Elz9zQ//aZ1c8Gk+Pl7kqB3Pwv4NiZ/kcaO3vbtv4HhQEDJv5KTL5ef67 BPPfsmJAj4cuSidPZcCVaGtjw3CJGoZAKt16BB6f0bAkGkB98Oma2v+yo/zCxlj5iGBF GwxuwjBrq8PcmtW1x+N848jNIqcqQ7kNe+zSoR/7nZZALiEpOw/jBPwjXk2OJa6FDDk1 8E4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2020042201 header.b=pWbvTKbd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c90si2666618edd.306.2020.05.07.01.40.24; Thu, 07 May 2020 01:40:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@zytor.com header.s=2020042201 header.b=pWbvTKbd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725910AbgEGIjA (ORCPT + 99 others); Thu, 7 May 2020 04:39:00 -0400 Received: from terminus.zytor.com ([198.137.202.136]:33073 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgEGIjA (ORCPT ); Thu, 7 May 2020 04:39:00 -0400 Received: from [IPv6:2601:646:8600:3281:6547:66ee:1a90:d675] ([IPv6:2601:646:8600:3281:6547:66ee:1a90:d675]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id 0478cW5L3345498 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 7 May 2020 01:38:34 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 0478cW5L3345498 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2020042201; t=1588840714; bh=Sizgvkow12UlMRPJ88fhJx797WUVfBKXkAG1rgsf2c0=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=pWbvTKbdT3Z9ZpBWKXPBwtJZAXHQfyZjxv1fcHlmU8Y2WI0GKZS+bXW4jKfNVOxuB Q1aUV/RIeBosekLXwBmHgCOLaXwaEdyrEzND79HYWl7bbg/rat7qzgs/z1XbXJIh7K g5fexfthTHnVCZVWCEsfogbhr8EJmZSoD+dWOFmVK5+SQXg0rAMwIB6Sn0qpAjOryn UEmjvXWYSGbNW/8dkn9FMpSsobxxiWlOXcLQrRhPSW1fUj4IZxpXndZ7adrC+MFIGJ Q465ut3P1RuXTNwH70HdrtMO4CKS6QfXVYt9OO4xmM+otX7z5fCnDmByw9gRabNsxA HOQo13cFyMatg== Date: Thu, 07 May 2020 01:38:26 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20200505174423.199985-1-ndesaulniers@google.com> <60b16c05ca9e4954a7e4fcdd3075e23d@AcuMS.aculab.com> <7C32CF96-0519-4C32-B66B-23AD9C1F1F52@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] x86: bitops: fix build regression To: David Laight , "'Brian Gerst'" , Nick Desaulniers CC: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Sedat Dilek , stable , Jesse Brandeburg , "kernelci . org bot" , Andy Shevchenko , Ilie Halip , the arch/x86 maintainers , Marco Elver , "Paul E. McKenney" , "Peter Zijlstra (Intel)" , Daniel Axtens , Masahiro Yamada , Luc Van Oostenryck , Linux Kernel Mailing List , "clang-built-linux@googlegroups.com" From: hpa@zytor.com Message-ID: <3559DCF4-0E59-48DF-8500-D4BA2852975D@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 7, 2020 1:35:01 AM PDT, David Laight w= rote: >From: hpa@zytor=2Ecom >> Sent: 07 May 2020 08:59 >> On May 7, 2020 12:44:44 AM PDT, David Laight > wrote: >> >From: Brian Gerst >> >> Sent: 07 May 2020 07:18 >> >=2E=2E=2E >> >> > --- a/arch/x86/include/asm/bitops=2Eh >> >> > +++ b/arch/x86/include/asm/bitops=2Eh >> >> > @@ -54,7 +54,7 @@ arch_set_bit(long nr, volatile unsigned long >> >*addr) >> >> > if (__builtin_constant_p(nr)) { >> >> > asm volatile(LOCK_PREFIX "orb %1,%0" >> >> > : CONST_MASK_ADDR(nr, addr) >> >> > - : "iq" (CONST_MASK(nr) & 0xff) >> >> > + : "iq" ((u8)(CONST_MASK(nr) & 0xff)) >> >> >> >> I think a better fix would be to make CONST_MASK() return a u8 >value >> >> rather than have to cast on every use=2E >> > >> >Or assign to a local variable - then it doesn't matter how >> >the value is actually calculated=2E So: >> > u8 mask =3D CONST_MASK(nr); >> > asm volatile(LOCK_PREFIX "orb %1,%0" >> > : CONST_MASK_ADDR(nr, addr) >> > : "iq" mask >> > >> > David >> > >> >- >> >Registered Address Lakeside, Bramley Road, Mount Farm, Milton >Keynes, >> >MK1 1PT, UK >> >Registration No: 1397386 (Wales) >>=20 >> "const u8" please=2E=2E=2E > >Why, just a waste of disk space=2E > > David > >- >Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, >MK1 1PT, UK >Registration No: 1397386 (Wales) Descriptive=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E