Skip to content

Commit 179e949

Browse files
huthvineetgarc
authored andcommitted
ARC: Replace __ASSEMBLY__ with __ASSEMBLER__ in the 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: [email protected] Signed-off-by: Thomas Huth <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 2cb74be commit 179e949

24 files changed

+45
-45
lines changed

arch/arc/include/asm/arcregs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
#define ARC_AUX_AGU_MOD2 0x5E2
145145
#define ARC_AUX_AGU_MOD3 0x5E3
146146

147-
#ifndef __ASSEMBLY__
147+
#ifndef __ASSEMBLER__
148148

149149
#include <soc/arc/arc_aux.h>
150150

arch/arc/include/asm/atomic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_ATOMIC_H
77
#define _ASM_ARC_ATOMIC_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/types.h>
1212
#include <linux/compiler.h>
@@ -31,6 +31,6 @@
3131
#include <asm/atomic64-arcv2.h>
3232
#endif
3333

34-
#endif /* !__ASSEMBLY__ */
34+
#endif /* !__ASSEMBLER__ */
3535

3636
#endif

arch/arc/include/asm/bitops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#error only <linux/bitops.h> can be included directly
1111
#endif
1212

13-
#ifndef __ASSEMBLY__
13+
#ifndef __ASSEMBLER__
1414

1515
#include <linux/types.h>
1616
#include <linux/compiler.h>
@@ -192,6 +192,6 @@ static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
192192
#include <asm-generic/bitops/le.h>
193193
#include <asm-generic/bitops/ext2-atomic-setbit.h>
194194

195-
#endif /* !__ASSEMBLY__ */
195+
#endif /* !__ASSEMBLER__ */
196196

197197
#endif

arch/arc/include/asm/bug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_BUG_H
77
#define _ASM_ARC_BUG_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <asm/ptrace.h>
1212

@@ -29,6 +29,6 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
2929

3030
#include <asm-generic/bug.h>
3131

32-
#endif /* !__ASSEMBLY__ */
32+
#endif /* !__ASSEMBLER__ */
3333

3434
#endif

arch/arc/include/asm/cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
#define ARC_UNCACHED_ADDR_SPACE 0xc0000000
2525

26-
#ifndef __ASSEMBLY__
26+
#ifndef __ASSEMBLER__
2727

2828
#include <linux/build_bug.h>
2929

@@ -65,7 +65,7 @@
6565
extern int ioc_enable;
6666
extern unsigned long perip_base, perip_end;
6767

68-
#endif /* !__ASSEMBLY__ */
68+
#endif /* !__ASSEMBLER__ */
6969

7070
/* Instruction cache related Auxiliary registers */
7171
#define ARC_REG_IC_BCR 0x77 /* Build Config reg */

arch/arc/include/asm/current.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef _ASM_ARC_CURRENT_H
1010
#define _ASM_ARC_CURRENT_H
1111

12-
#ifndef __ASSEMBLY__
12+
#ifndef __ASSEMBLER__
1313

1414
#ifdef CONFIG_ARC_CURR_IN_REG
1515

@@ -20,6 +20,6 @@ register struct task_struct *curr_arc asm("gp");
2020
#include <asm-generic/current.h>
2121
#endif /* ! CONFIG_ARC_CURR_IN_REG */
2222

23-
#endif /* ! __ASSEMBLY__ */
23+
#endif /* ! __ASSEMBLER__ */
2424

2525
#endif /* _ASM_ARC_CURRENT_H */

arch/arc/include/asm/dsp-impl.h

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

1212
#define DSP_CTRL_DISABLED_ALL 0
1313

14-
#ifdef __ASSEMBLY__
14+
#ifdef __ASSEMBLER__
1515

1616
/* clobbers r5 register */
1717
.macro DSP_EARLY_INIT

arch/arc/include/asm/dsp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef __ASM_ARC_DSP_H
88
#define __ASM_ARC_DSP_H
99

10-
#ifndef __ASSEMBLY__
10+
#ifndef __ASSEMBLER__
1111

1212
/*
1313
* DSP-related saved registers - need to be saved only when you are
@@ -24,6 +24,6 @@ struct dsp_callee_regs {
2424
#endif
2525
};
2626

27-
#endif /* !__ASSEMBLY__ */
27+
#endif /* !__ASSEMBLER__ */
2828

2929
#endif /* __ASM_ARC_DSP_H */

arch/arc/include/asm/dwarf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_DWARF_H
77
#define _ASM_ARC_DWARF_H
88

9-
#ifdef __ASSEMBLY__
9+
#ifdef __ASSEMBLER__
1010

