[PATCH v2] arm: Replace ASSEMBLY with ASSEMBLER in uapi

Thomas Weißschuh linux at weissschuh.net
Mon Mar 9 09:01:32 PDT 2026


Hi Nick,

thanks for the update. After our last discussion I prepared a
supplemental patch for this, but of course forgot to actually
send it out.

On 2026-03-09 15:24:23+0000, Nick Huang wrote:
> Add a compatibility shim for __ASSEMBLER__ to support older GCC versions.
> This bridge ensures that toolchains defining only __ASSEMBLY__ can correctly identify assembly stages.
> This block can be removed once consensus is reached to drop support for these legacy compilers. If this version is acceptable, I will send it out in the v3 patch.
> 
> diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
> index 8896c23cc..427eb70bd 100644
> --- a/arch/arm/include/uapi/asm/ptrace.h
> +++ b/arch/arm/include/uapi/asm/ptrace.h
> @@ -119,7 +119,11 @@
>  #define PT_DATA_ADDR		0x10004
>  #define PT_TEXT_END_ADDR	0x10008
 
> -#ifndef __ASSEMBLY__
> +#if !defined(__ASSEMBLER__) && defined(__ASSEMBLY__)
> +#define __ASSEMBLER__ __ASSEMBLY__
> +#endif

With [0] this hunk should also be unnecesarry. It would free all
UAPI authors from worrying about the problem at all.

[0] https://lore.kernel.org/lkml/20260309-uapi-assembly-v1-1-a7ebfbf14309@weissschuh.net/T/#u

> +#ifndef __ASSEMBLER__ 
>  
>  /*
>   * This struct defines the way the registers are stored on the
> @@ -158,6 +162,6 @@ struct pt_regs {
>  #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )
>  
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__  */
>  
>  #endif /* _UAPI__ASM_ARM_PTRACE_H */
> -- 
> 2.43.0
> 



More information about the linux-arm-kernel mailing list