]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers
authorThomas Huth <thuth@redhat.com>
Fri, 14 Mar 2025 07:09:36 +0000 (08:09 +0100)
committerVineet Gupta <vgupta@kernel.org>
Mon, 9 Jun 2025 16:18:12 +0000 (09:18 -0700)
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: linux-snps-arc@lists.infradead.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
24 files changed:
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/atomic.h
arch/arc/include/asm/bitops.h
arch/arc/include/asm/bug.h
arch/arc/include/asm/cache.h
arch/arc/include/asm/current.h
arch/arc/include/asm/dsp-impl.h
arch/arc/include/asm/dsp.h
arch/arc/include/asm/dwarf.h
arch/arc/include/asm/entry.h
arch/arc/include/asm/irqflags-arcv2.h
arch/arc/include/asm/irqflags-compact.h
arch/arc/include/asm/jump_label.h
arch/arc/include/asm/linkage.h
arch/arc/include/asm/mmu-arcv2.h
arch/arc/include/asm/mmu.h
arch/arc/include/asm/page.h
arch/arc/include/asm/pgtable-bits-arcv2.h
arch/arc/include/asm/pgtable-levels.h
arch/arc/include/asm/pgtable.h
arch/arc/include/asm/processor.h
arch/arc/include/asm/ptrace.h
arch/arc/include/asm/switch_to.h
arch/arc/include/asm/thread_info.h

index 005d9e4d187a0440246b131c1ee0852110336dc4..a31bbf5c8bbc8a18d1d90782d89460ce1cf575aa 100644 (file)
 #define ARC_AUX_AGU_MOD2       0x5E2
 #define ARC_AUX_AGU_MOD3       0x5E3
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <soc/arc/arc_aux.h>
 
index 592d7fffc223c923f4d63ccf27ad01fb9dc56e49..e615c42b93babd9496dbdb375d413cb90130d530 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_ATOMIC_H
 #define _ASM_ARC_ATOMIC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/compiler.h>
@@ -31,6 +31,6 @@
 #include <asm/atomic64-arcv2.h>
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
index f5a936496f06007b94ee08f4b88426f532604796..5340c287139276a4baead9b2aacbcc6a0272ec57 100644 (file)
@@ -10,7 +10,7 @@
 #error only <linux/bitops.h> can be included directly
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/compiler.h>
@@ -192,6 +192,6 @@ static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
 #include <asm-generic/bitops/le.h>
 #include <asm-generic/bitops/ext2-atomic-setbit.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
index 4c453ba96c51956a0314eaa87d0a92959c725e9a..171c16021f709663b8f78f8728b65d3ad0cdbe42 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_BUG_H
 #define _ASM_ARC_BUG_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/ptrace.h>
 
@@ -29,6 +29,6 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
 
 #include <asm-generic/bug.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
index f0f1fc5d62b662956a2dc42e70dae07f3cac17a3..040a97f4dd829dde90879ea8b9ad57f38cbcd767 100644 (file)
@@ -23,7 +23,7 @@
  */
 #define ARC_UNCACHED_ADDR_SPACE        0xc0000000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/build_bug.h>
 
@@ -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_BCR         0x77    /* Build Config reg */
index 06be89f6f2f052eb65fb76398d84e6fd77cd92c8..03ffd005f3fa6e10cb9ddfc16518f95a4fc61efa 100644 (file)
@@ -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 <asm-generic/current.h>
 #endif /* ! CONFIG_ARC_CURR_IN_REG */
 
-#endif /* ! __ASSEMBLY__ */
+#endif /* ! __ASSEMBLER__ */
 
 #endif /* _ASM_ARC_CURRENT_H */
index cd5636dfeb6f4119013ace57fa5662e129fe7947..fd5fdaad90c169819b93aa35358aced9feab2d93 100644 (file)
@@ -11,7 +11,7 @@
 
 #define DSP_CTRL_DISABLED_ALL          0
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 /* clobbers r5 register */
 .macro DSP_EARLY_INIT
index f496dbc4640b2461a7ca7696c21a19dcb6d2d6be..eeaaf4e4eabd31860cea96567f99cc121bb16613 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARC_DSP_H
 #define __ASM_ARC_DSP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * DSP-related saved registers - need to be saved only when you are
