[PATCH v3 16/21] arm64: percpu: Implement preemptible void RMW ops

Mark Rutland mark.rutland at arm.com
Tue Sep 8 08:07:40 PDT 2026


On Sat, Sep 05, 2026 at 10:03:19AM +0100, David Laight wrote:
> On Fri,  4 Sep 2026 17:17:53 +0100
> Mark Rutland <mark.rutland at arm.com> wrote:
> 
> > Use the PCPU GPR infrastructure to implement all of the RMW ops which do
> > not return a value.
> ...
> >  #define __PERCPU_OP_CASE(w, sfx, name, sz, op_llsc, op_lse)		\
> 
> Isn't this definition exactly the same as __PERCPU_RET_OP_CASE() except
> for s/tmp/ret/ and the 'return ret'?

Not exactly the same; the __PERCPU_RET_OP_CASE() assembly also performs
an additional instruction at the end in order to generate the RETURN
value.

> Since the compiler will just ignore the unwanted return value
> there is not point replicating the definition.

We could consider sharing the assembly, but it's not quite that simple,
so I'm going to leave this as-is for now.

Mark.



More information about the linux-arm-kernel mailing list