Commit 8a141be3 authored by Thomas Huth's avatar Thomas Huth Committed by Ingo Molnar
Browse files

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: default avatarThomas Huth <thuth@redhat.com>
Signed-off-by: default avatarIngo 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
parent faa6f77b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */
+2 −2
Original line number Diff line number Diff line
@@ -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 */
+2 −2
Original line number Diff line number Diff line
@@ -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 */
+2 −2
Original line number Diff line number Diff line
@@ -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 */
+3 −3
Original line number Diff line number Diff line
@@ -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

Loading