1111
#ifdef ARC_DW2_UNWIND_AS_CFI
1212

@@ -38,6 +38,6 @@
3838

3939
#endif /* !ARC_DW2_UNWIND_AS_CFI */
4040

41-
#endif /* __ASSEMBLY__ */
41+
#endif /* __ASSEMBLER__ */
4242

4343
#endif /* _ASM_ARC_DWARF_H */

arch/arc/include/asm/entry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <asm/processor.h> /* For VMALLOC_START */
1414
#include <asm/mmu.h>
1515

16-
#ifdef __ASSEMBLY__
16+
#ifdef __ASSEMBLER__
1717

1818
#ifdef CONFIG_ISA_ARCOMPACT
1919
#include <asm/entry-compact.h> /* ISA specific bits */
@@ -146,7 +146,7 @@
146146

147147
#endif /* CONFIG_ARC_CURR_IN_REG */
148148

149-
#else /* !__ASSEMBLY__ */
149+
#else /* !__ASSEMBLER__ */
150150

151151
extern void do_signal(struct pt_regs *);
152152
extern void do_notify_resume(struct pt_regs *);

arch/arc/include/asm/irqflags-arcv2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | __AD_ENB | \
5151
(ARCV2_IRQ_DEF_PRIO << 1))
5252

53-
#ifndef __ASSEMBLY__
53+
#ifndef __ASSEMBLER__
5454

5555
/*
5656
* Save IRQ state and disable IRQs
@@ -170,6 +170,6 @@ static inline void arc_softirq_clear(int irq)
170170
seti
171171
.endm
172172

173-
#endif /* __ASSEMBLY__ */
173+
#endif /* __ASSEMBLER__ */
174174

175175
#endif

arch/arc/include/asm/irqflags-compact.h

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

4141
#define ISA_INIT_STATUS_BITS STATUS_IE_MASK
4242

43-
#ifndef __ASSEMBLY__
43+
#ifndef __ASSEMBLER__
4444

4545
/******************************************************************
4646
* IRQ Control Macros
@@ -196,6 +196,6 @@ static inline int arch_irqs_disabled(void)
196196
flag \scratch
197197
.endm
198198

199-
#endif /* __ASSEMBLY__ */
199+
#endif /* __ASSEMBLER__ */
200200

201201
#endif

arch/arc/include/asm/jump_label.h

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

5-
#ifndef __ASSEMBLY__
5+
#ifndef __ASSEMBLER__
66

77
#include <linux/stringify.h>
88
#include <linux/types.h>
@@ -68,5 +68,5 @@ struct jump_entry {
6868
jump_label_t key;
6969
};
7070

71-
#endif /* __ASSEMBLY__ */
71+
#endif /* __ASSEMBLER__ */
7272
#endif

arch/arc/include/asm/linkage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define __ALIGN .align 4
1313
#define __ALIGN_STR __stringify(__ALIGN)
1414

15-
#ifdef __ASSEMBLY__
15+
#ifdef __ASSEMBLER__
1616

1717
.macro ST2 e, o, off
1818
#ifdef CONFIG_ARC_HAS_LL64
@@ -61,7 +61,7 @@
6161
CFI_ENDPROC ASM_NL \
6262
.size name, .-name
6363

64-
#else /* !__ASSEMBLY__ */
64+
#else /* !__ASSEMBLER__ */
6565

6666
#ifdef CONFIG_ARC_HAS_ICCM
6767
#define __arcfp_code __section(".text.arcfp")
@@ -75,6 +75,6 @@
7575
#define __arcfp_data __section(".data")
7676
#endif
7777

78-
#endif /* __ASSEMBLY__ */
78+
#endif /* __ASSEMBLER__ */
7979

8080
#endif

arch/arc/include/asm/mmu-arcv2.h

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

7070
#define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK_PHYS | _PAGE_CACHEABLE)
7171

72-
#ifndef __ASSEMBLY__
72+
#ifndef __ASSEMBLER__
7373

7474
struct mm_struct;
7575
extern int pae40_exist_but_not_enab(void);
@@ -100,6 +100,6 @@ static inline void mmu_setup_pgd(struct mm_struct *mm, void *pgd)
100100
sr \reg, [ARC_REG_PID]
101101
.endm
102102

103-
#endif /* !__ASSEMBLY__ */
103+
#endif /* !__ASSEMBLER__ */
104104

105105
#endif

arch/arc/include/asm/mmu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_MMU_H
77
#define _ASM_ARC_MMU_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/threads.h> /* NR_CPUS */
1212

