Skip to content

Commit 9cc6469

Browse files
huthglaubitz
authored andcommitted
sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in all 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: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: linux-sh@vger.kernel.org Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
1 parent 0af2f6b commit 9cc6469

File tree

17 files changed

+46
-46
lines changed

17 files changed

+46
-46
lines changed

arch/sh/include/asm/cache.h

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

2323
#define __read_mostly __section(".data..read_mostly")
2424

25-
#ifndef __ASSEMBLY__
25+
#ifndef __ASSEMBLER__
2626
struct cache_info {
2727
unsigned int ways; /* Number of cache ways */
2828
unsigned int sets; /* Number of cache sets */
@@ -48,5 +48,5 @@ struct cache_info {
4848

4949
unsigned long flags;
5050
};
51-
#endif /* __ASSEMBLY__ */
51+
#endif /* __ASSEMBLER__ */
5252
#endif /* __ASM_SH_CACHE_H */

arch/sh/include/asm/dwarf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
*/
190190
#define DWARF_ARCH_RA_REG 17
191191

192-
#ifndef __ASSEMBLY__
192+
#ifndef __ASSEMBLER__
193193

194194
#include <linux/compiler.h>
195195
#include <linux/bug.h>
@@ -379,7 +379,7 @@ extern int module_dwarf_finalize(const Elf_Ehdr *, const Elf_Shdr *,
379379
struct module *);
380380
extern void module_dwarf_cleanup(struct module *);
381381

382-
#endif /* !__ASSEMBLY__ */
382+
#endif /* !__ASSEMBLER__ */
383383

384384
#define CFI_STARTPROC .cfi_startproc
385385
#define CFI_ENDPROC .cfi_endproc
@@ -402,7 +402,7 @@ extern void module_dwarf_cleanup(struct module *);
402402
#define CFI_REL_OFFSET CFI_IGNORE
403403
#define CFI_UNDEFINED CFI_IGNORE
404404

405-
#ifndef __ASSEMBLY__
405+
#ifndef __ASSEMBLER__
406406
static inline void dwarf_unwinder_init(void)
407407
{
408408
}

arch/sh/include/asm/fpu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef __ASM_SH_FPU_H
33
#define __ASM_SH_FPU_H
44

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66

77
#include <asm/ptrace.h>
88

@@ -67,6 +67,6 @@ static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs)
6767
void float_raise(unsigned int flags);
6868
int float_rounding_mode(void);
6969

70-
#endif /* __ASSEMBLY__ */
70+
#endif /* __ASSEMBLER__ */
7171

7272
#endif /* __ASM_SH_FPU_H */

arch/sh/include/asm/ftrace.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
88
#define FTRACE_SYSCALL_MAX NR_syscalls
99

10-
#ifndef __ASSEMBLY__
10+
#ifndef __ASSEMBLER__
1111
extern void mcount(void);
1212

1313
#define MCOUNT_ADDR ((unsigned long)(mcount))
@@ -35,10 +35,10 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
3535

3636
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
3737

38-
#endif /* __ASSEMBLY__ */
38+
#endif /* __ASSEMBLER__ */
3939
#endif /* CONFIG_FUNCTION_TRACER */
4040

41-
#ifndef __ASSEMBLY__
41+
#ifndef __ASSEMBLER__
4242

4343
/* arch/sh/kernel/return_address.c */
4444
extern void *return_address(unsigned int);
@@ -53,6 +53,6 @@ static inline void arch_ftrace_nmi_enter(void) { }
5353
static inline void arch_ftrace_nmi_exit(void) { }
5454
#endif
5555

56-
#endif /* __ASSEMBLY__ */
56+
#endif /* __ASSEMBLER__ */
5757

5858
#endif /* __ASM_SH_FTRACE_H */

arch/sh/include/asm/mmu.h

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

3434
#define PMB_NO_ENTRY (-1)
3535

36-
#ifndef __ASSEMBLY__
36+
#ifndef __ASSEMBLER__
3737
#include <linux/errno.h>
3838
#include <linux/threads.h>
3939
#include <asm/page.h>
@@ -102,6 +102,6 @@ pmb_remap(phys_addr_t phys, unsigned long size, pgprot_t prot)
102102
return pmb_remap_caller(phys, size, prot, __builtin_return_address(0));
103103
}
104104

105-
#endif /* __ASSEMBLY__ */
105+
#endif /* __ASSEMBLER__ */
106106

107107
#endif /* __MMU_H */

