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

xtensa: 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: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250314071013.1575167-40-thuth@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

authored by

Thomas Huth and committed by
Max Filippov
44a4ef59 da787016

+37 -37
+1 -1
arch/xtensa/include/asm/bootparam.h
··· 27 27 #define BP_TAG_FIRST 0x7B0B /* first tag with a version number */ 28 28 #define BP_TAG_LAST 0x7E0B /* last tag */ 29 29 30 - #ifndef __ASSEMBLY__ 30 + #ifndef __ASSEMBLER__ 31 31 32 32 /* All records are aligned to 4 bytes */ 33 33
+2 -2
arch/xtensa/include/asm/cmpxchg.h
··· 11 11 #ifndef _XTENSA_CMPXCHG_H 12 12 #define _XTENSA_CMPXCHG_H 13 13 14 - #ifndef __ASSEMBLY__ 14 + #ifndef __ASSEMBLER__ 15 15 16 16 #include <linux/bits.h> 17 17 #include <linux/stringify.h> ··· 220 220 } 221 221 } 222 222 223 - #endif /* __ASSEMBLY__ */ 223 + #endif /* __ASSEMBLER__ */ 224 224 225 225 #endif /* _XTENSA_CMPXCHG_H */
+4 -4
arch/xtensa/include/asm/coprocessor.h
··· 16 16 #include <asm/core.h> 17 17 #include <asm/types.h> 18 18 19 - #ifdef __ASSEMBLY__ 19 + #ifdef __ASSEMBLER__ 20 20 # include <variant/tie-asm.h> 21 21 22 22 .macro xchal_sa_start a b ··· 69 69 70 70 71 71 72 - #endif /* __ASSEMBLY__ */ 72 + #endif /* __ASSEMBLER__ */ 73 73 74 74 /* 75 75 * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured. ··· 87 87 #define XTENSA_HAVE_IO_PORTS \ 88 88 XCHAL_CP_PORT_MASK 89 89 90 - #ifndef __ASSEMBLY__ 90 + #ifndef __ASSEMBLER__ 91 91 92 92 /* 93 93 * Additional registers. ··· 151 151 152 152 #endif /* XTENSA_HAVE_COPROCESSORS */ 153 153 154 - #endif /* !__ASSEMBLY__ */ 154 + #endif /* !__ASSEMBLER__ */ 155 155 #endif /* _XTENSA_COPROCESSOR_H */
+1 -1
arch/xtensa/include/asm/current.h
··· 13 13 14 14 #include <asm/thread_info.h> 15 15 16 - #ifndef __ASSEMBLY__ 16 + #ifndef __ASSEMBLER__ 17 17 18 18 #include <linux/thread_info.h> 19 19
+4 -4
arch/xtensa/include/asm/ftrace.h
··· 12 12 13 13 #include <asm/processor.h> 14 14 15 - #ifndef __ASSEMBLY__ 15 + #ifndef __ASSEMBLER__ 16 16 extern unsigned long return_address(unsigned level); 17 17 #define ftrace_return_address(n) return_address(n) 18 - #endif /* __ASSEMBLY__ */ 18 + #endif /* __ASSEMBLER__ */ 19 19 20 20 #ifdef CONFIG_FUNCTION_TRACER 21 21 22 22 #define MCOUNT_ADDR ((unsigned long)(_mcount)) 23 23 #define MCOUNT_INSN_SIZE 3 24 24 25 - #ifndef __ASSEMBLY__ 25 + #ifndef __ASSEMBLER__ 26 26 extern void _mcount(void); 27 27 #define mcount _mcount 28 - #endif /* __ASSEMBLY__ */ 28 + #endif /* __ASSEMBLER__ */ 29 29 #endif /* CONFIG_FUNCTION_TRACER */ 30 30 31 31 #endif /* _XTENSA_FTRACE_H */
+2 -2
arch/xtensa/include/asm/initialize_mmu.h
··· 34 34 #define CA_WRITEBACK (0x4) 35 35 #endif 36 36 37 - #ifdef __ASSEMBLY__ 37 + #ifdef __ASSEMBLER__ 38 38 39 39 #define XTENSA_HWVERSION_RC_2009_0 230000 40 40 ··· 240 240 241 241 .endm 242 242 243 - #endif /*__ASSEMBLY__*/ 243 + #endif /*__ASSEMBLER__*/ 244 244 245 245 #endif /* _XTENSA_INITIALIZE_MMU_H */
+2 -2
arch/xtensa/include/asm/jump_label.h
··· 4 4 #ifndef _ASM_XTENSA_JUMP_LABEL_H 5 5 #define _ASM_XTENSA_JUMP_LABEL_H 6 6 7 - #ifndef __ASSEMBLY__ 7 + #ifndef __ASSEMBLER__ 8 8 9 9 #include <linux/types.h> 10 10 ··· 61 61 jump_label_t key; 62 62 }; 63 63 64 - #endif /* __ASSEMBLY__ */ 64 + #endif /* __ASSEMBLER__ */ 65 65 #endif
+1 -1
arch/xtensa/include/asm/kasan.h
··· 2 2 #ifndef __ASM_KASAN_H 3 3 #define __ASM_KASAN_H 4 4 5 - #ifndef __ASSEMBLY__ 5 + #ifndef __ASSEMBLER__ 6 6 7 7 #ifdef CONFIG_KASAN 8 8
+1 -1
arch/xtensa/include/asm/kmem_layout.h
··· 80 80 81 81 #if (!XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY) && defined(CONFIG_USE_OF) 82 82 #define XCHAL_KIO_PADDR xtensa_get_kio_paddr() 83 - #ifndef __ASSEMBLY__ 83 + #ifndef __ASSEMBLER__ 84 84 extern unsigned long xtensa_kio_paddr; 85 85 86 86 static inline unsigned long xtensa_get_kio_paddr(void)
+2 -2
arch/xtensa/include/asm/page.h
··· 80 80 #endif 81 81 82 82 83 - #ifdef __ASSEMBLY__ 83 + #ifdef __ASSEMBLER__ 84 84 85 85 #define __pgprot(x) (x) 86 86 ··· 172 172 #define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT) 173 173 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 174 174 175 - #endif /* __ASSEMBLY__ */ 175 + #endif /* __ASSEMBLER__ */ 176 176 177 177 #include <asm-generic/memory_model.h> 178 178 #endif /* _XTENSA_PAGE_H */
+4 -4
arch/xtensa/include/asm/pgtable.h
··· 203 203 * What follows is the closest we can get by reasonable means.. 204 204 * See linux/mm/mmap.c for protection_map[] array that uses these definitions. 205 205 */ 206 - #ifndef __ASSEMBLY__ 206 + #ifndef __ASSEMBLER__ 207 207 208 208 #define pte_ERROR(e) \ 209 209 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) ··· 372 372 return pte; 373 373 } 374 374 375 - #endif /* !defined (__ASSEMBLY__) */ 375 + #endif /* !defined (__ASSEMBLER__) */ 376 376 377 377 378 - #ifdef __ASSEMBLY__ 378 + #ifdef __ASSEMBLER__ 379 379 380 380 /* Assembly macro _PGD_INDEX is the same as C pgd_index(unsigned long), 381 381 * _PGD_OFFSET as C pgd_offset(struct mm_struct*, unsigned long), ··· 414 414 unsigned long address, pte_t *ptep, unsigned int nr); 415 415 #define update_mmu_tlb_range update_mmu_tlb_range 416 416 417 - #endif /* !defined (__ASSEMBLY__) */ 417 + #endif /* !defined (__ASSEMBLER__) */ 418 418 419 419 #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG 420 420 #define __HAVE_ARCH_PTEP_GET_AND_CLEAR
+2 -2
arch/xtensa/include/asm/processor.h
··· 105 105 #error Unsupported xtensa ABI 106 106 #endif 107 107 108 - #ifndef __ASSEMBLY__ 108 + #ifndef __ASSEMBLER__ 109 109 110 110 #if defined(__XTENSA_WINDOWED_ABI__) 111 111 ··· 263 263 264 264 #endif /* XCHAL_HAVE_EXTERN_REGS */ 265 265 266 - #endif /* __ASSEMBLY__ */ 266 + #endif /* __ASSEMBLER__ */ 267 267 #endif /* _XTENSA_PROCESSOR_H */
+3 -3
arch/xtensa/include/asm/ptrace.h
··· 41 41 42 42 #define NO_SYSCALL (-1) 43 43 44 - #ifndef __ASSEMBLY__ 44 + #ifndef __ASSEMBLER__ 45 45 46 46 #include <asm/coprocessor.h> 47 47 #include <asm/core.h> ··· 109 109 int do_syscall_trace_enter(struct pt_regs *regs); 110 110 void do_syscall_trace_leave(struct pt_regs *regs); 111 111 112 - #else /* __ASSEMBLY__ */ 112 + #else /* __ASSEMBLER__ */ 113 113 114 114 # include <asm/asm-offsets.h> 115 115 #define PT_REGS_OFFSET (KERNEL_STACK_SIZE - PT_USER_SIZE) 116 116 117 - #endif /* !__ASSEMBLY__ */ 117 + #endif /* !__ASSEMBLER__ */ 118 118 119 119 #endif /* _XTENSA_PTRACE_H */
+2 -2
arch/xtensa/include/asm/signal.h
··· 14 14 15 15 #include <uapi/asm/signal.h> 16 16 17 - #ifndef __ASSEMBLY__ 17 + #ifndef __ASSEMBLER__ 18 18 #define __ARCH_HAS_SA_RESTORER 19 19 20 20 #include <asm/sigcontext.h> 21 21 22 - #endif /* __ASSEMBLY__ */ 22 + #endif /* __ASSEMBLER__ */ 23 23 #endif /* _XTENSA_SIGNAL_H */
+4 -4
arch/xtensa/include/asm/thread_info.h
··· 16 16 17 17 #define CURRENT_SHIFT KERNEL_STACK_SHIFT 18 18 19 - #ifndef __ASSEMBLY__ 19 + #ifndef __ASSEMBLER__ 20 20 # include <asm/processor.h> 21 21 #endif 22 22 ··· 28 28 * must also be changed 29 29 */ 30 30 31 - #ifndef __ASSEMBLY__ 31 + #ifndef __ASSEMBLER__ 32 32 33 33 #if XTENSA_HAVE_COPROCESSORS 34 34 ··· 80 80 * macros/functions for gaining access to the thread information structure 81 81 */ 82 82 83 - #ifndef __ASSEMBLY__ 83 + #ifndef __ASSEMBLER__ 84 84 85 85 #define INIT_THREAD_INFO(tsk) \ 86 86 { \ ··· 99 99 return ti; 100 100 } 101 101 102 - #else /* !__ASSEMBLY__ */ 102 + #else /* !__ASSEMBLER__ */ 103 103 104 104 /* how to get the thread information struct from ASM */ 105 105 #define GET_THREAD_INFO(reg,sp) \
+2 -2
arch/xtensa/include/asm/tlbflush.h
··· 20 20 #define ITLB_HIT_BIT 3 21 21 #define DTLB_HIT_BIT 4 22 22 23 - #ifndef __ASSEMBLY__ 23 + #ifndef __ASSEMBLER__ 24 24 25 25 /* TLB flushing: 26 26 * ··· 201 201 return tmp; 202 202 } 203 203 204 - #endif /* __ASSEMBLY__ */ 204 + #endif /* __ASSEMBLER__ */ 205 205 #endif /* _XTENSA_TLBFLUSH_H */