Skip to content

Commit fc9ed2f

Browse files
huthjmberg-intel
authored andcommitted
um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, so let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This is a completely mechanical patch (done with a simple "sed -i" statement). Cc: Richard Weinberger <[email protected]> Cc: Anton Ivanov <[email protected]> Cc: Johannes Berg <[email protected]> Cc: [email protected] Signed-off-by: Thomas Huth <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent f7e9077 commit fc9ed2f

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

arch/um/include/asm/cpufeature.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <asm/processor.h>
66

7-
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
7+
#if defined(__KERNEL__) && !defined(__ASSEMBLER__)
88

99
#include <asm/asm.h>
1010
#include <linux/bitops.h>
@@ -137,5 +137,5 @@ static __always_inline bool _static_cpu_has(u16 bit)
137137
#define CPU_FEATURE_TYPEVAL boot_cpu_data.x86_vendor, boot_cpu_data.x86, \
138138
boot_cpu_data.x86_model
139139

140-
#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
140+
#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */
141141
#endif /* _ASM_UM_CPUFEATURE_H */

arch/um/include/asm/current.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <linux/compiler.h>
66
#include <linux/threads.h>
77

8-
#ifndef __ASSEMBLY__
8+
#ifndef __ASSEMBLER__
99

1010
struct task_struct;
1111
extern struct task_struct *cpu_tasks[NR_CPUS];
@@ -18,6 +18,6 @@ static __always_inline struct task_struct *get_current(void)
1818

1919
#define current get_current()
2020

21-
#endif /* __ASSEMBLY__ */
21+
#endif /* __ASSEMBLER__ */
2222

2323
#endif /* __ASM_CURRENT_H */

arch/um/include/asm/page.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <vdso/page.h>
1313

14-
#ifndef __ASSEMBLY__
14+
#ifndef __ASSEMBLER__
1515

1616
struct page;
1717

@@ -94,7 +94,7 @@ extern unsigned long uml_physmem;
9494
#include <asm-generic/memory_model.h>
9595
#include <asm-generic/getorder.h>
9696

97-
#endif /* __ASSEMBLY__ */
97+
#endif /* __ASSEMBLER__ */
9898

9999
#ifdef CONFIG_X86_32
100100
#define __HAVE_ARCH_GATE_AREA 1

arch/um/include/asm/ptrace-generic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef __UM_PTRACE_GENERIC_H
77
#define __UM_PTRACE_GENERIC_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <sysdep/ptrace.h>
1212

arch/um/include/asm/thread_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
1010
#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
1111

12-
#ifndef __ASSEMBLY__
12+
#ifndef __ASSEMBLER__
1313

1414
#include <asm/types.h>
1515
#include <asm/page.h>

arch/um/include/shared/as-layout.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define STUB_DATA_PAGES 2 /* must be a power of two */
2727
#define STUB_END (STUB_DATA + STUB_DATA_PAGES * UM_KERN_PAGE_SIZE)
2828

29-
#ifndef __ASSEMBLY__
29+
#ifndef __ASSEMBLER__
3030

3131
#include <sysdep/ptrace.h>
3232

0 commit comments

Comments
 (0)