Skip to content

Commit 7164aac

Browse files
huthgeertu
authored andcommitted
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 <[email protected]> Acked-by: Greg Ungerer <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 16eea8d commit 7164aac

27 files changed

+64
-64
lines changed

arch/m68k/include/asm/adb_iop.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#define ADB_IOP_SRQ 0x04 /* SRQ detected */
3434
#define ADB_IOP_TIMEOUT 0x02 /* nonzero if timeout */
3535

36-
#ifndef __ASSEMBLY__
36+
#ifndef __ASSEMBLER__
3737

3838
struct adb_iopmsg {
3939
__u8 flags; /* ADB flags */
@@ -43,4 +43,4 @@ struct adb_iopmsg {
4343
__u8 spare[21]; /* spare */
4444
};
4545

46-
#endif /* __ASSEMBLY__ */
46+
#endif /* __ASSEMBLER__ */

arch/m68k/include/asm/bootinfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <uapi/asm/bootinfo.h>
1515

1616

17-
#ifndef __ASSEMBLY__
17+
#ifndef __ASSEMBLER__
1818

1919
#ifdef CONFIG_BOOTINFO_PROC
2020
extern void save_bootinfo(const struct bi_record *bi);
@@ -28,7 +28,7 @@ void process_uboot_commandline(char *commandp, int size);
2828
static inline void process_uboot_commandline(char *commandp, int size) {}
2929
#endif
3030

31-
#endif /* __ASSEMBLY__ */
31+
#endif /* __ASSEMBLER__ */
3232

3333

3434
#endif /* _M68K_BOOTINFO_H */

arch/m68k/include/asm/entry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <asm/setup.h>
66
#include <asm/page.h>
7-
#ifdef __ASSEMBLY__
7+
#ifdef __ASSEMBLER__
88
#include <asm/thread_info.h>
99
#endif
1010

@@ -41,7 +41,7 @@
4141
#define ALLOWINT (~0x700)
4242
#endif /* machine compilation types */
4343

44-
#ifdef __ASSEMBLY__
44+
#ifdef __ASSEMBLER__
4545
/*
4646
* This defines the normal kernel pt-regs layout.
4747
*

arch/m68k/include/asm/kexec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
#define KEXEC_ARCH KEXEC_ARCH_68K
1717

18-
#ifndef __ASSEMBLY__
18+
#ifndef __ASSEMBLER__
1919

2020
static inline void crash_setup_regs(struct pt_regs *newregs,
2121
struct pt_regs *oldregs)
2222
{
2323
/* Dummy implementation for now */
2424
}
2525

26-
#endif /* __ASSEMBLY__ */
26+
#endif /* __ASSEMBLER__ */
2727

2828
#endif /* CONFIG_KEXEC_CORE */
2929

arch/m68k/include/asm/mac_baboon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#define BABOON_BASE (0x50F1A000) /* same as IDE controller base */
77

8-
#ifndef __ASSEMBLY__
8+
#ifndef __ASSEMBLER__
99

1010
struct baboon {
1111
char pad1[208]; /* generic IDE registers, not used here */
@@ -36,4 +36,4 @@ extern void baboon_register_interrupts(void);
3636
extern void baboon_irq_enable(int);
3737
extern void baboon_irq_disable(int);
3838

39-
#endif /* __ASSEMBLY **/
39+
#endif /* __ASSEMBLER__ */

arch/m68k/include/asm/mac_iop.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define IOP_ADDR_ALIVE 0x031F
6767
#define IOP_ADDR_RECV_MSG 0x0320
6868

69-
#ifndef __ASSEMBLY__
69+
#ifndef __ASSEMBLER__
7070

7171
/*
7272
* IOP Control registers, staggered because in usual Apple style they were
@@ -163,4 +163,4 @@ extern void iop_ism_irq_poll(uint);
163163

164164
extern void iop_register_interrupts(void);
165165

166-
#endif /* __ASSEMBLY__ */
166+
#endif /* __ASSEMBLER__ */

arch/m68k/include/asm/mac_oss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
#define OSS_POWEROFF 0x80
6161

62-
#ifndef __ASSEMBLY__
62+
#ifndef __ASSEMBLER__
6363

6464
struct mac_oss {
6565
__u8 irq_level[0x10]; /* [0x000-0x00f] Interrupt levels */
@@ -77,4 +77,4 @@ extern void oss_register_interrupts(void);
7777
extern void oss_irq_enable(int);
7878
extern void oss_irq_disable(int);
7979

80-
#endif /* __ASSEMBLY__ */
80+
#endif /* __ASSEMBLER__ */

arch/m68k/include/asm/mac_psc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
* Unknown, always 0x0000.
208208
*/
209209

210-
#ifndef __ASSEMBLY__
210+
#ifndef __ASSEMBLER__
211211

212212
extern volatile __u8 *psc;
213213

@@ -249,4 +249,4 @@ static inline u32 psc_read_long(int offset)
249249
return *((volatile __u32 *)(psc + offset));
250250
}
251251

252-
#endif /* __ASSEMBLY__ */
252+
#endif /* __ASSEMBLER__ */

arch/m68k/include/asm/mac_via.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
#define IER_SET_BIT(b) (0x80 | (1<<(b)) )
251251
#define IER_CLR_BIT(b) (0x7F & (1<<(b)) )
252252

253-
#ifndef __ASSEMBLY__
253+
#ifndef __ASSEMBLER__
254254

255255
extern volatile __u8 *via1,*via2;
256256
extern int rbv_present,via_alt_mapping;
@@ -267,6 +267,6 @@ extern void via1_irq(struct irq_desc *desc);
267267
extern void via1_set_head(int);
268268
extern int via2_scsi_drq_pending(void);
269269

270-
#endif /* __ASSEMBLY__ */
270+
#endif /* __ASSEMBLER__ */
271271

272272
#endif /* _ASM_MAC_VIA_H_ */

arch/m68k/include/asm/math-emu.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#define PMUNIMPL (1<<PUNIMPL)
6868
#define PMMOVEM (1<<PMOVEM)
6969

70-
#ifndef __ASSEMBLY__
70+
#ifndef __ASSEMBLER__
7171

7272
#include <linux/kernel.h>
7373
#include <linux/sched.h>
@@ -127,7 +127,7 @@ extern unsigned int fp_debugprint;
127127

128128
#define FPDATA ((struct fp_data *)current->thread.fp)
129129

130-
#else /* __ASSEMBLY__ */
130+
#else /* __ASSEMBLER__ */
131131

132132
#define FPDATA %a2
133133

@@ -311,6 +311,6 @@ old_gas=old_gas+1
311311
.endm
312312

313313

314-
#endif /* __ASSEMBLY__ */
314+
#endif /* __ASSEMBLER__ */
315315

316316
#endif /* _ASM_M68K_SETUP_H */

0 commit comments

Comments
 (0)