From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6E94C47257 for ; Thu, 7 May 2020 08:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 860982078C for ; Thu, 7 May 2020 08:39:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="pWbvTKbd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725985AbgEGIjA (ORCPT ); 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