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

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 <dinguyen@kernel.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>

authored by

Thomas Huth and committed by
Dinh Nguyen
e6d8afd2 331b05b1

+15 -15
+2 -2
arch/nios2/include/asm/entry.h
··· 10 10 #ifndef _ASM_NIOS2_ENTRY_H 11 11 #define _ASM_NIOS2_ENTRY_H 12 12 13 - #ifdef __ASSEMBLY__ 13 + #ifdef __ASSEMBLER__ 14 14 15 15 #include <asm/processor.h> 16 16 #include <asm/registers.h> ··· 117 117 addi sp, sp, SWITCH_STACK_SIZE 118 118 .endm 119 119 120 - #endif /* __ASSEMBLY__ */ 120 + #endif /* __ASSEMBLER__ */ 121 121 #endif /* _ASM_NIOS2_ENTRY_H */
+2 -2
arch/nios2/include/asm/page.h
··· 26 26 #define PAGE_OFFSET \ 27 27 (CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_KERNEL_REGION_BASE) 28 28 29 - #ifndef __ASSEMBLY__ 29 + #ifndef __ASSEMBLER__ 30 30 31 31 /* 32 32 * This gives the physical RAM offset. ··· 90 90 91 91 #include <asm-generic/getorder.h> 92 92 93 - #endif /* !__ASSEMBLY__ */ 93 + #endif /* !__ASSEMBLER__ */ 94 94 95 95 #endif /* _ASM_NIOS2_PAGE_H */
+2 -2
arch/nios2/include/asm/processor.h
··· 36 36 /* Kuser helpers is mapped to this user space address */ 37 37 #define KUSER_BASE 0x1000 38 38 #define KUSER_SIZE (PAGE_SIZE) 39 - #ifndef __ASSEMBLY__ 39 + #ifndef __ASSEMBLER__ 40 40 41 41 # define TASK_SIZE 0x7FFF0000UL 42 42 # define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) ··· 72 72 73 73 #define cpu_relax() barrier() 74 74 75 - #endif /* __ASSEMBLY__ */ 75 + #endif /* __ASSEMBLER__ */ 76 76 77 77 #endif /* _ASM_NIOS2_PROCESSOR_H */
+2 -2
arch/nios2/include/asm/ptrace.h
··· 18 18 /* This struct defines the way the registers are stored on the 19 19 stack during a system call. */ 20 20 21 - #ifndef __ASSEMBLY__ 21 + #ifndef __ASSEMBLER__ 22 22 struct pt_regs { 23 23 unsigned long r8; /* r8-r15 Caller-saved GP registers */ 24 24 unsigned long r9; ··· 78 78 79 79 int do_syscall_trace_enter(void); 80 80 void do_syscall_trace_exit(void); 81 - #endif /* __ASSEMBLY__ */ 81 + #endif /* __ASSEMBLER__ */ 82 82 #endif /* _ASM_NIOS2_PTRACE_H */
+2 -2
arch/nios2/include/asm/registers.h
··· 6 6 #ifndef _ASM_NIOS2_REGISTERS_H 7 7 #define _ASM_NIOS2_REGISTERS_H 8 8 9 - #ifndef __ASSEMBLY__ 9 + #ifndef __ASSEMBLER__ 10 10 #include <asm/cpuinfo.h> 11 11 #endif 12 12 ··· 44 44 45 45 /* tlbmisc register bits */ 46 46 #define TLBMISC_PID_SHIFT 4 47 - #ifndef __ASSEMBLY__ 47 + #ifndef __ASSEMBLER__ 48 48 #define TLBMISC_PID_MASK ((1UL << cpuinfo.tlb_pid_num_bits) - 1) 49 49 #endif 50 50 #define TLBMISC_WAY_MASK 0xf
+2 -2
arch/nios2/include/asm/setup.h
··· 8 8 9 9 #include <asm-generic/setup.h> 10 10 11 - #ifndef __ASSEMBLY__ 11 + #ifndef __ASSEMBLER__ 12 12 #ifdef __KERNEL__ 13 13 14 14 extern char exception_handler_hook[]; ··· 18 18 extern void pagetable_init(void); 19 19 20 20 #endif/* __KERNEL__ */ 21 - #endif /* __ASSEMBLY__ */ 21 + #endif /* __ASSEMBLER__ */ 22 22 23 23 #endif /* _ASM_NIOS2_SETUP_H */
+2 -2
arch/nios2/include/asm/thread_info.h
··· 24 24 #define THREAD_SIZE_ORDER 1 25 25 #define THREAD_SIZE 8192 /* 2 * PAGE_SIZE */ 26 26 27 - #ifndef __ASSEMBLY__ 27 + #ifndef __ASSEMBLER__ 28 28 29 29 /* 30 30 * low level task data that entry.S needs immediate access to ··· 61 61 62 62 return (struct thread_info *)(sp & ~(THREAD_SIZE - 1)); 63 63 } 64 - #endif /* !__ASSEMBLY__ */ 64 + #endif /* !__ASSEMBLER__ */ 65 65 66 66 /* 67 67 * thread information flags
+1 -1
arch/nios2/include/asm/traps.h
··· 12 12 13 13 #define TRAP_ID_SYSCALL 0 14 14 15 - #ifndef __ASSEMBLY__ 15 + #ifndef __ASSEMBLER__ 16 16 void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr); 17 17 void do_page_fault(struct pt_regs *regs, unsigned long cause, 18 18 unsigned long address);