Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1006707ybj; Thu, 7 May 2020 12:32:09 -0700 (PDT) X-Google-Smtp-Source: APiQypKNElYrXdGViIgQeee8Z8l7r8WcSuWCk2yTDQofpV/57g69AdcoAc2Oh8SQyc8ErYvg+KWH X-Received: by 2002:a17:906:4356:: with SMTP id z22mr13284534ejm.334.1588879929558; Thu, 07 May 2020 12:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588879929; cv=none; d=google.com; s=arc-20160816; b=dWPkelslYEx4XJoBdVWzrL+F0yqvqZsCCDPkGwjJRn3afTtmEwkUQ9kkTwvjYNUhk9 j9p1iu6usD6kQ04IeAdkw1UEA2i2bdUkbpnNKYcN5dDZ2mJ6kZi0/JTRj+q9EIclQkx/ 5zpUk/j69vR6L+S62C5RvL/KEjNfJLxlnalHtneeYTSM/NIKtq5OiC4dmMGCdc2pBN3e GAHFkfo3Pj/JjWTl/TJFI6TrGay5k90qrE/RBbLyCSpGA2TW5RBQVS8H0i6pUGW0mDil xOOf2BhZTfqqcoY6ywaRFBpQGm9HGijQZI0Vgx0HY+JG755nRD2h4/n3fLIUsWeBuink wJEw== 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=oMuTSM+aenjMY6wnxSPIpZxcMGTGHNcIWJGGr/PBUHg=; b=eDTPuGLwYVlUjPxKWEo15yycPEX4RkUnnHPAUQdJl1PmyMcwtJi1NmKz12hsDnsZa7 QhGBYY9uXRCApILMZMaOxk1yRXjAjBYpr5S4xGLY0l/zZ5cOieBiXIuhaw3YKUr6vsLK NGoYiyXpQrLiqn5JqL/PKrKVHOQ7Q05zcfSWVnnhfdS7MaGkJt6POWIsK0A4Ltp9aHTj l36tUT86PH2XIwYoPB15zNY+BF4SGktxqIq9TnP55TNhgkAFw8xzYBeyxKH4x2VjtMKg plceIHtZrsiXH2/KYfj90INHsnePRlEbZfr4YSsLV6nUZw0wLw0ffzg4bXZ7yhKFi2Uu XIBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2020042201 header.b=a5Huglby; 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 h13si3864235edw.475.2020.05.07.12.31.46; Thu, 07 May 2020 12:32:09 -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=a5Huglby; 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 S1728227AbgEGT3x (ORCPT + 99 others); Thu, 7 May 2020 15:29:53 -0400 Received: from terminus.zytor.com ([198.137.202.136]:54263 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbgEGT3x (ORCPT ); Thu, 7 May 2020 15:29:53 -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 047JTFWT3526223 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 7 May 2020 12:29:17 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 047JTFWT3526223 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2020042201; t=1588879758; bh=oMuTSM+aenjMY6wnxSPIpZxcMGTGHNcIWJGGr/PBUHg=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=a5Huglbyy7CI17USh/5x8pPgRMvYdF8VgvylNOPkeaEqEjZxeRc3FDKQlGoYMXn9C 9s1AeunyVpKe3Q+QoqzVMuqvMODjPqJrrCuGiSMJy1rQBbI5pCfQztxQw+8+h7JZEO v3LzN2SIK+ZXyPvdbGA5LjH7d1+YDKfJXO8WklUF93YYB0EKJ6PGwlZIsgpVMA2HjF 7ZC8WrzfLEeNDsQs5wrLHBaNHGBVcf23bjB6Tk/CArhdYYMckb9aLV2mzqoOzeFPdE 1xS+KjxQf0K+BrduhEFb6MWNu1SaGfAChzL5+un/gv8NAIsJoQam+n8jMy8biEcVOS EO+QCxH4V/RZQ== Date: Thu, 07 May 2020 12:29:08 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20200507113422.GA3762@hirez.programming.kicks-ass.net> References: <20200505174423.199985-1-ndesaulniers@google.com> <8A776DBC-03AF-485B-9AA6-5920E3C4ACB2@zytor.com> <20200507113422.GA3762@hirez.programming.kicks-ass.net> 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: Peter Zijlstra CC: Nick Desaulniers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Sedat Dilek , stable@vger.kernel.org, Jesse Brandeburg , "kernelci . org bot" , Andy Shevchenko , Ilie Halip , x86@kernel.org, Marco Elver , "Paul E. McKenney" , Daniel Axtens , Masahiro Yamada , Luc Van Oostenryck , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 7, 2020 4:34:22 AM PDT, Peter Zijlstra wrot= e: >On Tue, May 05, 2020 at 11:07:24AM -0700, hpa@zytor=2Ecom wrote: >> On May 5, 2020 10:44:22 AM PDT, Nick Desaulniers > wrote: > >> >@@ -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)) >> > : "memory"); >> > } else { >> > asm volatile(LOCK_PREFIX __ASM_SIZE(bts) " %1,%0" >> >@@ -74,7 +74,7 @@ arch_clear_bit(long nr, volatile unsigned long >*addr) >> > if (__builtin_constant_p(nr)) { >> > asm volatile(LOCK_PREFIX "andb %1,%0" >> > : CONST_MASK_ADDR(nr, addr) >> >- : "iq" (CONST_MASK(nr) ^ 0xff)); >> >+ : "iq" ((u8)(CONST_MASK(nr) ^ 0xff))); >> > } else { >> > asm volatile(LOCK_PREFIX __ASM_SIZE(btr) " %1,%0" >> > : : RLONG_ADDR(addr), "Ir" (nr) : "memory"); >>=20 >> Drop & 0xff and change ^ 0xff to ~=2E > >But then we're back to sparse being unhappy, no? The thing with ~ is >that it will set high bits which will be truncated, which makes sparse >sad=2E In that case, sparse is just broken=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E