]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
authorThomas Huth <thuth@redhat.com>
Fri, 14 Mar 2025 07:09:52 +0000 (08:09 +0100)
committerDinh Nguyen <dinguyen@kernel.org>
Mon, 25 Aug 2025 10:50:28 +0000 (05:50 -0500)
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>
arch/nios2/include/asm/entry.h
arch/nios2/include/asm/page.h
arch/nios2/include/asm/processor.h
arch/nios2/include/asm/ptrace.h
arch/nios2/include/asm/registers.h
arch/nios2/include/asm/setup.h
arch/nios2/include/asm/thread_info.h
arch/nios2/include/asm/traps.h

index bafb7b2ca59fcb32a410cffd1666eb1c5e06d6bb..cb25ed56450ab98b989c33894f7912aa0946ec8c 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _ASM_NIOS2_ENTRY_H
 #define _ASM_NIOS2_ENTRY_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/processor.h>
 #include <asm/registers.h>
        addi    sp, sp, SWITCH_STACK_SIZE
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _ASM_NIOS2_ENTRY_H */
index 2897ec1b74f61857ea5d9e1c7462d3005ad84371..00a51623d38a545a4790cc8b2e6a532c72d76bfa 100644 (file)
@@ -26,7 +26,7 @@
 #define PAGE_OFFSET    \
        (CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_KERNEL_REGION_BASE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * This gives the physical RAM offset.
@@ -90,6 +90,6 @@ extern struct page *mem_map;
 
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_NIOS2_PAGE_H */
index eb44130364a9a16e4d6e32a64f1e99e8bff4d501..d9521c3c2df98e4d9e54060adeec8e8f4fb849f7 100644 (file)
@@ -36,7 +36,7 @@
 /* Kuser helpers is mapped to this user space address */
 #define KUSER_BASE             0x1000
 #define KUSER_SIZE             (PAGE_SIZE)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 # define TASK_SIZE             0x7FFF0000UL
 # define TASK_UNMAPPED_BASE    (PAGE_ALIGN(TASK_SIZE / 3))
@@ -72,6 +72,6 @@ extern unsigned long __get_wchan(struct task_struct *p);
 
 #define cpu_relax()    barrier()
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_NIOS2_PROCESSOR_H */
index 9da34c3022a272890bcfcee05a86b080bbdbb29f..96cbcd40c7ce56ceea01f6a5e151832949c2c707 100644 (file)
@@ -18,7 +18,7 @@
 /* This struct defines the way the registers are stored on the
    stack during a system call.  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct pt_regs {
        unsigned long  r8;      /* r8-r15 Caller-saved GP registers */
        unsigned long  r9;
@@ -78,5 +78,5 @@ extern void show_regs(struct pt_regs *);
 
 int do_syscall_trace_enter(void);
 void do_syscall_trace_exit(void);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _ASM_NIOS2_PTRACE_H */
index 95b67dd16f818866fb466ec27830371f3e2fcd00..165dab26221f2336b0b3a7918cc32063c68b50c0 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _ASM_NIOS2_REGISTERS_H
 #define _ASM_NIOS2_REGISTERS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/cpuinfo.h>
 #endif
 
@@ -44,7 +44,7 @@
 
 /* tlbmisc register bits */
 #define TLBMISC_PID_SHIFT      4
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define TLBMISC_PID_MASK       ((1UL << cpuinfo.tlb_pid_num_bits) - 1)
 #endif
 #define TLBMISC_WAY_MASK       0xf
index 908a1526d1bd78a9ad5c559d90cbd39747de9530..6d3f26a71cb51343b35bde6ad089a49399f352b4 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <asm-generic/setup.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef __KERNEL__
 
 extern char exception_handler_hook[];
@@ -18,6 +18,6 @@ extern char fast_handler_end[];
 extern void pagetable_init(void);
 
 #endif/* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_NIOS2_SETUP_H */
index 5abac9893b32b54e22d5b99ef9461a8b4723146d..83df79286d62eed49dee0e89d6e2c7bebf75120c 100644 (file)
@@ -24,7 +24,7 @@
 #define THREAD_SIZE_ORDER      1
 #define THREAD_SIZE            8192 /* 2 * PAGE_SIZE */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * low level task data that entry.S needs immediate access to
@@ -61,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
 
        return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
 }
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * thread information flags
index afd77bef01c65de5c8eb17b4b9c953b45ce91a26..133a3dedbc3e8d9010ae102c775f4892b1b3398e 100644 (file)
@@ -12,7 +12,7 @@
 
 #define TRAP_ID_SYSCALL                0
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr);
 void do_page_fault(struct pt_regs *regs, unsigned long cause,
                   unsigned long address);