ARM: OMAP2+: Replace __ASSEMBLY__ with __ASSEMBLER__
Subsystems (3)
PATCH 1/1 ARM: OMAP2+: Replace __ASSEMBLY__ with __ASSEMBLER__
While the GCC and Clang compilers already define __ASSEMBLER__ auto- matically 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. Let's standardize now on the __ASSEMBLER__ macro to avoid this confusion.
---
Note: This has been split from an earlier bigger patch of mine into
this separate patch to ease reviewing
arch/arm/mach-omap2/control.h | 8 ++++---- arch/arm/mach-omap2/soc.h | 4 ++-- arch/arm/mach-omap2/sram.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/control.h +4 -4
@@ -18,7 +18,7 @@#include "am33xx.h" -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define OMAP242X_CTRL_REGADDR (reg) \ OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))#define OMAP243X_CTRL_REGADDR (reg) \
@@ -36,7 +36,7 @@ OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))#define AM33XX_CTRL_REGADDR (reg) \ AM33XX_L4_WK_IO_ADDRESS(AM33XX_SCM_BASE + (reg)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for
@@ -503,7 +503,7 @@#define FEAT_NEON_NONE 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_ARCH_OMAP2PLUS extern u8 omap_ctrl_readb (u16 offset);extern u16 omap_ctrl_readw (u16 offset);
@@ -534,7 +534,7 @@ int omap_control_init(void);#define omap_ctrl_writel (x, y) WARN_ON(1)#define omap4_ctrl_pad_writel (x, y) WARN_ON(1)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */
arch/arm/mach-omap2/soc.h +2 -2
@@ -19,7 +19,7 @@#include "am33xx.h" #include "omap54xx.h" -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bitops.h> #include <linux/of.h>
@@ -501,4 +501,4 @@ level(__##fn);#define cpu_is_ti816x () soc_is_ti816x()#define cpu_is_ti81xx () soc_is_ti81xx() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */
arch/arm/mach-omap2/sram.h +2 -2
@@ -3,7 +3,7 @@* Interface for functions that need to be run in internal SRAM */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void omap2_sram_ddr_init (u32 *slow_dll_ctrl,u32 fast_dll_ctrl,u32 base_cs,u32 force_unlock);
@@ -48,7 +48,7 @@ extern void omap_push_sram_idle(void);static inline void omap_push_sram_idle (void ) {}#endif /* CONFIG_PM */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * OMAP2+: define the SRAM PA addresses.
Signature · 1 line
2.55.0
Quoted 9 lines · Thomas Huth
While the GCC and Clang compilers already define
__ASSEMBLER__auto- matically 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. Let's standardize now on the__ASSEMBLER__macro to avoid this confusion.[...]
Applied, thanks!
[1/1] ARM: OMAP2+: Replace __ASSEMBLY__ with __ASSEMBLER__
commit: 9d458ad3ec1552cd99ca1316ea30c4901e4fd4dd
Best regards,
Signature · 1 line
Kevin Hilman (TI) <[email protected]>