Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Thomas Huth and committed by
Ingo Molnar
8a141be3 faa6f77b

+19 -19
+2 -2
arch/x86/include/uapi/asm/bootparam.h
··· 26 26 #define XLF_5LEVEL_ENABLED (1<<6) 27 27 #define XLF_MEM_ENCRYPTION (1<<7) 28 28 29 - #ifndef __ASSEMBLY__ 29 + #ifndef __ASSEMBLER__ 30 30 31 31 #include <linux/types.h> 32 32 #include <linux/screen_info.h> ··· 210 210 X86_NR_SUBARCHS, 211 211 }; 212 212 213 - #endif /* __ASSEMBLY__ */ 213 + #endif /* __ASSEMBLER__ */ 214 214 215 215 #endif /* _ASM_X86_BOOTPARAM_H */
+2 -2
arch/x86/include/uapi/asm/e820.h
··· 54 54 */ 55 55 #define E820_RESERVED_KERN 128 56 56 57 - #ifndef __ASSEMBLY__ 57 + #ifndef __ASSEMBLER__ 58 58 #include <linux/types.h> 59 59 struct e820entry { 60 60 __u64 addr; /* start of memory segment */ ··· 76 76 #define BIOS_ROM_BASE 0xffe00000 77 77 #define BIOS_ROM_END 0xffffffff 78 78 79 - #endif /* __ASSEMBLY__ */ 79 + #endif /* __ASSEMBLER__ */ 80 80 81 81 82 82 #endif /* _UAPI_ASM_X86_E820_H */
+2 -2
arch/x86/include/uapi/asm/ldt.h
··· 12 12 /* The size of each LDT entry. */ 13 13 #define LDT_ENTRY_SIZE 8 14 14 15 - #ifndef __ASSEMBLY__ 15 + #ifndef __ASSEMBLER__ 16 16 /* 17 17 * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS 18 18 * not to the default values if you still want to do syscalls. This ··· 44 44 #define MODIFY_LDT_CONTENTS_STACK 1 45 45 #define MODIFY_LDT_CONTENTS_CODE 2 46 46 47 - #endif /* !__ASSEMBLY__ */ 47 + #endif /* !__ASSEMBLER__ */ 48 48 #endif /* _ASM_X86_LDT_H */
+2 -2
arch/x86/include/uapi/asm/msr.h
··· 2 2 #ifndef _UAPI_ASM_X86_MSR_H 3 3 #define _UAPI_ASM_X86_MSR_H 4 4 5 - #ifndef __ASSEMBLY__ 5 + #ifndef __ASSEMBLER__ 6 6 7 7 #include <linux/types.h> 8 8 #include <linux/ioctl.h> ··· 10 10 #define X86_IOC_RDMSR_REGS _IOWR('c', 0xA0, __u32[8]) 11 11 #define X86_IOC_WRMSR_REGS _IOWR('c', 0xA1, __u32[8]) 12 12 13 - #endif /* __ASSEMBLY__ */ 13 + #endif /* __ASSEMBLER__ */ 14 14 #endif /* _UAPI_ASM_X86_MSR_H */
+3 -3
arch/x86/include/uapi/asm/ptrace-abi.h
··· 25 25 26 26 #else /* __i386__ */ 27 27 28 - #if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS) 28 + #if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS) 29 29 /* 30 30 * C ABI says these regs are callee-preserved. They aren't saved on kernel entry 31 31 * unless syscall needs a complete, fully filled "struct pt_regs". ··· 57 57 #define EFLAGS 144 58 58 #define RSP 152 59 59 #define SS 160 60 - #endif /* __ASSEMBLY__ */ 60 + #endif /* __ASSEMBLER__ */ 61 61 62 62 /* top of stack page */ 63 63 #define FRAME_SIZE 168 ··· 87 87 88 88 #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ 89 89 90 - #ifndef __ASSEMBLY__ 90 + #ifndef __ASSEMBLER__ 91 91 #include <linux/types.h> 92 92 #endif 93 93
+2 -2
arch/x86/include/uapi/asm/ptrace.h
··· 7 7 #include <asm/processor-flags.h> 8 8 9 9 10 - #ifndef __ASSEMBLY__ 10 + #ifndef __ASSEMBLER__ 11 11 12 12 #ifdef __i386__ 13 13 /* this struct defines the way the registers are stored on the ··· 81 81 82 82 83 83 84 - #endif /* !__ASSEMBLY__ */ 84 + #endif /* !__ASSEMBLER__ */ 85 85 86 86 #endif /* _UAPI_ASM_X86_PTRACE_H */
+2 -2
arch/x86/include/uapi/asm/setup_data.h
··· 18 18 #define SETUP_INDIRECT (1<<31) 19 19 #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) 20 20 21 - #ifndef __ASSEMBLY__ 21 + #ifndef __ASSEMBLER__ 22 22 23 23 #include <linux/types.h> 24 24 ··· 78 78 __u64 size; 79 79 } __attribute__((packed)); 80 80 81 - #endif /* __ASSEMBLY__ */ 81 + #endif /* __ASSEMBLER__ */ 82 82 83 83 #endif /* _UAPI_ASM_X86_SETUP_DATA_H */
+4 -4
arch/x86/include/uapi/asm/signal.h
··· 2 2 #ifndef _UAPI_ASM_X86_SIGNAL_H 3 3 #define _UAPI_ASM_X86_SIGNAL_H 4 4 5 - #ifndef __ASSEMBLY__ 5 + #ifndef __ASSEMBLER__ 6 6 #include <linux/types.h> 7 7 #include <linux/compiler.h> 8 8 ··· 16 16 typedef unsigned long sigset_t; 17 17 18 18 #endif /* __KERNEL__ */ 19 - #endif /* __ASSEMBLY__ */ 19 + #endif /* __ASSEMBLER__ */ 20 20 21 21 22 22 #define SIGHUP 1 ··· 68 68 69 69 #include <asm-generic/signal-defs.h> 70 70 71 - #ifndef __ASSEMBLY__ 71 + #ifndef __ASSEMBLER__ 72 72 73 73 74 74 # ifndef __KERNEL__ ··· 106 106 __kernel_size_t ss_size; 107 107 } stack_t; 108 108 109 - #endif /* __ASSEMBLY__ */ 109 + #endif /* __ASSEMBLER__ */ 110 110 111 111 #endif /* _UAPI_ASM_X86_SIGNAL_H */