Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2974617rdh; Mon, 27 Nov 2023 03:56:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2Idvp3ih+HTGHKTBSHwRRITDWqndWteSRZ4ERWzI3gyblE6KMRaSjqD9lY8ZmjAQi1pzc X-Received: by 2002:a17:902:fe18:b0:1cf:ab18:3f39 with SMTP id g24-20020a170902fe1800b001cfab183f39mr12031496plj.18.1701086204786; Mon, 27 Nov 2023 03:56:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701086204; cv=none; d=google.com; s=arc-20160816; b=oHwojIE9PglucUR8nX8roxPCjH+7ZL5ogKBGmaB6wrWkaIbCeY0pO3i6yHrN5ZGMWN e95nJW9ffFyV09LEFkAaz9FLnZF5JUj3Hwmq3gaTZGVdrUebgSCBvBXat9dOas/QOTmm 1N0f6jGI3k5+mENjQE9Np3IEN4tfR+IpHvcEosqkD+2JQxFyQpALAkOdjqkohp7wLGkR fj7AMFfkoiVOd9xCWWk6WgQFkvAIxxasGrHRuNeuOD0HuCdFL5orRPWlCdC66MP9iGHn 9oQhsbM+WP+2G4aNlkgZalrAk40BXHfYhwouj7hELCSuCfNIVBL6rMt6UnS+JJUaboVH KmaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2dM+v4kzMRdNmZ6qt1MEUGvyRwxLAnSzPoXMZJ93cc0=; fh=0oHlLZb2BLDl5LWo56F3P98DQL0tSxD7/nvFjAmhhWY=; b=YDzjpmXTL0yKDsjj5dw08b+HYcA93jbX/RSHBucJQ/q/z9CErltFnk/jTwE6H75FCQ K96BQGRoMDGPlRdk5Wui+xNC3cApUZgUogEyujNNby6gmZjK5JQhND50H9DbGbslO9Fc RhE5YwQijBKCV27XSnHquslI7K7CozlBRtIsBfruUCBvHGlHn3zUiSgWTt/s0udQbDLm yzVRf6SCcmlio5hbLyzSt6UnZEowbFvEgUiyEFmnIZW0PiR21syCDq9Am06ocPfdiFOV aUVyIjCcP8aXFR1SSg5uhJkx3hLFEvSkb6pDkeGhiyX7IGvDzXR4VQ7x4/+k0AjTlW0D HVyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ju12-20020a170903428c00b001b674055d72si9013857plb.621.2023.11.27.03.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 03:56:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A5F0B802F724; Mon, 27 Nov 2023 03:56:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232947AbjK0L40 (ORCPT + 99 others); Mon, 27 Nov 2023 06:56:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232782AbjK0L4Z (ORCPT ); Mon, 27 Nov 2023 06:56:25 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59BAD8F for ; Mon, 27 Nov 2023 03:56:30 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B1E1A2F4; Mon, 27 Nov 2023 03:57:17 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.43.171]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C77AF3F73F; Mon, 27 Nov 2023 03:56:28 -0800 (PST) Date: Mon, 27 Nov 2023 11:56:26 +0000 From: Mark Rutland To: guoren@kernel.org Cc: peterz@infradead.org, keescook@chromium.org, paulmck@kernel.org, ubizjak@gmail.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, Guo Ren Subject: Re: [PATCH V3] locking/atomic: scripts: Exclude arch_atomic(64)_read(set) mappings Message-ID: References: <20231126013921.103133-1-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231126013921.103133-1-guoren@kernel.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 03:56:41 -0800 (PST) On Sat, Nov 25, 2023 at 08:39:21PM -0500, guoren@kernel.org wrote: > From: Guo Ren > > The definitions of atomic(64)_read(set) are relax version, and using > them for acquire and release is incorrect, so exclude these mappings. This was fixed by commit: 6d2779ecaeb56f92 ("locking/atomic: scripts: fix fallback ifdeffery") That commit was in v6.6-rc3, and has been backported to stable kernels. I think you're using an old kernel as a base. Thanks, Mark. > > Signed-off-by: Guo Ren > Signed-off-by: Guo Ren > --- > Changelog: > v3: > - Minimize modification on atomic(64)_read(set) > > v2: > - Use gen-atomic-fallback.sh instead of header modification > --- > include/linux/atomic/atomic-arch-fallback.h | 10 +--------- > scripts/atomic/gen-atomic-fallback.sh | 3 ++- > 2 files changed, 3 insertions(+), 10 deletions(-) > > diff --git a/include/linux/atomic/atomic-arch-fallback.h b/include/linux/atomic/atomic-arch-fallback.h > index 18f5744dfb5d..b83ef19da13d 100644 > --- a/include/linux/atomic/atomic-arch-fallback.h > +++ b/include/linux/atomic/atomic-arch-fallback.h > @@ -459,8 +459,6 @@ raw_atomic_read_acquire(const atomic_t *v) > { > #if defined(arch_atomic_read_acquire) > return arch_atomic_read_acquire(v); > -#elif defined(arch_atomic_read) > - return arch_atomic_read(v); > #else > int ret; > > @@ -508,8 +506,6 @@ raw_atomic_set_release(atomic_t *v, int i) > { > #if defined(arch_atomic_set_release) > arch_atomic_set_release(v, i); > -#elif defined(arch_atomic_set) > - arch_atomic_set(v, i); > #else > if (__native_word(atomic_t)) { > smp_store_release(&(v)->counter, i); > @@ -2575,8 +2571,6 @@ raw_atomic64_read_acquire(const atomic64_t *v) > { > #if defined(arch_atomic64_read_acquire) > return arch_atomic64_read_acquire(v); > -#elif defined(arch_atomic64_read) > - return arch_atomic64_read(v); > #else > s64 ret; > > @@ -2624,8 +2618,6 @@ raw_atomic64_set_release(atomic64_t *v, s64 i) > { > #if defined(arch_atomic64_set_release) > arch_atomic64_set_release(v, i); > -#elif defined(arch_atomic64_set) > - arch_atomic64_set(v, i); > #else > if (__native_word(atomic64_t)) { > smp_store_release(&(v)->counter, i); > @@ -4657,4 +4649,4 @@ raw_atomic64_dec_if_positive(atomic64_t *v) > } > > #endif /* _LINUX_ATOMIC_FALLBACK_H */ > -// 202b45c7db600ce36198eb1f1fc2c2d5268ace2d > +// 2fdd6702823fa842f9cea57a002e6e4476ae780c > diff --git a/scripts/atomic/gen-atomic-fallback.sh b/scripts/atomic/gen-atomic-fallback.sh > index c0c8a85d7c81..282a1d3c41d4 100755 > --- a/scripts/atomic/gen-atomic-fallback.sh > +++ b/scripts/atomic/gen-atomic-fallback.sh > @@ -102,7 +102,8 @@ gen_proto_order_variant() > fi > > # Allow ACQUIRE/RELEASE/RELAXED ops to be defined in terms of FULL ops > - if [ ! -z "${order}" ]; then > + # Exclude arch_atomic(64)_read(set) mappings because these are not FULL ops. > + if [ ! -z "${order}" ] && [ "${name}" != "read" ] && [ "${name}" != "set" ]; then > printf "#elif defined(arch_${basename})\n" > printf "\t${retstmt}arch_${basename}(${args});\n" > fi > -- > 2.36.1 >