[RFC PATCH 06/13] arm64: percpu: Add infrastructure for preemptible this_cpu_*() ops
Mark Rutland
mark.rutland at arm.com
Tue Aug 4 06:23:02 PDT 2026
On Tue, Jul 28, 2026 at 06:49:12PM +0200, Peter Zijlstra wrote:
> On Tue, Jul 28, 2026 at 04:53:52PM +0100, Mark Rutland wrote:
>
> > > > +#define ____PCPU_GPRS_BEGIN(gprs, pcp, off, addr) \
> > > > + __DEFINE_ASM_GPR_NUMS \
> > > > + __DEFINE_ASM_GPR_ALIASES \
> > > > + " mov w" off ", #" __VAL_PCPU_GPRS(pcp, off, addr) "\n" \
> > > > + " strh w" off ", " gprs "\n" \
> > > > + __KERN_ASM_CPU_OFFSET(off) "\n"
> > >
> > > Can this macro also generate a readable comment for those few of us
> > > building the .i file ?
> >
> > Do you mean for __VAL_PCPU_GPRS, or ____PCPU_GPRS_BEGIN() ?
>
> I was thinking BEGIN, but whatever is easiest, the __VAL thing is only
> ever used in BEGIN anyway.
>
> > I can happily add comments for either (and the corresponding ENDs).
>
> Not sure the comment makes sense for end, that's simply storing 0 and
> seems clear enough.
FWIW, for v2 I've added the following to ____PCPU_GPRS_BEGIN():
"// ____PCPU_GPRS_BEGIN(" gprs ", " pcp ", " off ", " addr")\n"
... which should make that easy to spot, and surfaces the exact
registers used.
Mark.
More information about the linux-arm-kernel
mailing list