Skip to content

Commit 157f953

Browse files
huthtsbogend
authored andcommitted
mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembler code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. Defining such a macro was necessary in the early days of the kernel, since GCC only started providing __ASSEMBLER__ since version 3.0 in 2000 (see https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=f8f769ea4e69 ). However, having two macros can be very confusing nowadays for the developers when switching between userspace and kernelspace coding, or when dealing with uapi headers that should use __ASSEMBLER__ instead. So let's now standardize on the __ASSEMBLER__ macro that is provided by the compilers. This is almost a completely mechanical patch (done with a simple "sed -i" statement), with just one comment tweaked manually in arch/mips/include/asm/cpu.h (that was missing some underscores). Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: linux-mips@vger.kernel.org Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 21050b5 commit 157f953

53 files changed

Lines changed: 142 additions & 142 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arch/mips/include/asm/addrspace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/*
1616
* Configure language
1717
*/
18-
#ifdef __ASSEMBLY__
18+
#ifdef __ASSEMBLER__
1919
#define _ATYPE_
2020
#define _ATYPE32_
2121
#define _ATYPE64_
@@ -34,7 +34,7 @@
3434
/*
3535
* 32-bit MIPS address spaces
3636
*/
37-
#ifdef __ASSEMBLY__
37+
#ifdef __ASSEMBLER__
3838
#define _ACAST32_
3939
#define _ACAST64_
4040
#else

arch/mips/include/asm/asm-eva.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef __ASM_ASM_EVA_H
1111
#define __ASM_ASM_EVA_H
1212

13-
#ifndef __ASSEMBLY__
13+
#ifndef __ASSEMBLER__
1414

1515
/* Kernel variants */
1616

@@ -99,7 +99,7 @@
9999

100100
#endif /* CONFIG_EVA */
101101

102-
#else /* __ASSEMBLY__ */
102+
#else /* __ASSEMBLER__ */
103103

104104
#define kernel_cache(op, base) cache op, base
105105
#define kernel_pref(hint, base) pref hint, base
@@ -185,6 +185,6 @@
185185

186186
#endif /* CONFIG_EVA */
187187

188-
#endif /* __ASSEMBLY__ */
188+
#endif /* __ASSEMBLER__ */
189189

190190
#endif /* __ASM_ASM_EVA_H */

arch/mips/include/asm/asm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define CFI_SECTIONS
3838
#endif
3939

40-
#ifdef __ASSEMBLY__
40+
#ifdef __ASSEMBLER__
4141
/*
4242
* LEAF - declare leaf routine
4343
*/
@@ -123,7 +123,7 @@ symbol = value
123123
#define ASM_PRINT(string)
124124
#endif
125125

126-
#endif /* __ASSEMBLY__ */
126+
#endif /* __ASSEMBLER__ */
127127

128128
/*
129129
* Stack alignment
@@ -228,7 +228,7 @@ symbol = value
228228
#define LONG_INS ins
229229
#define LONG_EXT ext
230230

231-
#ifdef __ASSEMBLY__
231+
#ifdef __ASSEMBLER__
232232
#define LONG .word
233233
#endif
234234
#define LONGSIZE 4
@@ -257,7 +257,7 @@ symbol = value
257257
#define LONG_INS dins
258258
#define LONG_EXT dext
259259

260-
#ifdef __ASSEMBLY__
260+
#ifdef __ASSEMBLER__
261261
#define LONG .dword
262262
#endif
263263
#define LONGSIZE 8

arch/mips/include/asm/bmips.h

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

4343
#define ZSCM_REG_BASE 0x97000000
4444

45-
#if !defined(__ASSEMBLY__)
45+
#if !defined(__ASSEMBLER__)
4646

4747
#include <linux/cpumask.h>
4848
#include <asm/r4kcache.h>
@@ -124,6 +124,6 @@ static inline void bmips_write_zscm_reg(unsigned int offset, unsigned long data)
124124
barrier();
125125
}
126126

127-
#endif /* !defined(__ASSEMBLY__) */
127+
#endif /* !defined(__ASSEMBLER__) */
128128

129129
#endif /* _ASM_BMIPS_H */

arch/mips/include/asm/cpu.h

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

289289
#define FPIR_IMP_NONE 0x0000
290290

291-
#if !defined(__ASSEMBLY__)
291+
#if !defined(__ASSEMBLER__)
292292

293293
enum cpu_type_enum {
294294
CPU_UNKNOWN,
@@ -329,7 +329,7 @@ enum cpu_type_enum {
329329
CPU_LAST
330330
};
331331

332-
#endif /* !__ASSEMBLY */
332+
#endif /* !__ASSEMBLER__ */
333333

334334
/*
335335
* ISA Level encodings

arch/mips/include/asm/dec/ecc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define KN0X_ESR_SYNLO (0x7f<<0) /* syndrome from ECC logic */
3838

3939

40-
#ifndef __ASSEMBLY__
40+
#ifndef __ASSEMBLER__
4141

4242
#include <linux/interrupt.h>
4343

arch/mips/include/asm/dec/interrupts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
#define DEC_CPU_IRQ_ALL (0xff << CAUSEB_IP)
9696

9797

98-
#ifndef __ASSEMBLY__
98+
#ifndef __ASSEMBLER__
9999

100100
/*
101101
* Interrupt table structures to hide differences between systems.
@@ -121,6 +121,6 @@ extern void cpu_all_int(void);
121121
extern void dec_intr_unimplemented(void);
122122
extern void asic_intr_unimplemented(void);
123123

124-
#endif /* __ASSEMBLY__ */
124+
#endif /* __ASSEMBLER__ */
125125

126126
#endif

arch/mips/include/asm/dec/kn01.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#define KN01_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */
7272

7373

74-
#ifndef __ASSEMBLY__
74+
#ifndef __ASSEMBLER__
7575

7676
#include <linux/interrupt.h>
7777
#include <linux/spinlock.h>

arch/mips/include/asm/dec/kn02.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#define KN02_IRQ_ALL 0xff
8181

8282

83-
#ifndef __ASSEMBLY__
83+
#ifndef __ASSEMBLER__
8484

8585
#include <linux/types.h>
8686

arch/mips/include/asm/dec/kn02xa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
#define KN02XA_EAR_RES_0 (0x3<<0) /* unused */
7171

7272

73-
#ifndef __ASSEMBLY__
73+
#ifndef __ASSEMBLER__
7474

7575
#include <linux/interrupt.h>
7676

0 commit comments

Comments
 (0)