Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp518835ybj; Thu, 7 May 2020 01:03:42 -0700 (PDT) X-Google-Smtp-Source: APiQypJz24MaFKlIwMwl+CHeK96h7dLkvklEJuk6p+M1ERz988r0ZmLcsQ/RgizjAABTNQ7pd/CG X-Received: by 2002:a17:906:1996:: with SMTP id g22mr9564435ejd.53.1588838622713; Thu, 07 May 2020 01:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588838622; cv=none; d=google.com; s=arc-20160816; b=JM8z+cKqvezTpzbLEJ37W4/zrLPtnQum3kJ3VXDPt0qPBUlwLpzIWz+LnWzHKtBnK8 PAhYIipGBfEcmN9QUtyKDiqhNmmEypi+JzwJ3aIe91fuR+mfqFZz5oxIzbgGcGXDZpXz SGO7luLVAaFlCu+ykUvgD5Q2FBke9E71GSZlXrD8dgli2VvtLL0iXqTEj/VxKo+ZiNDf b2u6Cpz4Dcg86LNZ8+9hnoEBOo3eat+J/I2QtUhBhyh0ByY7Dhp80AUC2M56nmb4zXct QABwa0STyn1o3mOvgajDkGbfpLTwdykR726J6eQvix9LTPWG0fjTFqdDeubWhs6f5HeB NXaA== 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=QcutLOCTnJxVMrJr2hvrS8R5JE5w+xhrOu5seWrSXig=; b=1LNoAVvcHWplKXJOMU+tSoecPrsVciHP/50O+jIbK+nGdnl1A5FcR3YecASg0p5+gD xYA++M3dXITtw1ccZOziDM64so8jMCwH0WRlo0phLXq8dRuxp+E+4n51UlleA/LKHv2z ZXm92sWIpBXMJ8MHZfHqLnQQdrqWYjljU8cpp2jM1FmqtxKEtTwTvsV9j5gOixOQlT+5 YAuavuWNjxPVmav7GHG3bqIbyXhiwIx0YD64wq0VxHzEfVp9bhKBmOVPhPySsOvbDMCF ppD/jsO8CPd/92dylLOeZpM9rRHEqQowVWDcOHHvnCxaFyKZgdnSP6eJyTWpP2xvRCyS g2XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2020042201 header.b=edDncOw6; 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 4si3014833edh.424.2020.05.07.01.03.18; Thu, 07 May 2020 01:03:42 -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=edDncOw6; 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 S1726689AbgEGH7m (ORCPT + 99 others); Thu, 7 May 2020 03:59:42 -0400 Received: from terminus.zytor.com ([198.137.202.136]:41511 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbgEGH7l (ORCPT ); Thu, 7 May 2020 03:59:41 -0400 Received: from [IPv6:2601:646:8600:3281:d918:a6fd:d52c:4754] ([IPv6:2601:646:8600:3281:d918:a6fd:d52c:4754]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id 0477xAJT3336894 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 7 May 2020 00:59:10 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 0477xAJT3336894 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2020042201; t=1588838351; bh=QcutLOCTnJxVMrJr2hvrS8R5JE5w+xhrOu5seWrSXig=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=edDncOw6ExGuJsk6POL7egz6dy6fPWjFEWh3td3E9oMv5SXP0TJbKzQatvtT4mA/j FIW8/LpQww4n+9WGTUWqSD2T0iWg4UjNAE4DsNqkc/mf0UV8BDhUqPBwsKqMo8R2AM /PTK+lZWRYBujbzoOQIPodZXEvkh9sty32cJT/KBGuBA8xPCyX2CdzirMHzK0f+rfy 0hwDI7S6Mq6sAVqr6gwuogD8Y6ZN4V2SvhbMUtya6HiJ06MbItx1CqUemLfdJvNpYB urzr+rNBVisCE/9E879nByfmNSPBNjvZX7mduX3QwON++dhPNTNACREVYz/i1RqVqa 8pnWGB4jymFKw== Date: Thu, 07 May 2020 00:59:03 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <60b16c05ca9e4954a7e4fcdd3075e23d@AcuMS.aculab.com> References: <20200505174423.199985-1-ndesaulniers@google.com> <60b16c05ca9e4954a7e4fcdd3075e23d@AcuMS.aculab.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: <7C32CF96-0519-4C32-B66B-23AD9C1F1F52@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 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)) >>=20 >> 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) "const u8" please=2E=2E=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E