Skip to content

Commit f0eedcf

Browse files
huthstffrdhrn
authored andcommitted
openrisc: 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: Jonas Bonn <[email protected]> Cc: Stefan Kristiansson <[email protected]> Cc: Stafford Horne <[email protected]> Cc: [email protected] Signed-off-by: Thomas Huth <[email protected]> Signed-off-by: Stafford Horne <[email protected]>
1 parent c403db6 commit f0eedcf

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

arch/openrisc/include/asm/mmu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef __ASM_OPENRISC_MMU_H
1616
#define __ASM_OPENRISC_MMU_H
1717

18-
#ifndef __ASSEMBLY__
18+
#ifndef __ASSEMBLER__
1919
typedef unsigned long mm_context_t;
2020
#endif
2121

arch/openrisc/include/asm/page.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
#include <asm/setup.h>
2727

28-
#ifndef __ASSEMBLY__
28+
#ifndef __ASSEMBLER__
2929

3030
#define clear_page(page) memset((page), 0, PAGE_SIZE)
3131
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
@@ -55,10 +55,10 @@ typedef struct page *pgtable_t;
5555
#define __pgd(x) ((pgd_t) { (x) })
5656
#define __pgprot(x) ((pgprot_t) { (x) })
5757

58-
#endif /* !__ASSEMBLY__ */
58+
#endif /* !__ASSEMBLER__ */
5959

6060

61-
#ifndef __ASSEMBLY__
61+
#ifndef __ASSEMBLER__
6262

6363
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
6464
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
@@ -73,7 +73,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
7373

7474
#define virt_addr_valid(kaddr) (pfn_valid(virt_to_pfn(kaddr)))
7575

76-
#endif /* __ASSEMBLY__ */
76+
#endif /* __ASSEMBLER__ */
7777

7878
#include <asm-generic/memory_model.h>
7979
#include <asm-generic/getorder.h>

arch/openrisc/include/asm/pgtable.h

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

2424
#include <asm-generic/pgtable-nopmd.h>
2525

26-
#ifndef __ASSEMBLY__
26+
#ifndef __ASSEMBLER__
2727
#include <asm/mmu.h>
2828
#include <asm/fixmap.h>
2929

@@ -432,5 +432,5 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
432432

433433
typedef pte_t *pte_addr_t;
434434

435-
#endif /* __ASSEMBLY__ */
435+
#endif /* __ASSEMBLER__ */
436436
#endif /* __ASM_OPENRISC_PGTABLE_H */

arch/openrisc/include/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
#define TASK_UNMAPPED_BASE (TASK_SIZE / 8 * 3)
4141

42-
#ifndef __ASSEMBLY__
42+
#ifndef __ASSEMBLER__
4343

4444
struct task_struct;
4545

@@ -78,5 +78,5 @@ void show_registers(struct pt_regs *regs);
7878

7979
#define cpu_relax() barrier()
8080

81-
#endif /* __ASSEMBLY__ */
81+
#endif /* __ASSEMBLER__ */
8282
#endif /* __ASM_OPENRISC_PROCESSOR_H */

arch/openrisc/include/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* they share a cacheline (not done yet, though... future optimization).
2828
*/
2929

30-
#ifndef __ASSEMBLY__
30+
#ifndef __ASSEMBLER__
3131
/*
3232
* This struct describes how the registers are laid out on the kernel stack
3333
* during a syscall or other kernel entry.
@@ -147,7 +147,7 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
147147
return *(unsigned long *)((unsigned long)regs + offset);
148148
}
149149

150-
#endif /* __ASSEMBLY__ */
150+
#endif /* __ASSEMBLER__ */
151151

152152
/*
153153
* Offsets used by 'ptrace' system call interface.

arch/openrisc/include/asm/setup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <linux/init.h>
99
#include <asm-generic/setup.h>
1010

11-
#ifndef __ASSEMBLY__
11+
#ifndef __ASSEMBLER__
1212
void __init or1k_early_setup(void *fdt);
1313
#endif
1414

arch/openrisc/include/asm/thread_info.h

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

1818
#ifdef __KERNEL__
1919

20-
#ifndef __ASSEMBLY__
20+
#ifndef __ASSEMBLER__
2121
#include <asm/types.h>
2222
#include <asm/processor.h>
2323
#endif
@@ -38,7 +38,7 @@
3838
* - if the contents of this structure are changed, the assembly constants
3939
* must also be changed
4040
*/
41-
#ifndef __ASSEMBLY__
41+
#ifndef __ASSEMBLER__
4242

4343
struct thread_info {
4444
struct task_struct *task; /* main task structure */
@@ -58,7 +58,7 @@ struct thread_info {
5858
*
5959
* preempt_count needs to be 1 initially, until the scheduler is functional.
6060
*/
61-
#ifndef __ASSEMBLY__
61+
#ifndef __ASSEMBLER__
6262
#define INIT_THREAD_INFO(tsk) \
6363
{ \
6464
.task = &tsk, \
@@ -75,7 +75,7 @@ register struct thread_info *current_thread_info_reg asm("r10");
7575
#define get_thread_info(ti) get_task_struct((ti)->task)
7676
#define put_thread_info(ti) put_task_struct((ti)->task)
7777

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

8080
/*
8181
* thread information flags

0 commit comments

Comments
 (0)