Skip to content

Commit 8a141be

Browse files
huthIngo Molnar
authored andcommitted
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
1 parent faa6f77 commit 8a141be

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

arch/x86/include/uapi/asm/bootparam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define XLF_5LEVEL_ENABLED (1<<6)
2727
#define XLF_MEM_ENCRYPTION (1<<7)
2828

29-
#ifndef __ASSEMBLY__
29+
#ifndef __ASSEMBLER__
3030

3131
#include <linux/types.h>
3232
#include <linux/screen_info.h>
@@ -210,6 +210,6 @@ enum x86_hardware_subarch {
210210
X86_NR_SUBARCHS,
211211
};
212212

213-
#endif /* __ASSEMBLY__ */
213+
#endif /* __ASSEMBLER__ */
214214

215215
#endif /* _ASM_X86_BOOTPARAM_H */

arch/x86/include/uapi/asm/e820.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
*/
5555
#define E820_RESERVED_KERN 128
5656

57-
#ifndef __ASSEMBLY__
57+
#ifndef __ASSEMBLER__
5858
#include <linux/types.h>
5959
struct e820entry {
6060
__u64 addr; /* start of memory segment */
@@ -76,7 +76,7 @@ struct e820map {
7676
#define BIOS_ROM_BASE 0xffe00000
7777
#define BIOS_ROM_END 0xffffffff
7878

79-
#endif /* __ASSEMBLY__ */
79+
#endif /* __ASSEMBLER__ */
8080

8181

8282
#endif /* _UAPI_ASM_X86_E820_H */

arch/x86/include/uapi/asm/ldt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/* The size of each LDT entry. */
1313
#define LDT_ENTRY_SIZE 8
1414

15-
#ifndef __ASSEMBLY__
15+
#ifndef __ASSEMBLER__
1616
/*
1717
* Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
1818
* not to the default values if you still want to do syscalls. This
@@ -44,5 +44,5 @@ struct user_desc {
4444
#define MODIFY_LDT_CONTENTS_STACK 1
4545
#define MODIFY_LDT_CONTENTS_CODE 2
4646

47-
#endif /* !__ASSEMBLY__ */
47+
#endif /* !__ASSEMBLER__ */
4848
#endif /* _ASM_X86_LDT_H */

arch/x86/include/uapi/asm/msr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#ifndef _UAPI_ASM_X86_MSR_H
33
#define _UAPI_ASM_X86_MSR_H
44

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66

77
#include <linux/types.h>
88
#include <linux/ioctl.h>
99

1010
#define X86_IOC_RDMSR_REGS _IOWR('c', 0xA0, __u32[8])
1111
#define X86_IOC_WRMSR_REGS _IOWR('c', 0xA1, __u32[8])
1212

13-
#endif /* __ASSEMBLY__ */
13+
#endif /* __ASSEMBLER__ */
1414
#endif /* _UAPI_ASM_X86_MSR_H */

arch/x86/include/uapi/asm/ptrace-abi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#else /* __i386__ */
2727

28-
#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
28+
#if defined(__ASSEMBLER__) || defined(__FRAME_OFFSETS)
2929
/*
3030
* C ABI says these regs are callee-preserved. They aren't saved on kernel entry
3131
* unless syscall needs a complete, fully filled "struct pt_regs".
@@ -57,7 +57,7 @@
5757
#define EFLAGS 144
5858
#define RSP 152
5959
#define SS 160
60-
#endif /* __ASSEMBLY__ */
60+
#endif /* __ASSEMBLER__ */
6161

6262
/* top of stack page */
6363
#define FRAME_SIZE 168
@@ -87,7 +87,7 @@
8787

8888
#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
8989

90-
#ifndef __ASSEMBLY__
90+
#ifndef __ASSEMBLER__
9191
#include <linux/types.h>
9292
#endif
9393

arch/x86/include/uapi/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <asm/processor-flags.h>
88

99

10-
#ifndef __ASSEMBLY__
10+
#ifndef __ASSEMBLER__
1111

1212
#ifdef __i386__
1313
/* this struct defines the way the registers are stored on the
@@ -81,6 +81,6 @@ struct pt_regs {
8181

8282

8383

84-
#endif /* !__ASSEMBLY__ */
84+
#endif /* !__ASSEMBLER__ */
8585

8686
#endif /* _UAPI_ASM_X86_PTRACE_H */

arch/x86/include/uapi/asm/setup_data.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define SETUP_INDIRECT (1<<31)
1919
#define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT)
2020

21-
#ifndef __ASSEMBLY__
21+
#ifndef __ASSEMBLER__
2222

2323
#include <linux/types.h>
2424

@@ -78,6 +78,6 @@ struct ima_setup_data {
7878
__u64 size;
7979
} __attribute__((packed));
8080

81-
#endif /* __ASSEMBLY__ */
81+
#endif /* __ASSEMBLER__ */
8282

8383
#endif /* _UAPI_ASM_X86_SETUP_DATA_H */

arch/x86/include/uapi/asm/signal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _UAPI_ASM_X86_SIGNAL_H
33
#define _UAPI_ASM_X86_SIGNAL_H
44

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66
#include <linux/types.h>
77
#include <linux/compiler.h>
88

@@ -16,7 +16,7 @@ struct siginfo;
1616
typedef unsigned long sigset_t;
1717

1818
#endif /* __KERNEL__ */
19-
#endif /* __ASSEMBLY__ */
19+
#endif /* __ASSEMBLER__ */
2020

2121

2222
#define SIGHUP 1
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
6868

6969
#include <asm-generic/signal-defs.h>
7070

71-
#ifndef __ASSEMBLY__
71+
#ifndef __ASSEMBLER__
7272

7373

7474
# ifndef __KERNEL__
@@ -106,6 +106,6 @@ typedef struct sigaltstack {
106106
__kernel_size_t ss_size;
107107
} stack_t;
108108

109-
#endif /* __ASSEMBLY__ */
109+
#endif /* __ASSEMBLER__ */
110110

111111
#endif /* _UAPI_ASM_X86_SIGNAL_H */

0 commit comments

Comments
 (0)