arch/sh/include/asm/page.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT)
3131
#endif
3232

33-
#ifndef __ASSEMBLY__
33+
#ifndef __ASSEMBLER__
3434
#include <asm/uncached.h>
3535

3636
extern unsigned long shm_align_mask;
@@ -85,7 +85,7 @@ typedef struct page *pgtable_t;
8585

8686
#define pte_pgprot(x) __pgprot(pte_val(x) & PTE_FLAGS_MASK)
8787

88-
#endif /* !__ASSEMBLY__ */
88+
#endif /* !__ASSEMBLER__ */
8989

9090
/*
9191
* __MEMORY_START and SIZE are the physical addresses and size of RAM.
@@ -126,10 +126,10 @@ typedef struct page *pgtable_t;
126126
#define ___va(x) ((x)+PAGE_OFFSET)
127127
#endif
128128

129-
#ifndef __ASSEMBLY__
129+
#ifndef __ASSEMBLER__
130130
#define __pa(x) ___pa((unsigned long)x)
131131
#define __va(x) (void *)___va((unsigned long)x)
132-
#endif /* !__ASSEMBLY__ */
132+
#endif /* !__ASSEMBLER__ */
133133

134134
#ifdef CONFIG_UNCACHED_MAPPING
135135
#if defined(CONFIG_29BIT)

arch/sh/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <asm/page.h>
1818
#include <asm/mmu.h>
1919

20-
#ifndef __ASSEMBLY__
20+
#ifndef __ASSEMBLER__
2121
#include <asm/addrspace.h>
2222
#include <asm/fixmap.h>
2323

@@ -28,7 +28,7 @@
2828
extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
2929
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
3030

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

3333
/*
3434
* Effective and physical address definitions, to aid with sign

arch/sh/include/asm/pgtable_32.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
170170
(PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \
171171
_PAGE_DIRTY | _PAGE_SPECIAL)
172172

173-
#ifndef __ASSEMBLY__
173+
#ifndef __ASSEMBLER__
174174

175175
#if defined(CONFIG_X2TLB) /* SH-X2 TLB */
176176
#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_CACHABLE | \
@@ -287,9 +287,9 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
287287
__pgprot(0)
288288
#endif
289289

290-
#endif /* __ASSEMBLY__ */
290+
#endif /* __ASSEMBLER__ */
291291

292-
#ifndef __ASSEMBLY__
292+
#ifndef __ASSEMBLER__
293293

294294
/*
295295
* Certain architectures need to do special things when PTEs
@@ -486,5 +486,5 @@ static inline int pte_swp_exclusive(pte_t pte)
486486
PTE_BIT_FUNC(low, swp_mkexclusive, |= _PAGE_SWP_EXCLUSIVE);
487487
PTE_BIT_FUNC(low, swp_clear_exclusive, &= ~_PAGE_SWP_EXCLUSIVE);
488488

489-
#endif /* __ASSEMBLY__ */
489+
#endif /* __ASSEMBLER__ */
490490
#endif /* __ASM_SH_PGTABLE_32_H */

arch/sh/include/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <asm/cpu-features.h>
66
#include <asm/cache.h>
77

8-
#ifndef __ASSEMBLY__
8+
#ifndef __ASSEMBLER__
99
/*
1010
* CPU type and hardware bug flags. Kept separately for each CPU.
1111
*
@@ -168,7 +168,7 @@ extern unsigned int instruction_size(unsigned int insn);
168168

169169
void select_idle_routine(void);
170170

171-
#endif /* __ASSEMBLY__ */
171+
#endif /* __ASSEMBLER__ */
172172

173173
#include <asm/processor_32.h>
174174

arch/sh/include/asm/smc37c93x.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#define UART_DLL 0x0 /* Divisor Latch (LS) */
6868
#define UART_DLM 0x2 /* Divisor Latch (MS) */
6969

70-
#ifndef __ASSEMBLY__
70+
#ifndef __ASSEMBLER__
7171
typedef struct uart_reg {
7272
volatile __u16 rbr;
7373
volatile __u16 ier;
@@ -78,7 +78,7 @@ typedef struct uart_reg {
7878
volatile __u16 msr;
7979
volatile __u16 scr;
8080
} uart_reg;
81-
#endif /* ! __ASSEMBLY__ */
81+
#endif /* ! __ASSEMBLER__ */
8282

8383
/* Alias for Write Only Register */
8484

0 commit comments

Comments
 (0)