]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
authorThomas Huth <thuth@redhat.com>
Fri, 14 Mar 2025 07:09:42 +0000 (08:09 +0100)
committerGuo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
Sun, 19 Oct 2025 06:54:51 +0000 (02:54 -0400)
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).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
arch/csky/abiv1/inc/abi/regdef.h
arch/csky/abiv2/inc/abi/regdef.h
arch/csky/include/asm/barrier.h
arch/csky/include/asm/cache.h
arch/csky/include/asm/ftrace.h
arch/csky/include/asm/jump_label.h
arch/csky/include/asm/page.h
arch/csky/include/asm/ptrace.h
arch/csky/include/asm/string.h
arch/csky/include/asm/thread_info.h

index 7b386fd6707025d3ac41e5c07ef8dea47c2d19ba..c75ecf2cafd7c9152a93440ccfe8ffb0a5a69884 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_REGDEF_H
 #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define syscallid      r1
 #else
 #define syscallid      "r1"
index 0933addbc27b75e7b3d9d19f43325c93e70ccca0..fc08d56ccdbe1f83ec19f63bd47e122a973c3613 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_REGDEF_H
 #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define syscallid      r7
 #else
 #define syscallid      "r7"
index 15de58b10aece7727bc73f7516b49e817f2fff9a..c33fdcfe3770c9f47d683344143934c3cebfa1b3 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_BARRIER_H
 #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define nop()  asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
 #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_CSKY_BARRIER_H */
index 4b5c09bf1d25e3a9b9720bd58f99effcdab09610..d575482e0fcecb3771a63ab2bd768b98e166b5d8 100644 (file)
@@ -10,7 +10,7 @@
 
 #define ARCH_DMA_MINALIGN      L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 void dcache_wb_line(unsigned long start);
 
index 00f9f7647e3f3c7789766f9d5bca76597082383c..21532f218058741d83a9ef6468fe393c776968cf 100644 (file)
@@ -11,7 +11,7 @@
 
 #define MCOUNT_ADDR    ((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
                           unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ASM_CSKY_FTRACE_H */
index ef2e37a10a0feb9af3543481cffddd75c5b3a8ef..603b0caa802494df505a46bbebe635ffdfc6e532 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_JUMP_LABEL_H
 #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
                                      enum jump_label_type type);
 #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif /* __ASM_CSKY_JUMP_LABEL_H */
index 4911d0892b71d7e2d1d4141e7190a866ccd8dec1..76774dbce869795aed84a387abf51a11b7014454 100644 (file)
@@ -26,7 +26,7 @@
 
 #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
 #include <asm-generic/memory_model.h>
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ASM_CSKY_PAGE_H */
index 0634b7895d81de360892cc58cd1c6f8182ce1448..5f01839e118434a2540d9d35b1f47390ab48693e 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/types.h>
 #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define PS_S   0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
 asmlinkage int syscall_trace_enter(struct pt_regs *regs);
 asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_CSKY_PTRACE_H */
index a0d81e9d6b8f64ab5ab1636b0311801493b93790..82e99f52b547c27e2bd008c8f51cee14de462ff9 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef _CSKY_STRING_MM_H_
 #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #include <linux/compiler.h>
 #include <abi/string.h>
index b5ed788f0c681464ca8bf26678d95fb7be9461bb..fdd4f8ad45acf662bdf168b0af4d4ec5e5dfd9bf 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef _ASM_CSKY_THREAD_INFO_H
 #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/types.h>
 #include <asm/page.h>
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
        return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define TIF_SIGPENDING         0       /* signal pending */
 #define TIF_NOTIFY_RESUME      1       /* callback before returning to user */