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

m68k: 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 almost a completely mechanical patch (done with a simple
"sed -i" statement), with one comment tweaked manually in
arch/m68k/include/asm/mac_baboon.h (which was missing underscores).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/20250611114056.118309-3-thuth@redhat.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

authored by

Thomas Huth and committed by
Geert Uytterhoeven
7164aacf 16eea8d2

+64 -64
+2 -2
arch/m68k/include/asm/adb_iop.h
··· 33 33 #define ADB_IOP_SRQ 0x04 /* SRQ detected */ 34 34 #define ADB_IOP_TIMEOUT 0x02 /* nonzero if timeout */ 35 35 36 - #ifndef __ASSEMBLY__ 36 + #ifndef __ASSEMBLER__ 37 37 38 38 struct adb_iopmsg { 39 39 __u8 flags; /* ADB flags */ ··· 43 43 __u8 spare[21]; /* spare */ 44 44 }; 45 45 46 - #endif /* __ASSEMBLY__ */ 46 + #endif /* __ASSEMBLER__ */
+2 -2
arch/m68k/include/asm/bootinfo.h
··· 14 14 #include <uapi/asm/bootinfo.h> 15 15 16 16 17 - #ifndef __ASSEMBLY__ 17 + #ifndef __ASSEMBLER__ 18 18 19 19 #ifdef CONFIG_BOOTINFO_PROC 20 20 extern void save_bootinfo(const struct bi_record *bi); ··· 28 28 static inline void process_uboot_commandline(char *commandp, int size) {} 29 29 #endif 30 30 31 - #endif /* __ASSEMBLY__ */ 31 + #endif /* __ASSEMBLER__ */ 32 32 33 33 34 34 #endif /* _M68K_BOOTINFO_H */
+2 -2
arch/m68k/include/asm/entry.h
··· 4 4 5 5 #include <asm/setup.h> 6 6 #include <asm/page.h> 7 - #ifdef __ASSEMBLY__ 7 + #ifdef __ASSEMBLER__ 8 8 #include <asm/thread_info.h> 9 9 #endif 10 10 ··· 41 41 #define ALLOWINT (~0x700) 42 42 #endif /* machine compilation types */ 43 43 44 - #ifdef __ASSEMBLY__ 44 + #ifdef __ASSEMBLER__ 45 45 /* 46 46 * This defines the normal kernel pt-regs layout. 47 47 *
+2 -2
arch/m68k/include/asm/kexec.h
··· 15 15 16 16 #define KEXEC_ARCH KEXEC_ARCH_68K 17 17 18 - #ifndef __ASSEMBLY__ 18 + #ifndef __ASSEMBLER__ 19 19 20 20 static inline void crash_setup_regs(struct pt_regs *newregs, 21 21 struct pt_regs *oldregs) ··· 23 23 /* Dummy implementation for now */ 24 24 } 25 25 26 - #endif /* __ASSEMBLY__ */ 26 + #endif /* __ASSEMBLER__ */ 27 27 28 28 #endif /* CONFIG_KEXEC_CORE */ 29 29
+2 -2
arch/m68k/include/asm/mac_baboon.h
··· 5 5 6 6 #define BABOON_BASE (0x50F1A000) /* same as IDE controller base */ 7 7 8 - #ifndef __ASSEMBLY__ 8 + #ifndef __ASSEMBLER__ 9 9 10 10 struct baboon { 11 11 char pad1[208]; /* generic IDE registers, not used here */ ··· 36 36 extern void baboon_irq_enable(int); 37 37 extern void baboon_irq_disable(int); 38 38 39 - #endif /* __ASSEMBLY **/ 39 + #endif /* __ASSEMBLER__ */
+2 -2
arch/m68k/include/asm/mac_iop.h
··· 66 66 #define IOP_ADDR_ALIVE 0x031F 67 67 #define IOP_ADDR_RECV_MSG 0x0320 68 68 69 - #ifndef __ASSEMBLY__ 69 + #ifndef __ASSEMBLER__ 70 70 71 71 /* 72 72 * IOP Control registers, staggered because in usual Apple style they were ··· 163 163 164 164 extern void iop_register_interrupts(void); 165 165 166 - #endif /* __ASSEMBLY__ */ 166 + #endif /* __ASSEMBLER__ */
+2 -2
arch/m68k/include/asm/mac_oss.h
··· 59 59 60 60 #define OSS_POWEROFF 0x80 61 61 62 - #ifndef __ASSEMBLY__ 62 + #ifndef __ASSEMBLER__ 63 63 64 64 struct mac_oss { 65 65 __u8 irq_level[0x10]; /* [0x000-0x00f] Interrupt levels */ ··· 77 77 extern void oss_irq_enable(int); 78 78 extern void oss_irq_disable(int); 79 79 80 - #endif /* __ASSEMBLY__ */ 80 + #endif /* __ASSEMBLER__ */
+2 -2
arch/m68k/include/asm/mac_psc.h
··· 207 207 * Unknown, always 0x0000. 208 208 */ 209 209 210 - #ifndef __ASSEMBLY__ 210 + #ifndef __ASSEMBLER__ 211 211 212 212 extern volatile __u8 *psc; 213 213 ··· 249 249 return *((volatile __u32 *)(psc + offset)); 250 250 } 251 251 252 - #endif /* __ASSEMBLY__ */ 252 + #endif /* __ASSEMBLER__ */
+2 -2
arch/m68k/include/asm/mac_via.h
··· 250 250 #define IER_SET_BIT(b) (0x80 | (1<<(b)) ) 251 251 #define IER_CLR_BIT(b) (0x7F & (1<<(b)) ) 252 252 253 - #ifndef __ASSEMBLY__ 253 + #ifndef __ASSEMBLER__ 254 254 255 255 extern volatile __u8 *via1,*via2; 256 256 extern int rbv_present,via_alt_mapping; ··· 267 267 extern void via1_set_head(int); 268 268 extern int via2_scsi_drq_pending(void); 269 269 270 - #endif /* __ASSEMBLY__ */ 270 + #endif /* __ASSEMBLER__ */ 271 271 272 272 #endif /* _ASM_MAC_VIA_H_ */
+3 -3
arch/m68k/include/asm/math-emu.h
··· 67 67 #define PMUNIMPL (1<<PUNIMPL) 68 68 #define PMMOVEM (1<<PMOVEM) 69 69 70 - #ifndef __ASSEMBLY__ 70 + #ifndef __ASSEMBLER__ 71 71 72 72 #include <linux/kernel.h> 73 73 #include <linux/sched.h> ··· 127 127 128 128 #define FPDATA ((struct fp_data *)current->thread.fp) 129 129 130 - #else /* __ASSEMBLY__ */ 130 + #else /* __ASSEMBLER__ */ 131 131 132 132 #define FPDATA %a2 133 133 ··· 311 311 .endm 312 312 313 313 314 - #endif /* __ASSEMBLY__ */ 314 + #endif /* __ASSEMBLER__ */ 315 315 316 316 #endif /* _ASM_M68K_SETUP_H */
+2 -2
arch/m68k/include/asm/mcf_pgtable.h
··· 92 92 #define PTE_MASK PAGE_MASK 93 93 #define CF_PAGE_CHG_MASK (PTE_MASK | CF_PAGE_ACCESSED | CF_PAGE_DIRTY) 94 94 95 - #ifndef __ASSEMBLY__ 95 + #ifndef __ASSEMBLER__ 96 96 97 97 #define pmd_pgtable(pmd) pfn_to_virt(pmd_val(pmd) >> PAGE_SHIFT) 98 98 ··· 292 292 #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 293 293 #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) 294 294 295 - #endif /* !__ASSEMBLY__ */ 295 + #endif /* !__ASSEMBLER__ */ 296 296 #endif /* _MCF_PGTABLE_H */
+1 -1
arch/m68k/include/asm/mcfmmu.h
··· 88 88 #define MMUDR_PAN 10 /* Physical address */ 89 89 #define MMUDR_PAMASK 0xfffffc00 /* PA mask */ 90 90 91 - #ifndef __ASSEMBLY__ 91 + #ifndef __ASSEMBLER__ 92 92 93 93 /* 94 94 * Simple access functions for the MMU registers. Nothing fancy
+2 -2
arch/m68k/include/asm/motorola_pgtable.h
··· 44 44 /* We borrow bit 11 to store the exclusive marker in swap PTEs. */ 45 45 #define _PAGE_SWP_EXCLUSIVE 0x800 46 46 47 - #ifndef __ASSEMBLY__ 47 + #ifndef __ASSEMBLER__ 48 48 49 49 /* This is the cache mode to be used for pages containing page descriptors for 50 50 * processors >= '040. It is in pte_mknocache(), and the variable is defined ··· 202 202 return pte; 203 203 } 204 204 205 - #endif /* !__ASSEMBLY__ */ 205 + #endif /* !__ASSEMBLER__ */ 206 206 #endif /* _MOTOROLA_PGTABLE_H */
+2 -2
arch/m68k/include/asm/nettel.h
··· 38 38 39 39 #define NETtel_LEDADDR 0x30400000 40 40 41 - #ifndef __ASSEMBLY__ 41 + #ifndef __ASSEMBLER__ 42 42 43 43 extern volatile unsigned short ppdata; 44 44 ··· 80 80 #define MCFPP_DTR0 0x0040 81 81 #define MCFPP_DTR1 0x0000 /* Port 1 no DTR support */ 82 82 83 - #ifndef __ASSEMBLY__ 83 + #ifndef __ASSEMBLER__ 84 84 /* 85 85 * These functions defined to give quasi generic access to the 86 86 * PPIO bits used for DTR/DCD.
+2 -2
arch/m68k/include/asm/openprom.h
··· 21 21 #define LINUX_OPPROM_MAGIC 0x10010407 22 22 #endif 23 23 24 - #ifndef __ASSEMBLY__ 24 + #ifndef __ASSEMBLER__ 25 25 /* V0 prom device operations. */ 26 26 struct linux_dev_v0_funcs { 27 27 int (*v0_devopen)(char *device_str); ··· 308 308 unsigned int or_size; 309 309 }; 310 310 311 - #endif /* !(__ASSEMBLY__) */ 311 + #endif /* !(__ASSEMBLER__) */ 312 312 313 313 #endif /* !(__SPARC_OPENPROM_H) */
+2 -2
arch/m68k/include/asm/page.h
··· 10 10 11 11 #define PAGE_OFFSET (PAGE_OFFSET_RAW) 12 12 13 - #ifndef __ASSEMBLY__ 13 + #ifndef __ASSEMBLER__ 14 14 15 15 /* 16 16 * These are used to make use of C type-checking.. ··· 48 48 extern unsigned long _ramstart; 49 49 extern unsigned long _ramend; 50 50 51 - #endif /* !__ASSEMBLY__ */ 51 + #endif /* !__ASSEMBLER__ */ 52 52 53 53 #ifdef CONFIG_MMU 54 54 #include <asm/page_mm.h>
+2 -2
arch/m68k/include/asm/page_mm.h
··· 2 2 #ifndef _M68K_PAGE_MM_H 3 3 #define _M68K_PAGE_MM_H 4 4 5 - #ifndef __ASSEMBLY__ 5 + #ifndef __ASSEMBLER__ 6 6 7 7 #include <linux/compiler.h> 8 8 #include <asm/module.h> ··· 144 144 #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) 145 145 #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn)) 146 146 147 - #endif /* __ASSEMBLY__ */ 147 + #endif /* __ASSEMBLER__ */ 148 148 149 149 #endif /* _M68K_PAGE_MM_H */
+2 -2
arch/m68k/include/asm/page_no.h
··· 2 2 #ifndef _M68K_PAGE_NO_H 3 3 #define _M68K_PAGE_NO_H 4 4 5 - #ifndef __ASSEMBLY__ 5 + #ifndef __ASSEMBLER__ 6 6 7 7 extern unsigned long memory_start; 8 8 extern unsigned long memory_end; ··· 37 37 38 38 #define ARCH_PFN_OFFSET PHYS_PFN(PAGE_OFFSET_RAW) 39 39 40 - #endif /* __ASSEMBLY__ */ 40 + #endif /* __ASSEMBLER__ */ 41 41 42 42 #endif /* _M68K_PAGE_NO_H */
+1 -1
arch/m68k/include/asm/pgtable.h
··· 10 10 #include <asm/pgtable_mm.h> 11 11 #endif 12 12 13 - #ifndef __ASSEMBLY__ 13 + #ifndef __ASSEMBLER__ 14 14 extern void paging_init(void); 15 15 #endif 16 16
+4 -4
arch/m68k/include/asm/pgtable_mm.h
··· 11 11 12 12 #include <asm/setup.h> 13 13 14 - #ifndef __ASSEMBLY__ 14 + #ifndef __ASSEMBLER__ 15 15 #include <asm/processor.h> 16 16 #include <linux/sched.h> 17 17 #include <linux/threads.h> ··· 145 145 #define update_mmu_cache(vma, addr, ptep) \ 146 146 update_mmu_cache_range(NULL, vma, addr, ptep, 1) 147 147 148 - #endif /* !__ASSEMBLY__ */ 148 + #endif /* !__ASSEMBLER__ */ 149 149 150 150 /* MMU-specific headers */ 151 151 ··· 157 157 #include <asm/motorola_pgtable.h> 158 158 #endif 159 159 160 - #ifndef __ASSEMBLY__ 160 + #ifndef __ASSEMBLER__ 161 161 /* 162 162 * Macro to mark a page protection value as "uncacheable". 163 163 */ ··· 182 182 #define pgprot_dmacoherent(prot) pgprot_dmacoherent(prot) 183 183 184 184 #endif /* CONFIG_COLDFIRE */ 185 - #endif /* !__ASSEMBLY__ */ 185 + #endif /* !__ASSEMBLER__ */ 186 186 187 187 #endif /* _M68K_PGTABLE_H */
+2 -2
arch/m68k/include/asm/ptrace.h
··· 4 4 5 5 #include <uapi/asm/ptrace.h> 6 6 7 - #ifndef __ASSEMBLY__ 7 + #ifndef __ASSEMBLER__ 8 8 9 9 #ifndef PS_S 10 10 #define PS_S (0x2000) ··· 24 24 #define arch_has_block_step() (1) 25 25 #endif 26 26 27 - #endif /* __ASSEMBLY__ */ 27 + #endif /* __ASSEMBLER__ */ 28 28 #endif /* _M68K_PTRACE_H */
+5 -5
arch/m68k/include/asm/setup.h
··· 28 28 29 29 #define CL_SIZE COMMAND_LINE_SIZE 30 30 31 - #ifndef __ASSEMBLY__ 31 + #ifndef __ASSEMBLER__ 32 32 extern unsigned long m68k_machtype; 33 - #endif /* !__ASSEMBLY__ */ 33 + #endif /* !__ASSEMBLER__ */ 34 34 35 35 #if !defined(CONFIG_AMIGA) 36 36 # define MACH_IS_AMIGA (0) ··· 199 199 #endif 200 200 201 201 202 - #ifndef __ASSEMBLY__ 202 + #ifndef __ASSEMBLER__ 203 203 extern unsigned long m68k_cputype; 204 204 extern unsigned long m68k_fputype; 205 205 extern unsigned long m68k_mmutype; ··· 213 213 */ 214 214 215 215 extern int m68k_is040or060; 216 - #endif /* !__ASSEMBLY__ */ 216 + #endif /* !__ASSEMBLER__ */ 217 217 218 218 #if !defined(CONFIG_M68020) 219 219 # define CPU_IS_020 (0) ··· 321 321 322 322 #define NUM_MEMINFO 4 323 323 324 - #ifndef __ASSEMBLY__ 324 + #ifndef __ASSEMBLER__ 325 325 struct m68k_mem_info { 326 326 unsigned long addr; /* physical address of memory chunk */ 327 327 unsigned long size; /* length of memory chunk (in bytes) */
+4 -4
arch/m68k/include/asm/sun3_pgtable.h
··· 4 4 5 5 #include <asm/sun3mmu.h> 6 6 7 - #ifndef __ASSEMBLY__ 7 + #ifndef __ASSEMBLER__ 8 8 #include <asm/virtconvert.h> 9 9 #include <linux/linkage.h> 10 10 ··· 19 19 #define PTOV(addr) __va(addr) 20 20 21 21 22 - #endif /* !__ASSEMBLY__ */ 22 + #endif /* !__ASSEMBLER__ */ 23 23 24 24 /* These need to be defined for compatibility although the sun3 doesn't use them */ 25 25 #define _PAGE_NOCACHE030 0x040 ··· 74 74 /* We borrow bit 6 to store the exclusive marker in swap PTEs. */ 75 75 #define _PAGE_SWP_EXCLUSIVE 0x040 76 76 77 - #ifndef __ASSEMBLY__ 77 + #ifndef __ASSEMBLER__ 78 78 79 79 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 80 80 { ··· 186 186 return pte; 187 187 } 188 188 189 - #endif /* !__ASSEMBLY__ */ 189 + #endif /* !__ASSEMBLER__ */ 190 190 #endif /* !_SUN3_PGTABLE_H */
+2 -2
arch/m68k/include/asm/sun3mmu.h
··· 67 67 #define SUN3_BUSERR_PROTERR (0x40) 68 68 #define SUN3_BUSERR_INVALID (0x80) 69 69 70 - #ifndef __ASSEMBLY__ 70 + #ifndef __ASSEMBLER__ 71 71 72 72 /* Read bus error status register (implicitly clearing it). */ 73 73 static inline unsigned char sun3_get_buserr(void) ··· 167 167 168 168 extern int sun3_map_test(unsigned long addr, char *val); 169 169 170 - #endif /* !__ASSEMBLY__ */ 170 + #endif /* !__ASSEMBLER__ */ 171 171 172 172 #endif /* !__SUN3_MMU_H__ */
+3 -3
arch/m68k/include/asm/thread_info.h
··· 22 22 23 23 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) 24 24 25 - #ifndef __ASSEMBLY__ 25 + #ifndef __ASSEMBLER__ 26 26 27 27 struct thread_info { 28 28 struct task_struct *task; /* main task structure */ ··· 31 31 __u32 cpu; /* should always be 0 on m68k */ 32 32 unsigned long tp_value; /* thread pointer */ 33 33 }; 34 - #endif /* __ASSEMBLY__ */ 34 + #endif /* __ASSEMBLER__ */ 35 35 36 36 #define INIT_THREAD_INFO(tsk) \ 37 37 { \ ··· 39 39 .preempt_count = INIT_PREEMPT_COUNT, \ 40 40 } 41 41 42 - #ifndef __ASSEMBLY__ 42 + #ifndef __ASSEMBLER__ 43 43 /* how to get the thread information struct from C */ 44 44 static inline struct thread_info *current_thread_info(void) 45 45 {
+3 -3
arch/m68k/include/asm/traps.h
··· 11 11 #ifndef _M68K_TRAPS_H 12 12 #define _M68K_TRAPS_H 13 13 14 - #ifndef __ASSEMBLY__ 14 + #ifndef __ASSEMBLER__ 15 15 16 16 #include <linux/linkage.h> 17 17 #include <asm/ptrace.h> ··· 94 94 95 95 #define VECOFF(vec) ((vec)<<2) 96 96 97 - #ifndef __ASSEMBLY__ 97 + #ifndef __ASSEMBLER__ 98 98 99 99 /* Status register bits */ 100 100 #define PS_T (0x8000) ··· 271 271 asmlinkage void berr_040cleanup(struct frame *fp); 272 272 #endif 273 273 274 - #endif /* __ASSEMBLY__ */ 274 + #endif /* __ASSEMBLER__ */ 275 275 276 276 #endif /* _M68K_TRAPS_H */
+4 -4
arch/m68k/math-emu/fp_emu.h
··· 38 38 #ifndef _FP_EMU_H 39 39 #define _FP_EMU_H 40 40 41 - #ifdef __ASSEMBLY__ 41 + #ifdef __ASSEMBLER__ 42 42 #include <asm/asm-offsets.h> 43 43 #endif 44 44 #include <asm/math-emu.h> 45 45 46 - #ifndef __ASSEMBLY__ 46 + #ifndef __ASSEMBLER__ 47 47 48 48 #define IS_INF(a) ((a)->exp == 0x7fff) 49 49 #define IS_ZERO(a) ((a)->mant.m64 == 0) ··· 124 124 : "a1", "d1", "d2", "memory"); \ 125 125 }) 126 126 127 - #else /* __ASSEMBLY__ */ 127 + #else /* __ASSEMBLER__ */ 128 128 129 129 /* 130 130 * set, reset or clear a bit in the fp status register ··· 141 141 btst #(\bit&7),(FPD_FPSR+3-(\bit/8),FPDATA) 142 142 .endm 143 143 144 - #endif /* __ASSEMBLY__ */ 144 + #endif /* __ASSEMBLER__ */ 145 145 146 146 #endif /* _FP_EMU_H */