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

Nick Huang posted 1 patch 1 month, 1 week ago
There is a newer version of this series
arch/arm/include/uapi/asm/ptrace.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] arm: Replace ASSEMBLY with ASSEMBLER in uapi headers
Posted by Nick Huang 1 month, 1 week ago
  ASSEMBLY is defined only by the kernel Makefile and thus not suitable for uapi headers
  unless userspace Makefiles also define it. Switch to ASSEMBLER, which the compiler sets
  automatically when compiling assembly. Reference: commit
  639f08fc20c92c2cc373b2b4d065185daa9633e3

Signed-off-by: Nick Huang <sef1548@gmail.com>
---
 arch/arm/include/uapi/asm/ptrace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
index 8896c23cc..f28cbd318 100644
--- a/arch/arm/include/uapi/asm/ptrace.h
+++ b/arch/arm/include/uapi/asm/ptrace.h
@@ -119,7 +119,7 @@
 #define PT_DATA_ADDR		0x10004
 #define PT_TEXT_END_ADDR	0x10008
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__ 
 
 /*
  * This struct defines the way the registers are stored on the
@@ -158,6 +158,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
Re: [PATCH] arm: Replace ASSEMBLY with ASSEMBLER in uapi headers
Posted by Maciej W. Rozycki 1 month, 1 week ago
On Wed, 18 Feb 2026, Nick Huang wrote:

>   ASSEMBLY is defined only by the kernel Makefile and thus not suitable for uapi headers
>   unless userspace Makefiles also define it. Switch to ASSEMBLER, which the compiler sets
>   automatically when compiling assembly. Reference: commit
>   639f08fc20c92c2cc373b2b4d065185daa9633e3

 While not a regression, as this used not to work anyway with ASSEMBLY, 
the use of ASSEMBLER requires sufficiently new a compiler and in principle 
the userland may have old tools installed for whatever reason.  So perhaps 
#error is in order if the compiler is not recent enough, for a complete 
fix?

 FWIW GCC 2.95.x didn't yet have it, it landed ultimately with GCC 3.0.  
Do we care?  For instance the GNU C library still does for its installed 
headers.

  Maciej