[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d3779f58-7c8f-4a93-a9f0-c6dc39efa847@paulmck-laptop>
Date: Wed, 16 Oct 2024 06:28:46 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Vineet Gupta <vgupta@...nel.org>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-snps-arc@...ts.infradead.org
Subject: Re: ARC: Use __force to suppress per-CPU cmpxchg complaints
On Tue, Oct 15, 2024 at 10:33:14PM -0700, Vineet Gupta wrote:
> On 10/9/24 10:55, Paul E. McKenney wrote:
> > Currently, the cast of the first argument to cmpxchg_emu_u8() drops the
> > __percpu address-space designator, which results in sparse complaints
> > when applying cmpxchg() to per-CPU variables in ARC. Therefore, use
> > __force to suppress these complaints, given that this does not pertain
> > to cmpxchg() semantics, which are plently well-defined on variables in
> > general, whether per-CPU or otherwise.
> >
> > Reported-by: kernel test robot <lkp@...el.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202409251336.ToC0TvWB-lkp@intel.com/
> > Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
> > Cc: Vineet Gupta <vgupta@...nel.org>
> > Cc: <linux-snps-arc@...ts.infradead.org>
> >
> > diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h
> > index 58045c8983404..76f43db0890fc 100644
> > --- a/arch/arc/include/asm/cmpxchg.h
> > +++ b/arch/arc/include/asm/cmpxchg.h
> > @@ -48,7 +48,7 @@
> > \
> > switch(sizeof((_p_))) { \
> > case 1: \
> > - _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)_p_, (uintptr_t)_o_, (uintptr_t)_n_); \
> > + _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *__force)_p_, (uintptr_t)_o_, (uintptr_t)_n_); \
> > break; \
> > case 4: \
> > _prev_ = __cmpxchg(_p_, _o_, _n_); \
>
>
> Added to for-curr.
Thank you! As soon as it shows up in -next, I will drop it from my tree.
Thanx, Paul
Powered by blists - more mailing lists