@@ -24,6 +24,6 @@ struct dsp_callee_regs {
 #endif
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_ARC_DSP_H */
index a0d5ebe1bc3f5f37280d9ff37ad3df4827af89fb..1524c5cf8b59e6aea8bda958c7e28650a5828d5a 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_DWARF_H
 #define _ASM_ARC_DWARF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #ifdef ARC_DW2_UNWIND_AS_CFI
 
@@ -38,6 +38,6 @@
 
 #endif /* !ARC_DW2_UNWIND_AS_CFI */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_ARC_DWARF_H */
index 38c35722cebf0312899bf8ac63562550a779dd4e..f453af251a1a1324cb1fc4e2db23d0bea9c29c53 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/processor.h>     /* For VMALLOC_START */
 #include <asm/mmu.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #ifdef CONFIG_ISA_ARCOMPACT
 #include <asm/entry-compact.h> /* ISA specific bits */
 
 #endif /* CONFIG_ARC_CURR_IN_REG */
 
-#else  /* !__ASSEMBLY__ */
+#else  /* !__ASSEMBLER__ */
 
 extern void do_signal(struct pt_regs *);
 extern void do_notify_resume(struct pt_regs *);
index fb3c21f1a2383d718857dfdd66da4fd3a8ccd2bf..30aea562f8aa6f3154548408ac486debcd336b91 100644 (file)
@@ -50,7 +50,7 @@
 #define ISA_INIT_STATUS_BITS   (STATUS_IE_MASK | __AD_ENB | \
                                        (ARCV2_IRQ_DEF_PRIO << 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Save IRQ state and disable IRQs
@@ -170,6 +170,6 @@ static inline void arc_softirq_clear(int irq)
        seti
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
index 936a2f21f315ed881ff9a972ac8e68d6d93170e2..85c2f6bcde0c1e7fa5d21f5f4eeeb129beff640e 100644 (file)
@@ -40,7 +40,7 @@
 
 #define ISA_INIT_STATUS_BITS   STATUS_IE_MASK
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /******************************************************************
  * IRQ Control Macros
@@ -196,6 +196,6 @@ static inline int arch_irqs_disabled(void)
        flag    \scratch
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
index a339223d9e052b35ea678d6a3e60faf6e5673671..66ead75784d973ba57cc39f6dc0b81a9ca16af1e 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _ASM_ARC_JUMP_LABEL_H
 #define _ASM_ARC_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/stringify.h>
 #include <linux/types.h>
@@ -68,5 +68,5 @@ struct jump_entry {
        jump_label_t key;
 };
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif
index 8a3fb71e9cfad2a31c92218611b6a7256e67e2f5..ba3cb65b5eaa44f63261099c4ed64d405cfd255b 100644 (file)
@@ -12,7 +12,7 @@
 #define __ALIGN                .align 4
 #define __ALIGN_STR    __stringify(__ALIGN)
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 .macro ST2 e, o, off
 #ifdef CONFIG_ARC_HAS_LL64
@@ -61,7 +61,7 @@
        CFI_ENDPROC ASM_NL      \
        .size name, .-name
 
-#else  /* !__ASSEMBLY__ */
+#else  /* !__ASSEMBLER__ */
 
 #ifdef CONFIG_ARC_HAS_ICCM
 #define __arcfp_code __section(".text.arcfp")
@@ -75,6 +75,6 @@
 #define __arcfp_data __section(".data")
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
index 41412642f27963f704b601896096737e689e27d5..5e5482026ac9007b2f6de080b7288de5d0092e04 100644 (file)
@@ -69,7 +69,7 @@
 
 #define PTE_BITS_NON_RWX_IN_PD1        (PAGE_MASK_PHYS | _PAGE_CACHEABLE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mm_struct;
 extern int pae40_exist_but_not_enab(void);
@@ -100,6 +100,6 @@ static inline void mmu_setup_pgd(struct mm_struct *mm, void *pgd)
        sr \reg, [ARC_REG_PID]
 .endm
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
index 4ae2db59d494cb7932f129a349aff16ca967dc3d..e3b35ceab582b626b6a13c2a393e84dd316c61d8 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_MMU_H
 #define _ASM_ARC_MMU_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/threads.h>     /* NR_CPUS */
 
index def0dfb95b4369710fa1aac67aa920893fcd92c8..9720fe6b2c24577ef1a12aab1184b957c72d8a20 100644 (file)
@@ -19,7 +19,7 @@
 
 #endif /* CONFIG_ARC_HAS_PAE40 */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define clear_page(paddr)              memset((paddr), 0, PAGE_SIZE)
 #define copy_user_page(to, from, vaddr, pg)    copy_page(to, from)
@@ -136,6 +136,6 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
 #include <asm-generic/memory_model.h>   /* page_to_pfn, pfn_to_page */
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
index 8ebec1b21d246e61aa688c152dba9b5e2e564104..a8fdb4fe1fbd64d4da6861cd39b0c03475acfb93 100644 (file)
@@ -75,7 +75,7 @@
  *     This is to enable COW mechanism
  */
        /* xwr */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define pte_write(pte)         (pte_val(pte) & _PAGE_WRITE)
 #define pte_dirty(pte)         (pte_val(pte) & _PAGE_DIRTY)
@@ -142,6 +142,6 @@ PTE_BIT_FUNC(swp_clear_exclusive, &= ~(_PAGE_SWP_EXCLUSIVE));
 #include <asm/hugepage.h>
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
index d1ce4b0f1071b69d794ba1375945ff4691434d7c..c8f9273372c073a2e42517ac0a62b5ea868b5da3 100644 (file)
@@ -85,7 +85,7 @@
 
 #define PTRS_PER_PTE           BIT(PMD_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if CONFIG_PGTABLE_LEVELS > 3
 #include <asm-generic/pgtable-nop4d.h>
 #define pmd_leaf(x)            (pmd_val(x) & _PAGE_HW_SZ)
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
index 4cf45a99fd792a5e1b528c96a610cfdd9120f14e..bd580e2b62d7c073ef82a9ed1a93755996b67643 100644 (file)
@@ -19,7 +19,7 @@
  */
 #define        USER_PTRS_PER_PGD       (TASK_SIZE / PGDIR_SIZE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern char empty_zero_page[PAGE_SIZE];
 #define ZERO_PAGE(vaddr)       (virt_to_page(empty_zero_page))
@@ -29,6 +29,6 @@ extern pgd_t swapper_pg_dir[] __aligned(PAGE_SIZE);
 /* to cope with aliasing VIPT cache */
 #define HAVE_ARCH_UNMAPPED_AREA
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
index d606658e2fe73149ef3afd35cd2e50b08f1d5edd..7f7901ac6643c395b08cd2d275753abd7f0d71f7 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARC_PROCESSOR_H
 #define __ASM_ARC_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/ptrace.h>
 #include <asm/dsp.h>
@@ -66,7 +66,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc,
 
 extern unsigned int __get_wchan(struct task_struct *p);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Default System Memory Map on ARC
index cf79df0b257053494fcc20ba48c6105828bd4318..f6c052af8f4d308000a1ede319be057f89731619 100644 (file)
@@ -10,7 +10,7 @@
 #include <uapi/asm/ptrace.h>
 #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef union {
        struct {
@@ -172,6 +172,6 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 extern int syscall_trace_enter(struct pt_regs *);
 extern void syscall_trace_exit(struct pt_regs *);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_PTRACE_H */
index 1f85de8288b17ba72d3f1f88fb9848ded86e8d0f..5806106a65f9016b270727f3ef8c121eab2a66fd 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_SWITCH_TO_H
 #define _ASM_ARC_SWITCH_TO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/sched.h>
 #include <asm/dsp-impl.h>
index 12daaf3a61eaf613dcbb259643107558092db1c2..255d2c7742190075c0207c1ba6ef7883bff666c6 100644 (file)
@@ -24,7 +24,7 @@
 #define THREAD_SIZE     (PAGE_SIZE << THREAD_SIZE_ORDER)
 #define THREAD_SHIFT   (PAGE_SHIFT << THREAD_SIZE_ORDER)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/thread_info.h>
 
@@ -62,7 +62,7 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
        return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * thread information flags