[PATCHv4 08/17] arm64: uaccess: move uao_* alternatives to asm-uaccess.h

Mark Rutland mark.rutland at arm.com
Mon Nov 16 07:25:59 EST 2020


On Sat, Nov 14, 2020 at 10:22:15AM +0100, Christoph Hellwig wrote:
> > +#ifdef CONFIG_ARM64_UAO
> > +	.macro uao_ldp l, reg1, reg2, addr, post_inc
> > +		alternative_if_not ARM64_HAS_UAO
> > +8888:			ldp	\reg1, \reg2, [\addr], \post_inc;
> > +8889:			nop;
> 
> No actually new in this patch, but that is the reason for these horrible
> label names?

It's a historic way of having non-conflicting labels. I also hate it,
and intend to clean it up subsequently.

The new/preferred way for labels in asm macros is to use a descriptive
local label with a '\@' suffix to ensure true uniqueness, e.g.

| 	.macro foo
| 	cbz	x0, .Lskip\@
| 	mov	x0, x1
| .Lskip\@:
| 	.endm

... which I assume is what you'd also like here.

Thanks,
Mark.



More information about the linux-arm-kernel mailing list