On 14/03/2025 08.09, Thomas Huth wrote:
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: Vineet Gupta
Cc: linux-snps-arc@lists.infradead.org
Signed-off-by: Thomas Huth
---
arch/arc/include/asm/arcregs.h| 2 +-
arch/arc/include/asm/atomic.h | 4 ++--
arch/arc/include/asm/bitops.h | 4 ++--
arch/arc/include/asm/bug.h| 4 ++--
arch/arc/include/asm/cache.h | 4 ++--
arch/arc/include/asm/current.h| 4 ++--
arch/arc/include/asm/dsp-impl.h | 2 +-
arch/arc/include/asm/dsp.h| 4 ++--
arch/arc/include/asm/dwarf.h | 4 ++--
arch/arc/include/asm/entry.h | 4 ++--
arch/arc/include/asm/irqflags-arcv2.h | 4 ++--
arch/arc/include/asm/irqflags-compact.h | 4 ++--
arch/arc/include/asm/jump_label.h | 4 ++--
arch/arc/include/asm/linkage.h| 6 +++---
arch/arc/include/asm/mmu-arcv2.h | 4 ++--
arch/arc/include/asm/mmu.h| 2 +-
arch/arc/include/asm/page.h | 4 ++--
arch/arc/include/asm/pgtable-bits-arcv2.h | 4 ++--
arch/arc/include/asm/pgtable-levels.h | 4 ++--
arch/arc/include/asm/pgtable.h| 4 ++--
arch/arc/include/asm/processor.h | 4 ++--
arch/arc/include/asm/ptrace.h | 4 ++--
arch/arc/include/asm/switch_to.h | 2 +-
arch/arc/include/asm/thread_info.h| 4 ++--
24 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index 005d9e4d187a0..a31bbf5c8bbc8 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -144,7 +144,7 @@
#define ARC_AUX_AGU_MOD2 0x5E2
#define ARC_AUX_AGU_MOD3 0x5E3
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
index 592d7fffc223c..e615c42b93bab 100644
--- a/arch/arc/include/asm/atomic.h
+++ b/arch/arc/include/asm/atomic.h
@@ -6,7 +6,7 @@
#ifndef _ASM_ARC_ATOMIC_H
#define _ASM_ARC_ATOMIC_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
#include
@@ -31,6 +31,6 @@
#include
#endif
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif
diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
index f5a936496f060..5340c28713927 100644
--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -10,7 +10,7 @@
#error only can be included directly
#endif
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
#include
@@ -192,6 +192,6 @@ static inline __attribute__ ((const)) unsigned long
__ffs(unsigned long x)
#include
#include
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif
diff --git a/arch/arc/include/asm/bug.h b/arch/arc/include/asm/bug.h
index 4c453ba96c519..171c16021f709 100644
--- a/arch/arc/include/asm/bug.h
+++ b/arch/arc/include/asm/bug.h
@@ -6,7 +6,7 @@
#ifndef _ASM_ARC_BUG_H
#define _ASM_ARC_BUG_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
@@ -29,6 +29,6 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
#include
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif
diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h
index f0f1fc5d62b66..040a97f4dd829 100644
--- a/arch/arc/include/asm/cache.h
+++ b/arch/arc/include/asm/cache.h
@@ -23,7 +23,7 @@
*/
#define ARC_UNCACHED_ADDR_SPACE 0xc000
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include
@@ -65,7 +65,7 @@
extern int ioc_enable;
extern unsigned long perip_base, perip_end;
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
/* Instruction cache related Auxiliary registers */
#define ARC_REG_IC_BCR0x77/* Build Config reg */
diff --git a/arch/arc/include/asm/current.h b/arch/arc/include/asm/current.h
index 06be89f6f2f05..03ffd005f3fa6 100644
--- a/arch/arc/include/asm/current.h
+++ b/arch/arc/include/asm/current.h
@@ -9,7 +9,7 @@
#ifndef _ASM_ARC_CURRENT_H
#define _ASM_ARC_CURRENT_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#ifdef CONFIG_ARC_CURR_IN_REG
@@ -20,6 +20,6 @@ register struct task_struct *curr_arc asm("gp");
#include
#endif /* ! CONFIG_ARC_CURR_IN_REG */
-#endif /* ! __ASSEMBLY__ */
+#endif /* ! __ASSEMBLER__ */
#endif /* _ASM_ARC_CURRENT_H */
diff --git a/arch/arc/i