Skip to content

Commit e6d8afd

Browse files
huthDinh Nguyen
authored andcommitted
nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi 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, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. 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: Dinh Nguyen <[email protected]> Signed-off-by: Thomas Huth <[email protected]> Signed-off-by: Dinh Nguyen <[email protected]>
1 parent 331b05b commit e6d8afd

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

arch/nios2/include/asm/entry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef _ASM_NIOS2_ENTRY_H
1111
#define _ASM_NIOS2_ENTRY_H
1212

13-
#ifdef __ASSEMBLY__
13+
#ifdef __ASSEMBLER__
1414

1515
#include <asm/processor.h>
1616
#include <asm/registers.h>
@@ -117,5 +117,5 @@
117117
addi sp, sp, SWITCH_STACK_SIZE
118118
.endm
119119

120-
#endif /* __ASSEMBLY__ */
120+
#endif /* __ASSEMBLER__ */
121121
#endif /* _ASM_NIOS2_ENTRY_H */

arch/nios2/include/asm/page.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define PAGE_OFFSET \
2727
(CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_KERNEL_REGION_BASE)
2828

29-
#ifndef __ASSEMBLY__
29+
#ifndef __ASSEMBLER__
3030

3131
/*
3232
* This gives the physical RAM offset.
@@ -90,6 +90,6 @@ extern struct page *mem_map;
9090

9191
#include <asm-generic/getorder.h>
9292

93-
#endif /* !__ASSEMBLY__ */
93+
#endif /* !__ASSEMBLER__ */
9494

9595
#endif /* _ASM_NIOS2_PAGE_H */

arch/nios2/include/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/* Kuser helpers is mapped to this user space address */
3737
#define KUSER_BASE 0x1000
3838
#define KUSER_SIZE (PAGE_SIZE)
39-
#ifndef __ASSEMBLY__
39+
#ifndef __ASSEMBLER__
4040

4141
# define TASK_SIZE 0x7FFF0000UL
4242
# define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
@@ -72,6 +72,6 @@ extern unsigned long __get_wchan(struct task_struct *p);
7272

7373
#define cpu_relax() barrier()
7474

75-
#endif /* __ASSEMBLY__ */
75+
#endif /* __ASSEMBLER__ */
7676

7777
#endif /* _ASM_NIOS2_PROCESSOR_H */

arch/nios2/include/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/* This struct defines the way the registers are stored on the
1919
stack during a system call. */
2020

21-
#ifndef __ASSEMBLY__
21+
#ifndef __ASSEMBLER__
2222
struct pt_regs {
2323
unsigned long r8; /* r8-r15 Caller-saved GP registers */
2424
unsigned long r9;
@@ -78,5 +78,5 @@ extern void show_regs(struct pt_regs *);
7878

7979
int do_syscall_trace_enter(void);
8080
void do_syscall_trace_exit(void);
81-
#endif /* __ASSEMBLY__ */
81+
#endif /* __ASSEMBLER__ */
8282
#endif /* _ASM_NIOS2_PTRACE_H */

arch/nios2/include/asm/registers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_NIOS2_REGISTERS_H
77
#define _ASM_NIOS2_REGISTERS_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010
#include <asm/cpuinfo.h>
1111
#endif
1212

@@ -44,7 +44,7 @@
4444

4545
/* tlbmisc register bits */
4646
#define TLBMISC_PID_SHIFT 4
47-
#ifndef __ASSEMBLY__
47+
#ifndef __ASSEMBLER__
4848
#define TLBMISC_PID_MASK ((1UL << cpuinfo.tlb_pid_num_bits) - 1)
4949
#endif
5050
#define TLBMISC_WAY_MASK 0xf

arch/nios2/include/asm/setup.h

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

99
#include <asm-generic/setup.h>
1010

11-
#ifndef __ASSEMBLY__
11+
#ifndef __ASSEMBLER__
1212
#ifdef __KERNEL__
1313

1414
extern char exception_handler_hook[];
@@ -18,6 +18,6 @@ extern char fast_handler_end[];
1818
extern void pagetable_init(void);
1919

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

2323
#endif /* _ASM_NIOS2_SETUP_H */

arch/nios2/include/asm/thread_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define THREAD_SIZE_ORDER 1
2525
#define THREAD_SIZE 8192 /* 2 * PAGE_SIZE */
2626

27-
#ifndef __ASSEMBLY__
27+
#ifndef __ASSEMBLER__
2828

2929
/*
3030
* low level task data that entry.S needs immediate access to
@@ -61,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
6161

6262
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
6363
}
64-
#endif /* !__ASSEMBLY__ */
64+
#endif /* !__ASSEMBLER__ */
6565

6666
/*
6767
* thread information flags

arch/nios2/include/asm/traps.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#define TRAP_ID_SYSCALL 0
1414

15-
#ifndef __ASSEMBLY__
15+
#ifndef __ASSEMBLER__
1616
void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr);
1717
void do_page_fault(struct pt_regs *regs, unsigned long cause,
1818
unsigned long address);

0 commit comments

Comments
 (0)