Commit 9cc64695 authored by Thomas Huth's avatar Thomas Huth Committed by John Paul Adrian Glaubitz
Browse files

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: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
parent 0af2f6be
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

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

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

	unsigned long flags;
};
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* __ASM_SH_CACHE_H */
+3 −3
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@
 */
#define DWARF_ARCH_RA_REG	17

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

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

#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */

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

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
static inline void dwarf_unwinder_init(void)
{
}
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#ifndef __ASM_SH_FPU_H
#define __ASM_SH_FPU_H

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

#include <asm/ptrace.h>

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

#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */

#endif /* __ASM_SH_FPU_H */
+4 −4
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
#define MCOUNT_INSN_SIZE	4 /* sizeof mcount call */
#define FTRACE_SYSCALL_MAX	NR_syscalls

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
extern void mcount(void);

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

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

#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* CONFIG_FUNCTION_TRACER */

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

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

#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */

#endif /* __ASM_SH_FTRACE_H */
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@

#define PMB_NO_ENTRY		(-1)

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

#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */

#endif /* __MMU_H */
Loading