From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796307490; b=4dgs/qw+2LrTZ2C2RO46S6q45CFpjf6iknMTC6zLfJyQnuHEqPHD+xhutx6hHLByvQn/ /siRsP/fQcA32LIie1nNkwhBOVKN5RYAtB7juYEM7iwk91JXYfvR5LC4m7ryNkNT2aGs1 WV2fel/SU7oLZEfCzEBrsJDt9hnHN503TARZHjp9cqbWKdXFBgIUgVica3cbBU8vDEi4h M/OKa60AHraWmNw7fyiFQ1NgjXANi9Z5YJ8MU46tlotuKR1cFcFEmYtnIR04SlVUsb9pG jACcsGGlx2vHhLAM0+QqSNkrvWONZ4LnX2r0hNXPthAePp33z05nNan34RVcBoA0U9A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307490; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=/gog0zo0AVuh/UFTfrwJobjTdJQY5noIxhZ7qRzf/7I=; b=UMazUv3IvqrGfNHWHZyvxww6BTXM7SuKlnrvWNjDiIoCayH10mXVUm639oVStYuedNgW YhoWZSJBYs0ahKsCnZpOFLfQvxUQbYYwl8B4pkm2VHQsotOs4msGIQZ9Uh4vHjSK7D99M 2N7tJcki6QjQDUWSdIGeYJNuwVC0ndfRMrwGt8fZZyjptg15g6Vizlg2Q+ESn8E/3H8Lu yZcXv5wZ3WeNVlc1lBm0YPoI8YMetcLSpphKf0vCuDWQ3C6h6MAD28wqHvNEdjjlANuOq 1VotOJL+3r9ffRNEN5sM1CkdaxugBf6I+k6C6NVymtVtGvnJwcSDv5d7PIXB+GFwQwQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SaCIqqtG; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32192606A6A1 for ; Thu, 3 Dec 2026 14:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SaCIqqtG Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0FC51F00A18; Thu, 3 Dec 2026 14:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796307489; bh=/gog0zo0AVuh/UFTfrwJobjTdJQY5noIxhZ7qRzf/7I=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=SaCIqqtGzHgQHzLFWHWggX0T/j7wjAHMYt3ZH2LWUXd4wUoMLChYse1TTWnxSpbK6 45loDXkn6H3NctiY0sAY4J2A8CUW8r2LXhmpxnbkpqsZDVQlcWY3LXev+MeHRFFS4d iwPU/8rG05mYZNGn5hVTCxLRVXVE3IxsImgrg+VsnkqyGDEHqCUxTX9PdXoeOzsA1a EJExad5w1p2ij+dJMJGaZCkqamNiJcOhpSNFQRtLRXE3JoiicjLOi1e29LzRKSJvYA azDRwtfKexqHSfmho0pJVq++PUa4mvBFjXbVsUq1pCQxRzHTaCwNNkY/0sm+oywDFc ZXNm6JqQ7FgEA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v11 05/10] riscv: implement preemptible this_cpu void RMW operations Reply-To: sashiko-reviews@lists.linux.dev To: "Yunhui Cui" , pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, dennis@kernel.org, tj@kernel.org, cl@gentwo.org, oleg@redhat.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev, bjorn@kernel.org, pulehui@huawei.com, puranjay@kernel.org, broonie@kernel.org, dave@stgolabs.net, david.laight.linux@gmail.com, jszhang@kernel.org, tglx@kernel.org, conor.dooley@microchip.com, thuth@redhat.com, ajones@ventanamicro.com, ben.dooks@codethink.co.uk, rkrcmar@ventanamicro.com, samuel.holland@sifive.com, zong.li@sifive.com, debug@rivosinc.com, seanwascoding@gmail.com, andybnac@gmail.com, menglong8.dong@gmail.com, cyrilbur@tenstorrent.com, wangruikang@iscas.ac.cn, atishp@rivosinc.com, apatel@ventanamicro.com, arnd@arndb.de, nathan@kernel.org, nick.desaulniers+lkml@gmail.com, morbo@google.com, justinstitt@google.com, qingfang.deng@siflower.com.cn, linux-mm@kvack.org, bpf@vger.kernel.org In-Reply-To: <20261203135328.32990-6-cuiyunhui@bytedance.com> References: <20261203135328.32990-1-cuiyunhui@bytedance.com> <20261203135328.32990-6-cuiyunhui@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 14:18:02 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] riscv: shadowed local variables in __PERCPU_8_16_OP_CASE() macro -- commit b17c7b8c85ff68f07d099aefa48ef38f45469f69 Author: Yunhui Cui riscv: implement preemptible this_cpu void RMW operations This commit instantiates the 8-, 16-, 32-, and 64-bit preemptible per-CPU RMW helpers for addition and bitwise AND/OR, and wires up the void this_cpu_add/and/or_*() macros to use them. Link: https://lore.kernel.org/r/20260826010748.zphu3wh2hlm4t4o2@offworld > diff --git a/arch/riscv/include/asm/percpu.h b/arch/riscv/include/asm/per= cpu.h > index cd88618889494..e39210ddd5026 100644 > --- a/arch/riscv/include/asm/percpu.h > +++ b/arch/riscv/include/asm/percpu.h > @@ -221,6 +221,23 @@ PERCPU_RW_OPS("ld", "sd", 64) > PERCPU_RW_OPS("lw", "sw", 32) > #endif > =20 > +__PERCPU_AMO_OP_CASE(add, 32, .w, +) > +__PERCPU_AMO_OP_CASE(and, 32, .w, &) > +__PERCPU_AMO_OP_CASE(or, 32, .w, |) > + > +#ifdef CONFIG_64BIT > +__PERCPU_AMO_OP_CASE(add, 64, .d, +) > +__PERCPU_AMO_OP_CASE(and, 64, .d, &) > +__PERCPU_AMO_OP_CASE(or, 64, .d, |) > +#endif > + > +__PERCPU_8_16_OP_CASE(add, 8, .b, +) > +__PERCPU_8_16_OP_CASE(add, 16, .h, +) > +__PERCPU_8_16_OP_CASE(and, 8, .b, &) > +__PERCPU_8_16_OP_CASE(and, 16, .h, &) > +__PERCPU_8_16_OP_CASE(or, 8, .b, |) > +__PERCPU_8_16_OP_CASE(or, 16, .h, |) [Severity: Low] Do these __PERCPU_8_16_OP_CASE() instantiations trigger -Wshadow warnings on __ti, __off, and __addr under W=3D2 builds? __PERCPU_8_16_OP_CASE() expands __PCPU_OP_CONTEXT() at function scope and then calls __PERCPU_AMO() in the Zabha branch, which expands __PCPU_OP_CONTEXT() again in a nested block. Because asm/percpu.h is included widely, these six instantiations emit 18 -Wshadow warnings per translation unit regardless of CONFIG_RISCV_ISA_ZABHA. Moving __PCPU_OP_CONTEXT() in __PERCPU_8_16_OP_CASE() after the Zabha early-return block avoids this. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203135328.3299= 0-1-cuiyunhui@bytedance.com?part=3D5