[PATCH] x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Thomas Huth posted 1 patch 11 months ago
arch/x86/include/uapi/asm/bootparam.h  | 4 ++--
arch/x86/include/uapi/asm/e820.h       | 4 ++--
arch/x86/include/uapi/asm/ldt.h        | 4 ++--
arch/x86/include/uapi/asm/msr.h        | 4 ++--
arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++---
arch/x86/include/uapi/asm/ptrace.h     | 4 ++--
arch/x86/include/uapi/asm/setup_data.h | 4 ++--
arch/x86/include/uapi/asm/signal.h     | 8 ++++----
8 files changed, 19 insertions(+), 19 deletions(-)
[PATCH] x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
Posted by Thomas Huth 11 months ago
__ASSEMBLY__ is only defined by the Makefile of the kernel, so
this is not really useful for uapi headers (unless the userspace
Makefile defines it, too). Let's switch to __ASSEMBLER__ which
gets set automatically by the compiler when compiling assembly
code.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 arch/x86/include/uapi/asm/bootparam.h  | 4 ++--
 arch/x86/include/uapi/asm/e820.h       | 4 ++--
 arch/x86/include/uapi/asm/ldt.h        | 4 ++--
 arch/x86/include/uapi/asm/msr.h        | 4 ++--
 arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++---
 arch/x86/include/uapi/asm/ptrace.h     | 4 ++--
 arch/x86/include/uapi/asm/setup_data.h | 4 ++--
 arch/x86/include/uapi/asm/signal.h     | 8 ++++----
 8 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index 9b82eebd7add5..dafbf581c515d 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -26,7 +26,7 @@
 #define XLF_5LEVEL_ENABLED		(1<<6)
 #define XLF_MEM_ENCRYPTION		(1<<7)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/screen_info.h>