arch/arc/include/asm/page.h

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

2020
#endif /* CONFIG_ARC_HAS_PAE40 */
2121

22-
#ifndef __ASSEMBLY__
22+
#ifndef __ASSEMBLER__
2323

2424
#define clear_page(paddr) memset((paddr), 0, PAGE_SIZE)
2525
#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
@@ -136,6 +136,6 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
136136
#include <asm-generic/memory_model.h> /* page_to_pfn, pfn_to_page */
137137
#include <asm-generic/getorder.h>
138138

139-
#endif /* !__ASSEMBLY__ */
139+
#endif /* !__ASSEMBLER__ */
140140

141141
#endif

arch/arc/include/asm/pgtable-bits-arcv2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* This is to enable COW mechanism
7676
*/
7777
/* xwr */
78-
#ifndef __ASSEMBLY__
78+
#ifndef __ASSEMBLER__
7979

8080
#define pte_write(pte) (pte_val(pte) & _PAGE_WRITE)
8181
#define pte_dirty(pte) (pte_val(pte) & _PAGE_DIRTY)
@@ -142,6 +142,6 @@ PTE_BIT_FUNC(swp_clear_exclusive, &= ~(_PAGE_SWP_EXCLUSIVE));
142142
#include <asm/hugepage.h>
143143
#endif
144144

145-
#endif /* __ASSEMBLY__ */
145+
#endif /* __ASSEMBLER__ */
146146

147147
#endif

arch/arc/include/asm/pgtable-levels.h

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

8686
#define PTRS_PER_PTE BIT(PMD_SHIFT - PAGE_SHIFT)
8787

88-
#ifndef __ASSEMBLY__
88+
#ifndef __ASSEMBLER__
8989

9090
#if CONFIG_PGTABLE_LEVELS > 3
9191
#include <asm-generic/pgtable-nop4d.h>
@@ -181,6 +181,6 @@
181181
#define pmd_leaf(x) (pmd_val(x) & _PAGE_HW_SZ)
182182
#endif
183183

184-
#endif /* !__ASSEMBLY__ */
184+
#endif /* !__ASSEMBLER__ */
185185

186186
#endif

arch/arc/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
2121

22-
#ifndef __ASSEMBLY__
22+
#ifndef __ASSEMBLER__
2323

2424
extern char empty_zero_page[PAGE_SIZE];
2525
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
@@ -29,6 +29,6 @@ extern pgd_t swapper_pg_dir[] __aligned(PAGE_SIZE);
2929
/* to cope with aliasing VIPT cache */
3030
#define HAVE_ARCH_UNMAPPED_AREA
3131

32-
#endif /* __ASSEMBLY__ */
32+
#endif /* __ASSEMBLER__ */
3333

3434
#endif

arch/arc/include/asm/processor.h

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

14-
#ifndef __ASSEMBLY__
14+
#ifndef __ASSEMBLER__
1515

1616
#include <asm/ptrace.h>
1717
#include <asm/dsp.h>
@@ -66,7 +66,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc,
6666

6767
extern unsigned int __get_wchan(struct task_struct *p);
6868

69-
#endif /* !__ASSEMBLY__ */
69+
#endif /* !__ASSEMBLER__ */
7070

7171
/*
7272
* Default System Memory Map on ARC

arch/arc/include/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <uapi/asm/ptrace.h>
1111
#include <linux/compiler.h>
1212

13-
#ifndef __ASSEMBLY__
13+
#ifndef __ASSEMBLER__
1414

1515
typedef union {
1616
struct {
@@ -172,6 +172,6 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
172172
extern int syscall_trace_enter(struct pt_regs *);
173173
extern void syscall_trace_exit(struct pt_regs *);
174174

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

177177
#endif /* __ASM_PTRACE_H */

arch/arc/include/asm/switch_to.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef _ASM_ARC_SWITCH_TO_H
77
#define _ASM_ARC_SWITCH_TO_H
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/sched.h>
1212
#include <asm/dsp-impl.h>

arch/arc/include/asm/thread_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
2525
#define THREAD_SHIFT (PAGE_SHIFT << THREAD_SIZE_ORDER)
2626

27-
#ifndef __ASSEMBLY__
27+
#ifndef __ASSEMBLER__
2828

2929
#include <linux/thread_info.h>
3030

@@ -62,7 +62,7 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
6262
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
6363
}
6464

65-
#endif /* !__ASSEMBLY__ */
65+
#endif /* !__ASSEMBLER__ */
6666

6767
/*
6868
* thread information flags

0 commit comments

Comments
 (0)