Skip to content

Commit 44a4ef5

Browse files
huthjcmvbkbc
authored andcommitted
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 <[email protected]> Cc: Max Filippov <[email protected]> Signed-off-by: Thomas Huth <[email protected]> Message-Id: <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent da78701 commit 44a4ef5

File tree

16 files changed

+37
-37
lines changed

16 files changed

+37
-37
lines changed

arch/xtensa/include/asm/bootparam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define BP_TAG_FIRST 0x7B0B /* first tag with a version number */
2828
#define BP_TAG_LAST 0x7E0B /* last tag */
2929

30-
#ifndef __ASSEMBLY__
30+
#ifndef __ASSEMBLER__
3131

3232
/* All records are aligned to 4 bytes */
3333

arch/xtensa/include/asm/cmpxchg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef _XTENSA_CMPXCHG_H
1212
#define _XTENSA_CMPXCHG_H
1313

14-
#ifndef __ASSEMBLY__
14+
#ifndef __ASSEMBLER__
1515

1616
#include <linux/bits.h>
1717
#include <linux/stringify.h>
@@ -220,6 +220,6 @@ __arch_xchg(unsigned long x, volatile void * ptr, int size)
220220
}
221221
}
222222

223-
#endif /* __ASSEMBLY__ */
223+
#endif /* __ASSEMBLER__ */
224224

225225
#endif /* _XTENSA_CMPXCHG_H */

arch/xtensa/include/asm/coprocessor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <asm/core.h>
1717
#include <asm/types.h>
1818

19-
#ifdef __ASSEMBLY__
19+
#ifdef __ASSEMBLER__
2020
# include <variant/tie-asm.h>
2121

2222
.macro xchal_sa_start a b
@@ -69,7 +69,7 @@
6969

7070

7171

72-
#endif /* __ASSEMBLY__ */
72+
#endif /* __ASSEMBLER__ */
7373

7474
/*
7575
* XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured.
@@ -87,7 +87,7 @@
8787
#define XTENSA_HAVE_IO_PORTS \
8888
XCHAL_CP_PORT_MASK
8989

90-
#ifndef __ASSEMBLY__
90+
#ifndef __ASSEMBLER__
9191

9292
/*
9393
* Additional registers.
@@ -151,5 +151,5 @@ void local_coprocessors_flush_release_all(void);
151151

152152
#endif /* XTENSA_HAVE_COPROCESSORS */
153153

154-
#endif /* !__ASSEMBLY__ */
154+
#endif /* !__ASSEMBLER__ */
155155
#endif /* _XTENSA_COPROCESSOR_H */

arch/xtensa/include/asm/current.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <asm/thread_info.h>
1515

16-
#ifndef __ASSEMBLY__
16+
#ifndef __ASSEMBLER__
1717

1818
#include <linux/thread_info.h>
1919

arch/xtensa/include/asm/ftrace.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
#include <asm/processor.h>
1414

15-
#ifndef __ASSEMBLY__
15+
#ifndef __ASSEMBLER__
1616
extern unsigned long return_address(unsigned level);
1717
#define ftrace_return_address(n) return_address(n)
18-
#endif /* __ASSEMBLY__ */
18+
#endif /* __ASSEMBLER__ */
1919

2020
#ifdef CONFIG_FUNCTION_TRACER
2121

2222
#define MCOUNT_ADDR ((unsigned long)(_mcount))
2323
#define MCOUNT_INSN_SIZE 3
2424

25-
#ifndef __ASSEMBLY__
25+
#ifndef __ASSEMBLER__
2626
extern void _mcount(void);
2727
#define mcount _mcount
28-
#endif /* __ASSEMBLY__ */
28+
#endif /* __ASSEMBLER__ */
2929
#endif /* CONFIG_FUNCTION_TRACER */
3030

3131
#endif /* _XTENSA_FTRACE_H */

arch/xtensa/include/asm/initialize_mmu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define CA_WRITEBACK (0x4)
3535
#endif
3636

37-
#ifdef __ASSEMBLY__
37+
#ifdef __ASSEMBLER__
3838

3939
#define XTENSA_HWVERSION_RC_2009_0 230000
4040

@@ -240,6 +240,6 @@
240240

241241
.endm
242242

243-
#endif /*__ASSEMBLY__*/
243+
#endif /*__ASSEMBLER__*/
244244

245245
#endif /* _XTENSA_INITIALIZE_MMU_H */

arch/xtensa/include/asm/jump_label.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#ifndef _ASM_XTENSA_JUMP_LABEL_H
55
#define _ASM_XTENSA_JUMP_LABEL_H
66

7-
#ifndef __ASSEMBLY__
7+
#ifndef __ASSEMBLER__
88

99
#include <linux/types.h>
1010

@@ -61,5 +61,5 @@ struct jump_entry {
6161
jump_label_t key;
6262
};
6363

64-
#endif /* __ASSEMBLY__ */
64+
#endif /* __ASSEMBLER__ */
6565
#endif

arch/xtensa/include/asm/kasan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef __ASM_KASAN_H
33
#define __ASM_KASAN_H
44

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66

77
#ifdef CONFIG_KASAN
88

arch/xtensa/include/asm/kmem_layout.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
#if (!XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY) && defined(CONFIG_USE_OF)
8282
#define XCHAL_KIO_PADDR xtensa_get_kio_paddr()
83-
#ifndef __ASSEMBLY__
83+
#ifndef __ASSEMBLER__
8484
extern unsigned long xtensa_kio_paddr;
8585

8686
static inline unsigned long xtensa_get_kio_paddr(void)

arch/xtensa/include/asm/page.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#endif
8181

8282

83-
#ifdef __ASSEMBLY__
83+
#ifdef __ASSEMBLER__
8484

8585
#define __pgprot(x) (x)
8686

@@ -172,7 +172,7 @@ static inline unsigned long ___pa(unsigned long va)
172172
#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
173173
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
174174

175-
#endif /* __ASSEMBLY__ */
175+
#endif /* __ASSEMBLER__ */
176176

177177
#include <asm-generic/memory_model.h>
178178
#endif /* _XTENSA_PAGE_H */

0 commit comments

Comments
 (0)