@@ -210,6 +210,6 @@ enum x86_hardware_subarch {
 	X86_NR_SUBARCHS,
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_X86_BOOTPARAM_H */
diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
index 2f491efe3a126..55bc668671560 100644
--- a/arch/x86/include/uapi/asm/e820.h
+++ b/arch/x86/include/uapi/asm/e820.h
@@ -54,7 +54,7 @@
  */
 #define E820_RESERVED_KERN        128
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 struct e820entry {
 	__u64 addr;	/* start of memory segment */
@@ -76,7 +76,7 @@ struct e820map {
 #define BIOS_ROM_BASE		0xffe00000
 #define BIOS_ROM_END		0xffffffff
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _UAPI_ASM_X86_E820_H */
diff --git a/arch/x86/include/uapi/asm/ldt.h b/arch/x86/include/uapi/asm/ldt.h
index d62ac5db093b4..a82c039d8e6a7 100644
--- a/arch/x86/include/uapi/asm/ldt.h
+++ b/arch/x86/include/uapi/asm/ldt.h
@@ -12,7 +12,7 @@
 /* The size of each LDT entry. */
 #define LDT_ENTRY_SIZE	8
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
  * not to the default values if you still want to do syscalls. This
@@ -44,5 +44,5 @@ struct user_desc {
 #define MODIFY_LDT_CONTENTS_STACK	1
 #define MODIFY_LDT_CONTENTS_CODE	2
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* _ASM_X86_LDT_H */
diff --git a/arch/x86/include/uapi/asm/msr.h b/arch/x86/include/uapi/asm/msr.h
index e7516b402a00f..4b8917ca28fe7 100644
--- a/arch/x86/include/uapi/asm/msr.h
+++ b/arch/x86/include/uapi/asm/msr.h
@@ -2,7 +2,7 @@
 #ifndef _UAPI_ASM_X86_MSR_H
 #define _UAPI_ASM_X86_MSR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
@@ -10,5 +10,5 @@
 #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8])
 #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8])
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _UAPI_ASM_X86_MSR_H */
diff --git a/arch/x86/include/uapi/asm/ptrace-abi.h b/arch/x86/include/uapi/asm/ptrace-abi.h
index 16074b9c93bb5..5823584dea132 100644
--- a/arch/x86/include/uapi/asm/ptrace-abi.h
+++ b/arch/x86/include/uapi/asm/ptrace-abi.h
@@ -25,7 +25,7 @@
 
 #else /* __i386__ */
 
-#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
+#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
 /*
  * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
  * unless syscall needs a complete, fully filled "struct pt_regs".
@@ -57,7 +57,7 @@
 #define EFLAGS 144
 #define RSP 152
 #define SS 160
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* top of stack page */
 #define FRAME_SIZE 168
@@ -87,7 +87,7 @@
 
 #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #endif
 
diff --git a/arch/x86/include/uapi/asm/ptrace.h b/arch/x86/include/uapi/asm/ptrace.h
index 85165c0edafc8..e0b5b4f6226b1 100644
--- a/arch/x86/include/uapi/asm/ptrace.h
+++ b/arch/x86/include/uapi/asm/ptrace.h
@@ -7,7 +7,7 @@
 #include <asm/processor-flags.h>
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef __i386__
 /* this struct defines the way the registers are stored on the
@@ -81,6 +81,6 @@ struct pt_regs {
 
 
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_PTRACE_H */
diff --git a/arch/x86/include/uapi/asm/setup_data.h b/arch/x86/include/uapi/asm/setup_data.h
index b111b0c185449..50c45ead4e7c9 100644
--- a/arch/x86/include/uapi/asm/setup_data.h
+++ b/arch/x86/include/uapi/asm/setup_data.h
@@ -18,7 +18,7 @@
 #define SETUP_INDIRECT			(1<<31)
 #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -78,6 +78,6 @@ struct ima_setup_data {
 	__u64 size;
 } __attribute__((packed));
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h
index f777346450ec3..1067efabf18b5 100644
--- a/arch/x86/include/uapi/asm/signal.h
+++ b/arch/x86/include/uapi/asm/signal.h
@@ -2,7 +2,7 @@
 #ifndef _UAPI_ASM_X86_SIGNAL_H
 #define _UAPI_ASM_X86_SIGNAL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #include <linux/compiler.h>
 
@@ -16,7 +16,7 @@ struct siginfo;
 typedef unsigned long sigset_t;
 
 #endif /* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #define SIGHUP		 1
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
 
 #include <asm-generic/signal-defs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 
 # ifndef __KERNEL__
@@ -106,6 +106,6 @@ typedef struct sigaltstack {
 	__kernel_size_t ss_size;
 } stack_t;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_SIGNAL_H */
-- 
2.48.1
[tip: x86/core] x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
Posted by tip-bot2 for Thomas Huth 10 months, 3 weeks ago
The following commit has been merged into the x86/core branch of tip:

Commit-ID:     8a141be3233af7d4f7014ebc44d5452d46b2b1be
Gitweb:        https://git.kernel.org/tip/8a141be3233af7d4f7014ebc44d5452d46b2b1be
Author:        Thomas Huth <thuth@redhat.com>
AuthorDate:    Mon, 10 Mar 2025 11:42:56 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 19 Mar 2025 11:30:53 +01:00

x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers

__ASSEMBLY__ is only defined by the Makefile of the kernel, so
this is not really useful for UAPI headers (unless the userspace
Makefile defines it, too). Let's switch to __ASSEMBLER__ which
gets set automatically by the compiler when compiling assembly
code.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Brian Gerst <brgerst@gmail.com>
Link: https://lore.kernel.org/r/20250310104256.123527-1-thuth@redhat.com
---
 arch/x86/include/uapi/asm/bootparam.h  | 4 ++--
 arch/x86/include/uapi/asm/e820.h       | 4 ++--
 arch/x86/include/uapi/asm/ldt.h        | 4 ++--
 arch/x86/include/uapi/asm/msr.h        | 4 ++--
 arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++---
 arch/x86/include/uapi/asm/ptrace.h     | 4 ++--
 arch/x86/include/uapi/asm/setup_data.h | 4 ++--
 arch/x86/include/uapi/asm/signal.h     | 8 ++++----
 8 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index 9b82eeb..dafbf58 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -26,7 +26,7 @@
 #define XLF_5LEVEL_ENABLED		(1<<6)
 #define XLF_MEM_ENCRYPTION		(1<<7)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/screen_info.h>
@@ -210,6 +210,6 @@ enum x86_hardware_subarch {
 	X86_NR_SUBARCHS,
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_X86_BOOTPARAM_H */
diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
index 2f491ef..55bc668 100644
--- a/arch/x86/include/uapi/asm/e820.h
+++ b/arch/x86/include/uapi/asm/e820.h
@@ -54,7 +54,7 @@
  */
 #define E820_RESERVED_KERN        128
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 struct e820entry {
 	__u64 addr;	/* start of memory segment */
@@ -76,7 +76,7 @@ struct e820map {
 #define BIOS_ROM_BASE		0xffe00000
 #define BIOS_ROM_END		0xffffffff
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _UAPI_ASM_X86_E820_H */
diff --git a/arch/x86/include/uapi/asm/ldt.h b/arch/x86/include/uapi/asm/ldt.h
index d62ac5d..a82c039 100644
--- a/arch/x86/include/uapi/asm/ldt.h
+++ b/arch/x86/include/uapi/asm/ldt.h
@@ -12,7 +12,7 @@
 /* The size of each LDT entry. */
 #define LDT_ENTRY_SIZE	8
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
  * not to the default values if you still want to do syscalls. This
@@ -44,5 +44,5 @@ struct user_desc {
 #define MODIFY_LDT_CONTENTS_STACK	1
 #define MODIFY_LDT_CONTENTS_CODE	2
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* _ASM_X86_LDT_H */
diff --git a/arch/x86/include/uapi/asm/msr.h b/arch/x86/include/uapi/asm/msr.h
index e7516b4..4b8917c 100644
--- a/arch/x86/include/uapi/asm/msr.h
+++ b/arch/x86/include/uapi/asm/msr.h
@@ -2,7 +2,7 @@
 #ifndef _UAPI_ASM_X86_MSR_H
 #define _UAPI_ASM_X86_MSR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
@@ -10,5 +10,5 @@
 #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8])
 #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8])
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _UAPI_ASM_X86_MSR_H */
diff --git a/arch/x86/include/uapi/asm/ptrace-abi.h b/arch/x86/include/uapi/asm/ptrace-abi.h
index 16074b9..5823584 100644
--- a/arch/x86/include/uapi/asm/ptrace-abi.h
+++ b/arch/x86/include/uapi/asm/ptrace-abi.h
@@ -25,7 +25,7 @@
 
 #else /* __i386__ */
 
-#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
+#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
 /*
  * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
  * unless syscall needs a complete, fully filled "struct pt_regs".
@@ -57,7 +57,7 @@
 #define EFLAGS 144
 #define RSP 152
 #define SS 160
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* top of stack page */
 #define FRAME_SIZE 168
@@ -87,7 +87,7 @@
 
 #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #endif
 
diff --git a/arch/x86/include/uapi/asm/ptrace.h b/arch/x86/include/uapi/asm/ptrace.h
index 85165c0..e0b5b4f 100644
--- a/arch/x86/include/uapi/asm/ptrace.h
+++ b/arch/x86/include/uapi/asm/ptrace.h
@@ -7,7 +7,7 @@
 #include <asm/processor-flags.h>
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef __i386__
 /* this struct defines the way the registers are stored on the
@@ -81,6 +81,6 @@ struct pt_regs {
 
 
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_PTRACE_H */
diff --git a/arch/x86/include/uapi/asm/setup_data.h b/arch/x86/include/uapi/asm/setup_data.h
index b111b0c..50c45ea 100644
--- a/arch/x86/include/uapi/asm/setup_data.h
+++ b/arch/x86/include/uapi/asm/setup_data.h
@@ -18,7 +18,7 @@
 #define SETUP_INDIRECT			(1<<31)
 #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -78,6 +78,6 @@ struct ima_setup_data {
 	__u64 size;
 } __attribute__((packed));
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h
index f777346..1067efa 100644
--- a/arch/x86/include/uapi/asm/signal.h
+++ b/arch/x86/include/uapi/asm/signal.h
@@ -2,7 +2,7 @@
 #ifndef _UAPI_ASM_X86_SIGNAL_H
 #define _UAPI_ASM_X86_SIGNAL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #include <linux/compiler.h>
 
@@ -16,7 +16,7 @@ struct siginfo;
 typedef unsigned long sigset_t;
 
 #endif /* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #define SIGHUP		 1
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
 
 #include <asm-generic/signal-defs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 
 # ifndef __KERNEL__
@@ -106,6 +106,6 @@ typedef struct sigaltstack {
 	__kernel_size_t ss_size;
 } stack_t;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_SIGNAL_H */
[tip: x86/headers] x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
Posted by tip-bot2 for Thomas Huth 11 months ago
The following commit has been merged into the x86/headers branch of tip:

Commit-ID:     e28eecf2602bdce826833ccb9a6b7a6bacafd98b
Gitweb:        https://git.kernel.org/tip/e28eecf2602bdce826833ccb9a6b7a6bacafd98b
Author:        Thomas Huth <thuth@redhat.com>
AuthorDate:    Mon, 10 Mar 2025 11:42:56 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 10 Mar 2025 12:18:42 +01:00

x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers

__ASSEMBLY__ is only defined by the Makefile of the kernel, so
this is not really useful for UAPI headers (unless the userspace
Makefile defines it, too). Let's switch to __ASSEMBLER__ which
gets set automatically by the compiler when compiling assembly
code.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Brian Gerst <brgerst@gmail.com>
Link: https://lore.kernel.org/r/20250310104256.123527-1-thuth@redhat.com
---
 arch/x86/include/uapi/asm/bootparam.h  | 4 ++--
 arch/x86/include/uapi/asm/e820.h       | 4 ++--
 arch/x86/include/uapi/asm/ldt.h        | 4 ++--
 arch/x86/include/uapi/asm/msr.h        | 4 ++--
 arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++---
 arch/x86/include/uapi/asm/ptrace.h     | 4 ++--
 arch/x86/include/uapi/asm/setup_data.h | 4 ++--
 arch/x86/include/uapi/asm/signal.h     | 8 ++++----
 8 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index 9b82eeb..dafbf58 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -26,7 +26,7 @@
 #define XLF_5LEVEL_ENABLED		(1<<6)
 #define XLF_MEM_ENCRYPTION		(1<<7)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/screen_info.h>
@@ -210,6 +210,6 @@ enum x86_hardware_subarch {
 	X86_NR_SUBARCHS,
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_X86_BOOTPARAM_H */
diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
index 2f491ef..55bc668 100644
--- a/arch/x86/include/uapi/asm/e820.h
+++ b/arch/x86/include/uapi/asm/e820.h
@@ -54,7 +54,7 @@
  */
 #define E820_RESERVED_KERN        128
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 struct e820entry {
 	__u64 addr;	/* start of memory segment */
@@ -76,7 +76,7 @@ struct e820map {
 #define BIOS_ROM_BASE		0xffe00000
 #define BIOS_ROM_END		0xffffffff
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _UAPI_ASM_X86_E820_H */
diff --git a/arch/x86/include/uapi/asm/ldt.h b/arch/x86/include/uapi/asm/ldt.h
index d62ac5d..a82c039 100644
--- a/arch/x86/include/uapi/asm/ldt.h
+++ b/arch/x86/include/uapi/asm/ldt.h
@@ -12,7 +12,7 @@
 /* The size of each LDT entry. */
 #define LDT_ENTRY_SIZE	8
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
  * not to the default values if you still want to do syscalls. This
@@ -44,5 +44,5 @@ struct user_desc {
 #define MODIFY_LDT_CONTENTS_STACK	1
 #define MODIFY_LDT_CONTENTS_CODE	2
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* _ASM_X86_LDT_H */
diff --git a/arch/x86/include/uapi/asm/msr.h b/arch/x86/include/uapi/asm/msr.h
index e7516b4..4b8917c 100644
--- a/arch/x86/include/uapi/asm/msr.h
+++ b/arch/x86/include/uapi/asm/msr.h
@@ -2,7 +2,7 @@
 #ifndef _UAPI_ASM_X86_MSR_H
 #define _UAPI_ASM_X86_MSR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
@@ -10,5 +10,5 @@
 #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8])
 #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8])
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _UAPI_ASM_X86_MSR_H */
diff --git a/arch/x86/include/uapi/asm/ptrace-abi.h b/arch/x86/include/uapi/asm/ptrace-abi.h
index 16074b9..5823584 100644
--- a/arch/x86/include/uapi/asm/ptrace-abi.h
+++ b/arch/x86/include/uapi/asm/ptrace-abi.h
@@ -25,7 +25,7 @@
 
 #else /* __i386__ */
 
-#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
+#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
 /*
  * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
  * unless syscall needs a complete, fully filled "struct pt_regs".
@@ -57,7 +57,7 @@
 #define EFLAGS 144
 #define RSP 152
 #define SS 160
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* top of stack page */
 #define FRAME_SIZE 168
@@ -87,7 +87,7 @@
 
 #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #endif
 
diff --git a/arch/x86/include/uapi/asm/ptrace.h b/arch/x86/include/uapi/asm/ptrace.h
index 85165c0..e0b5b4f 100644
--- a/arch/x86/include/uapi/asm/ptrace.h
+++ b/arch/x86/include/uapi/asm/ptrace.h
@@ -7,7 +7,7 @@
 #include <asm/processor-flags.h>
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef __i386__
 /* this struct defines the way the registers are stored on the
@@ -81,6 +81,6 @@ struct pt_regs {
 
 
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_PTRACE_H */
diff --git a/arch/x86/include/uapi/asm/setup_data.h b/arch/x86/include/uapi/asm/setup_data.h
index b111b0c..50c45ea 100644
--- a/arch/x86/include/uapi/asm/setup_data.h
+++ b/arch/x86/include/uapi/asm/setup_data.h
@@ -18,7 +18,7 @@
 #define SETUP_INDIRECT			(1<<31)
 #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -78,6 +78,6 @@ struct ima_setup_data {
 	__u64 size;
 } __attribute__((packed));
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h
index f777346..1067efa 100644
--- a/arch/x86/include/uapi/asm/signal.h
+++ b/arch/x86/include/uapi/asm/signal.h
@@ -2,7 +2,7 @@
 #ifndef _UAPI_ASM_X86_SIGNAL_H
 #define _UAPI_ASM_X86_SIGNAL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #include <linux/compiler.h>
 
@@ -16,7 +16,7 @@ struct siginfo;
 typedef unsigned long sigset_t;
 
 #endif /* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #define SIGHUP		 1
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
 
 #include <asm-generic/signal-defs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 
 # ifndef __KERNEL__
@@ -106,6 +106,6 @@ typedef struct sigaltstack {
 	__kernel_size_t ss_size;
 } stack_t;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_X86_SIGNAL_H */
Re: [tip: x86/headers] x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
Posted by H. Peter Anvin 11 months ago
On March 10, 2025 4:29:34 AM PDT, tip-bot2 for Thomas Huth <tip-bot2@linutronix.de> wrote:
>The following commit has been merged into the x86/headers branch of tip:
>
>Commit-ID:     e28eecf2602bdce826833ccb9a6b7a6bacafd98b
>Gitweb:        https://git.kernel.org/tip/e28eecf2602bdce826833ccb9a6b7a6bacafd98b
>Author:        Thomas Huth <thuth@redhat.com>
>AuthorDate:    Mon, 10 Mar 2025 11:42:56 +01:00
>Committer:     Ingo Molnar <mingo@kernel.org>
>CommitterDate: Mon, 10 Mar 2025 12:18:42 +01:00
>
>x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
>
>__ASSEMBLY__ is only defined by the Makefile of the kernel, so
>this is not really useful for UAPI headers (unless the userspace
>Makefile defines it, too). Let's switch to __ASSEMBLER__ which
>gets set automatically by the compiler when compiling assembly
>code.
>
>Signed-off-by: Thomas Huth <thuth@redhat.com>
>Signed-off-by: Ingo Molnar <mingo@kernel.org>
>Cc: "H. Peter Anvin" <hpa@zytor.com>
>Cc: Linus Torvalds <torvalds@linux-foundation.org>
>Cc: Kees Cook <keescook@chromium.org>
>Cc: Brian Gerst <brgerst@gmail.com>
>Link: https://lore.kernel.org/r/20250310104256.123527-1-thuth@redhat.com
>---
> arch/x86/include/uapi/asm/bootparam.h  | 4 ++--
> arch/x86/include/uapi/asm/e820.h       | 4 ++--
> arch/x86/include/uapi/asm/ldt.h        | 4 ++--
> arch/x86/include/uapi/asm/msr.h        | 4 ++--
> arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++---
> arch/x86/include/uapi/asm/ptrace.h     | 4 ++--
> arch/x86/include/uapi/asm/setup_data.h | 4 ++--
> arch/x86/include/uapi/asm/signal.h     | 8 ++++----
> 8 files changed, 19 insertions(+), 19 deletions(-)
>
>diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
>index 9b82eeb..dafbf58 100644
>--- a/arch/x86/include/uapi/asm/bootparam.h
>+++ b/arch/x86/include/uapi/asm/bootparam.h
>@@ -26,7 +26,7 @@
> #define XLF_5LEVEL_ENABLED		(1<<6)
> #define XLF_MEM_ENCRYPTION		(1<<7)
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> 
> #include <linux/types.h>
> #include <linux/screen_info.h>
>@@ -210,6 +210,6 @@ enum x86_hardware_subarch {
> 	X86_NR_SUBARCHS,
> };
> 
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> 
> #endif /* _ASM_X86_BOOTPARAM_H */
>diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
>index 2f491ef..55bc668 100644
>--- a/arch/x86/include/uapi/asm/e820.h
>+++ b/arch/x86/include/uapi/asm/e820.h
>@@ -54,7 +54,7 @@
>  */
> #define E820_RESERVED_KERN        128
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> #include <linux/types.h>
> struct e820entry {
> 	__u64 addr;	/* start of memory segment */
>@@ -76,7 +76,7 @@ struct e820map {
> #define BIOS_ROM_BASE		0xffe00000
> #define BIOS_ROM_END		0xffffffff
> 
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> 
> 
> #endif /* _UAPI_ASM_X86_E820_H */
>diff --git a/arch/x86/include/uapi/asm/ldt.h b/arch/x86/include/uapi/asm/ldt.h
>index d62ac5d..a82c039 100644
>--- a/arch/x86/include/uapi/asm/ldt.h
>+++ b/arch/x86/include/uapi/asm/ldt.h
>@@ -12,7 +12,7 @@
> /* The size of each LDT entry. */
> #define LDT_ENTRY_SIZE	8
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> /*
>  * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
>  * not to the default values if you still want to do syscalls. This
>@@ -44,5 +44,5 @@ struct user_desc {
> #define MODIFY_LDT_CONTENTS_STACK	1
> #define MODIFY_LDT_CONTENTS_CODE	2
> 
>-#endif /* !__ASSEMBLY__ */
>+#endif /* !__ASSEMBLER__ */
> #endif /* _ASM_X86_LDT_H */
>diff --git a/arch/x86/include/uapi/asm/msr.h b/arch/x86/include/uapi/asm/msr.h
>index e7516b4..4b8917c 100644
>--- a/arch/x86/include/uapi/asm/msr.h
>+++ b/arch/x86/include/uapi/asm/msr.h
>@@ -2,7 +2,7 @@
> #ifndef _UAPI_ASM_X86_MSR_H
> #define _UAPI_ASM_X86_MSR_H
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> 
> #include <linux/types.h>
> #include <linux/ioctl.h>
>@@ -10,5 +10,5 @@
> #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8])
> #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8])
> 
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> #endif /* _UAPI_ASM_X86_MSR_H */
>diff --git a/arch/x86/include/uapi/asm/ptrace-abi.h b/arch/x86/include/uapi/asm/ptrace-abi.h
>index 16074b9..5823584 100644
>--- a/arch/x86/include/uapi/asm/ptrace-abi.h
>+++ b/arch/x86/include/uapi/asm/ptrace-abi.h
>@@ -25,7 +25,7 @@
> 
> #else /* __i386__ */
> 
>-#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
>+#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
> /*
>  * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
>  * unless syscall needs a complete, fully filled "struct pt_regs".
>@@ -57,7 +57,7 @@
> #define EFLAGS 144
> #define RSP 152
> #define SS 160
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> 
> /* top of stack page */
> #define FRAME_SIZE 168
>@@ -87,7 +87,7 @@
> 
> #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> #include <linux/types.h>
> #endif
> 
>diff --git a/arch/x86/include/uapi/asm/ptrace.h b/arch/x86/include/uapi/asm/ptrace.h
>index 85165c0..e0b5b4f 100644
>--- a/arch/x86/include/uapi/asm/ptrace.h
>+++ b/arch/x86/include/uapi/asm/ptrace.h
>@@ -7,7 +7,7 @@
> #include <asm/processor-flags.h>
> 
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> 
> #ifdef __i386__
> /* this struct defines the way the registers are stored on the
>@@ -81,6 +81,6 @@ struct pt_regs {
> 
> 
> 
>-#endif /* !__ASSEMBLY__ */
>+#endif /* !__ASSEMBLER__ */
> 
> #endif /* _UAPI_ASM_X86_PTRACE_H */
>diff --git a/arch/x86/include/uapi/asm/setup_data.h b/arch/x86/include/uapi/asm/setup_data.h
>index b111b0c..50c45ea 100644
>--- a/arch/x86/include/uapi/asm/setup_data.h
>+++ b/arch/x86/include/uapi/asm/setup_data.h
>@@ -18,7 +18,7 @@
> #define SETUP_INDIRECT			(1<<31)
> #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT)
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> 
> #include <linux/types.h>
> 
>@@ -78,6 +78,6 @@ struct ima_setup_data {
> 	__u64 size;
> } __attribute__((packed));
> 
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> 
> #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
>diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h
>index f777346..1067efa 100644
>--- a/arch/x86/include/uapi/asm/signal.h
>+++ b/arch/x86/include/uapi/asm/signal.h
>@@ -2,7 +2,7 @@
> #ifndef _UAPI_ASM_X86_SIGNAL_H
> #define _UAPI_ASM_X86_SIGNAL_H
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> #include <linux/types.h>
> #include <linux/compiler.h>
> 
>@@ -16,7 +16,7 @@ struct siginfo;
> typedef unsigned long sigset_t;
> 
> #endif /* __KERNEL__ */
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> 
> 
> #define SIGHUP		 1
>@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
> 
> #include <asm-generic/signal-defs.h>
> 
>-#ifndef __ASSEMBLY__
>+#ifndef __ASSEMBLER__
> 
> 
> # ifndef __KERNEL__
>@@ -106,6 +106,6 @@ typedef struct sigaltstack {
> 	__kernel_size_t ss_size;
> } stack_t;
> 
>-#endif /* __ASSEMBLY__ */
>+#endif /* __ASSEMBLER__ */
> 
> #endif /* _UAPI_ASM_X86_SIGNAL_H */

Wouldn't it be better to replace this everywhere for consistency?
Re: [tip: x86/headers] x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
Posted by Thomas Huth 11 months ago
On 12/03/2025 02.15, H. Peter Anvin wrote:
> On March 10, 2025 4:29:34 AM PDT, tip-bot2 for Thomas Huth <tip-bot2@linutronix.de> wrote:
>> The following commit has been merged into the x86/headers branch of tip:
>>
>> Commit-ID:     e28eecf2602bdce826833ccb9a6b7a6bacafd98b
>> Gitweb:        https://git.kernel.org/tip/e28eecf2602bdce826833ccb9a6b7a6bacafd98b
>> Author:        Thomas Huth <thuth@redhat.com>
>> AuthorDate:    Mon, 10 Mar 2025 11:42:56 +01:00
>> Committer:     Ingo Molnar <mingo@kernel.org>
>> CommitterDate: Mon, 10 Mar 2025 12:18:42 +01:00
>>
>> x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
>>
>> __ASSEMBLY__ is only defined by the Makefile of the kernel, so
>> this is not really useful for UAPI headers (unless the userspace
>> Makefile defines it, too). Let's switch to __ASSEMBLER__ which
>> gets set automatically by the compiler when compiling assembly
>> code.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> Signed-off-by: Ingo Molnar <mingo@kernel.org>
>> Cc: "H. Peter Anvin" <hpa@zytor.com>
>> Cc: Linus Torvalds <torvalds@linux-foundation.org>
>> Cc: Kees Cook <keescook@chromium.org>
>> Cc: Brian Gerst <brgerst@gmail.com>
>> Link: https://lore.kernel.org/r/20250310104256.123527-1-thuth@redhat.com
>> ---
>> arch/x86/include/uapi/asm/bootparam.h  | 4 ++--
>> arch/x86/include/uapi/asm/e820.h       | 4 ++--
>> arch/x86/include/uapi/asm/ldt.h        | 4 ++--
>> arch/x86/include/uapi/asm/msr.h        | 4 ++--
>> arch/x86/include/uapi/asm/ptrace-abi.h | 6 +++---
>> arch/x86/include/uapi/asm/ptrace.h     | 4 ++--
>> arch/x86/include/uapi/asm/setup_data.h | 4 ++--
>> arch/x86/include/uapi/asm/signal.h     | 8 ++++----
>> 8 files changed, 19 insertions(+), 19 deletions(-)
>>
>> diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
>> index 9b82eeb..dafbf58 100644
>> --- a/arch/x86/include/uapi/asm/bootparam.h
>> +++ b/arch/x86/include/uapi/asm/bootparam.h
>> @@ -26,7 +26,7 @@
>> #define XLF_5LEVEL_ENABLED		(1<<6)
>> #define XLF_MEM_ENCRYPTION		(1<<7)
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>
>> #include <linux/types.h>
>> #include <linux/screen_info.h>
>> @@ -210,6 +210,6 @@ enum x86_hardware_subarch {
>> 	X86_NR_SUBARCHS,
>> };
>>
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>
>> #endif /* _ASM_X86_BOOTPARAM_H */
>> diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
>> index 2f491ef..55bc668 100644
>> --- a/arch/x86/include/uapi/asm/e820.h
>> +++ b/arch/x86/include/uapi/asm/e820.h
>> @@ -54,7 +54,7 @@
>>   */
>> #define E820_RESERVED_KERN        128
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>> #include <linux/types.h>
>> struct e820entry {
>> 	__u64 addr;	/* start of memory segment */
>> @@ -76,7 +76,7 @@ struct e820map {
>> #define BIOS_ROM_BASE		0xffe00000
>> #define BIOS_ROM_END		0xffffffff
>>
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>
>>
>> #endif /* _UAPI_ASM_X86_E820_H */
>> diff --git a/arch/x86/include/uapi/asm/ldt.h b/arch/x86/include/uapi/asm/ldt.h
>> index d62ac5d..a82c039 100644
>> --- a/arch/x86/include/uapi/asm/ldt.h
>> +++ b/arch/x86/include/uapi/asm/ldt.h
>> @@ -12,7 +12,7 @@
>> /* The size of each LDT entry. */
>> #define LDT_ENTRY_SIZE	8
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>> /*
>>   * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
>>   * not to the default values if you still want to do syscalls. This
>> @@ -44,5 +44,5 @@ struct user_desc {
>> #define MODIFY_LDT_CONTENTS_STACK	1
>> #define MODIFY_LDT_CONTENTS_CODE	2
>>
>> -#endif /* !__ASSEMBLY__ */
>> +#endif /* !__ASSEMBLER__ */
>> #endif /* _ASM_X86_LDT_H */
>> diff --git a/arch/x86/include/uapi/asm/msr.h b/arch/x86/include/uapi/asm/msr.h
>> index e7516b4..4b8917c 100644
>> --- a/arch/x86/include/uapi/asm/msr.h
>> +++ b/arch/x86/include/uapi/asm/msr.h
>> @@ -2,7 +2,7 @@
>> #ifndef _UAPI_ASM_X86_MSR_H
>> #define _UAPI_ASM_X86_MSR_H
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>
>> #include <linux/types.h>
>> #include <linux/ioctl.h>
>> @@ -10,5 +10,5 @@
>> #define X86_IOC_RDMSR_REGS	_IOWR('c', 0xA0, __u32[8])
>> #define X86_IOC_WRMSR_REGS	_IOWR('c', 0xA1, __u32[8])
>>
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>> #endif /* _UAPI_ASM_X86_MSR_H */
>> diff --git a/arch/x86/include/uapi/asm/ptrace-abi.h b/arch/x86/include/uapi/asm/ptrace-abi.h
>> index 16074b9..5823584 100644
>> --- a/arch/x86/include/uapi/asm/ptrace-abi.h
>> +++ b/arch/x86/include/uapi/asm/ptrace-abi.h
>> @@ -25,7 +25,7 @@
>>
>> #else /* __i386__ */
>>
>> -#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
>> +#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
>> /*
>>   * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
>>   * unless syscall needs a complete, fully filled "struct pt_regs".
>> @@ -57,7 +57,7 @@
>> #define EFLAGS 144
>> #define RSP 152
>> #define SS 160
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>
>> /* top of stack page */
>> #define FRAME_SIZE 168
>> @@ -87,7 +87,7 @@
>>
>> #define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>> #include <linux/types.h>
>> #endif
>>
>> diff --git a/arch/x86/include/uapi/asm/ptrace.h b/arch/x86/include/uapi/asm/ptrace.h
>> index 85165c0..e0b5b4f 100644
>> --- a/arch/x86/include/uapi/asm/ptrace.h
>> +++ b/arch/x86/include/uapi/asm/ptrace.h
>> @@ -7,7 +7,7 @@
>> #include <asm/processor-flags.h>
>>
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>
>> #ifdef __i386__
>> /* this struct defines the way the registers are stored on the
>> @@ -81,6 +81,6 @@ struct pt_regs {
>>
>>
>>
>> -#endif /* !__ASSEMBLY__ */
>> +#endif /* !__ASSEMBLER__ */
>>
>> #endif /* _UAPI_ASM_X86_PTRACE_H */
>> diff --git a/arch/x86/include/uapi/asm/setup_data.h b/arch/x86/include/uapi/asm/setup_data.h
>> index b111b0c..50c45ea 100644
>> --- a/arch/x86/include/uapi/asm/setup_data.h
>> +++ b/arch/x86/include/uapi/asm/setup_data.h
>> @@ -18,7 +18,7 @@
>> #define SETUP_INDIRECT			(1<<31)
>> #define SETUP_TYPE_MAX			(SETUP_ENUM_MAX | SETUP_INDIRECT)
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>
>> #include <linux/types.h>
>>
>> @@ -78,6 +78,6 @@ struct ima_setup_data {
>> 	__u64 size;
>> } __attribute__((packed));
>>
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>
>> #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
>> diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h
>> index f777346..1067efa 100644
>> --- a/arch/x86/include/uapi/asm/signal.h
>> +++ b/arch/x86/include/uapi/asm/signal.h
>> @@ -2,7 +2,7 @@
>> #ifndef _UAPI_ASM_X86_SIGNAL_H
>> #define _UAPI_ASM_X86_SIGNAL_H
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>> #include <linux/types.h>
>> #include <linux/compiler.h>
>>
>> @@ -16,7 +16,7 @@ struct siginfo;
>> typedef unsigned long sigset_t;
>>
>> #endif /* __KERNEL__ */
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>
>>
>> #define SIGHUP		 1
>> @@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
>>
>> #include <asm-generic/signal-defs.h>
>>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>
>>
>> # ifndef __KERNEL__
>> @@ -106,6 +106,6 @@ typedef struct sigaltstack {
>> 	__kernel_size_t ss_size;
>> } stack_t;
>>
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>
>> #endif /* _UAPI_ASM_X86_SIGNAL_H */
> 
> Wouldn't it be better to replace this everywhere for consistency?

Yes, also suggested by Arnd here:

https://lore.kernel.org/linux-s390/1be19a7f-f43c-4025-8cf9-5f831c4125f5@app.fastmail.com/

I'll try to come up with a patch series in the next days. I think I'll keep 
separate patches for the different architectures and uapi vs. non-uapi, so 
that it is easier to review and split again in case it is necessary, so it 
should be ok to keep this patch here - or if you prefer, drop it again from 
your queue for now, as it is better for you.

  Thomas