Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
Subsystems (52)
v5 cover Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
The kernel Makefiles define the __ASSEMBLY__ macro to provide a way to use headers in both, assembly and C source code. However, all the supported versions of the GCC and Clang compilers also define the macro __ASSEMBLER__ automatically already when compiling assembly code, so some kernel headers are using __ASSEMBLER__ instead. With regards to userspace code, this seems also to be constant source of confusion, see for example these links here:
https://lore.kernel.org/kvm/[email protected]/
https://stackoverflow.com/questions/28924355/gcc-assembler-preprocessor-not-compatible-with-standard-headers
https://forums.raspberrypi.com/viewtopic.php?p=1652944#p1653834
https://github.com/riscv-software-src/opensbi/issues/199
To avoid confusion in the future, it would make sense to standardize on the macro that gets defined by the compiler, so this patch series changes all occurances of __ASSEMBLY__ into __ASSEMBLER__ and finally removes the -D__ASSEMBLY__ from the Makefiles.
I split the patches per architecture to ease the review, and I also split the uapi headers from the normal ones in case we decide that uapi needs to be treated differently from the normal headers here.
Most patches for the individual architectures have already been merged through the corresponding architecture trees (big thanks to the main- tainers!), so this series here now just consists of the remaining patches.
v5:
- More patches have been merged through architecture trees, dropped them now from this series here.
- Fixed some more occurances of __ASSEMBLY__ in new code.
v4:
- Most patches from the original series got already merged via the tree of the individual architectures, so the amount of patches here has been greatly reduced
- Rebased patches on top of linux-next, fixed conflicts and new occurances
Thomas Huth (8):
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers kselftest/riscv: Replace __ASSEMBLY__ with __ASSEMBLER__
uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
treewide: Stop defining __ASSEMBLY__ for assembler files
Documentation/dev-tools/checkuapi.rst | 2 +- Makefile | 2 +- arch/arm/include/asm/arch_gicv3.h | 4 ++-- arch/arm/include/asm/assembler.h | 2 +- arch/arm/include/asm/barrier.h | 4 ++-- arch/arm/include/asm/cache.h | 2 +- arch/arm/include/asm/cp15.h | 4 ++-- arch/arm/include/asm/cputype.h | 4 ++-- arch/arm/include/asm/current.h | 4 ++-- arch/arm/include/asm/delay.h | 4 ++-- arch/arm/include/asm/domain.h | 8 ++++---- arch/arm/include/asm/fpstate.h | 2 +- arch/arm/include/asm/ftrace.h | 6 +++--- arch/arm/include/asm/hardware/cache-b15-rac.h | 2 +- arch/arm/include/asm/hardware/cache-l2x0.h | 4 ++-- arch/arm/include/asm/hardware/dec21285.h | 2 +- arch/arm/include/asm/hardware/ioc.h | 2 +- arch/arm/include/asm/hardware/iomd.h | 4 ++-- arch/arm/include/asm/hardware/memc.h | 2 +- arch/arm/include/asm/hwcap.h | 2 +- arch/arm/include/asm/irq.h | 2 +- arch/arm/include/asm/jump_label.h | 4 ++-- arch/arm/include/asm/kexec.h | 4 ++-- arch/arm/include/asm/kgdb.h | 4 ++-- arch/arm/include/asm/mach/arch.h | 2 +- arch/arm/include/asm/mcpm.h | 4 ++-- arch/arm/include/asm/memory.h | 4 ++-- arch/arm/include/asm/mpu.h | 4 ++-- arch/arm/include/asm/opcodes.h | 12 ++++++------ arch/arm/include/asm/page.h | 4 ++-- arch/arm/include/asm/pgtable-2level.h | 4 ++-- arch/arm/include/asm/pgtable-3level.h | 4 ++-- arch/arm/include/asm/pgtable-nommu.h | 4 ++-- arch/arm/include/asm/pgtable.h | 10 +++++----- arch/arm/include/asm/probes.h | 4 ++-- arch/arm/include/asm/proc-fns.h | 4 ++-- arch/arm/include/asm/ptrace.h | 4 ++-- arch/arm/include/asm/system_info.h | 4 ++-- arch/arm/include/asm/system_misc.h | 4 ++-- arch/arm/include/asm/thread_info.h | 2 +- arch/arm/include/asm/thread_notify.h | 2 +- arch/arm/include/asm/tlbflush.h | 10 +++++----- arch/arm/include/asm/tls.h | 4 ++-- arch/arm/include/asm/unified.h | 6 +++--- arch/arm/include/asm/unwind.h | 4 ++-- arch/arm/include/asm/v7m.h | 4 ++-- arch/arm/include/asm/vdso.h | 4 ++-- arch/arm/include/asm/vdso/cp15.h | 4 ++-- arch/arm/include/asm/vdso/gettimeofday.h | 4 ++-- arch/arm/include/asm/vdso/processor.h | 4 ++-- arch/arm/include/asm/vdso/vsyscall.h | 4 ++-- arch/arm/include/asm/vfp.h | 2 +- arch/arm/include/asm/virt.h | 4 ++-- arch/arm/include/uapi/asm/ptrace.h | 4 ++-- arch/arm/mach-at91/pm.h | 2 +- arch/arm/mach-exynos/smc.h | 4 ++-- .../mach-footbridge/include/mach/hardware.h | 2 +- arch/arm/mach-imx/hardware.h | 2 +- arch/arm/mach-imx/mxc.h | 2 +- arch/arm/mach-omap2/control.h | 8 ++++---- arch/arm/mach-omap2/soc.h | 4 ++-- arch/arm/mach-omap2/sram.h | 4 ++-- arch/arm/mach-pxa/irqs.h | 2 +- arch/arm/mach-pxa/pxa-regs.h | 2 +- arch/arm/mach-s3c/map-base.h | 2 +- arch/arm/mach-sa1100/include/mach/bitfield.h | 2 +- arch/arm/mach-sa1100/include/mach/hardware.h | 2 +- arch/arm/mach-tegra/reset.h | 2 +- arch/arm/mach-tegra/sleep.h | 2 +- arch/arm/tools/gen-mach-types | 2 +- arch/arm64/kernel/vdso32/Makefile | 1 - arch/hexagon/include/asm/hexagon_vm.h | 4 ++-- arch/hexagon/include/asm/mem-layout.h | 6 +++--- arch/hexagon/include/asm/page.h | 4 ++-- arch/hexagon/include/asm/processor.h | 4 ++-- arch/hexagon/include/asm/thread_info.h | 12 ++++++------ arch/hexagon/include/uapi/asm/registers.h | 4 ++-- arch/loongarch/vdso/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/platforms/cell/spufs/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 2 +- arch/xtensa/kernel/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/memory/emif.h | 4 ++-- drivers/net/wan/Makefile | 2 +- include/asm-generic/barrier.h | 4 ++-- include/asm-generic/bug.h | 4 ++-- include/asm-generic/current.h | 2 +- include/asm-generic/error-injection.h | 2 +- include/asm-generic/fixmap.h | 4 ++-- include/asm-generic/getorder.h | 4 ++-- include/asm-generic/int-ll64.h | 6 +++--- include/asm-generic/kprobes.h | 4 ++-- include/asm-generic/memory_model.h | 4 ++-- include/asm-generic/mmu.h | 2 +- include/asm-generic/pgtable-nop4d.h | 4 ++-- include/asm-generic/pgtable-nopmd.h | 4 ++-- include/asm-generic/pgtable-nopud.h | 4 ++-- include/asm-generic/rwonce.h | 4 ++-- include/asm-generic/signal.h | 4 ++-- include/asm-generic/vdso/vsyscall.h | 4 ++-- include/linux/amba/serial.h | 4 ++-- include/linux/annotate.h | 18 +++++++++--------- include/linux/arm-smccc.h | 10 +++++----- include/linux/bitmap.h | 4 ++-- include/linux/bits.h | 6 +++--- include/linux/cfi_types.h | 6 +++--- include/linux/compiler.h | 4 ++-- include/linux/compiler_types.h | 8 ++++---- include/linux/edd.h | 4 ++-- include/linux/err.h | 2 +- include/linux/export.h | 2 +- include/linux/init.h | 6 +++--- include/linux/ioport.h | 4 ++-- include/linux/irqchip/arm-gic-v3.h | 2 +- include/linux/irqchip/arm-gic.h | 4 ++-- include/linux/jump_label.h | 10 +++++----- include/linux/kexec.h | 2 +- include/linux/linkage.h | 6 +++--- include/linux/mem_encrypt.h | 4 ++-- include/linux/mmzone.h | 4 ++-- include/linux/objtool.h | 8 ++++---- include/linux/objtool_types.h | 4 ++-- include/linux/of_fdt.h | 4 ++-- include/linux/pe.h | 4 ++-- include/linux/percpu-defs.h | 4 ++-- include/linux/pfn.h | 2 +- include/linux/pgtable.h | 4 ++-- include/linux/platform_data/emif_plat.h | 4 ++-- include/linux/serial_s3c.h | 4 ++-- include/linux/static_call_types.h | 4 ++-- include/linux/ti-emif-sram.h | 2 +- include/linux/types.h | 4 ++-- include/soc/imx/cpu.h | 2 +- include/soc/tegra/flowctrl.h | 4 ++-- include/soc/tegra/fuse.h | 4 ++-- include/uapi/asm-generic/int-l64.h | 4 ++-- include/uapi/asm-generic/int-ll64.h | 4 ++-- include/uapi/asm-generic/signal-defs.h | 2 +- include/uapi/asm-generic/signal.h | 4 ++-- include/uapi/linux/a.out.h | 4 ++-- include/uapi/linux/const.h | 4 ++-- include/uapi/linux/edd.h | 4 ++-- include/uapi/linux/hdlc/ioctl.h | 4 ++-- include/uapi/linux/sched.h | 2 +- include/uapi/linux/types.h | 4 ++-- include/vdso/datapage.h | 6 +++--- include/vdso/helpers.h | 4 ++-- include/vdso/processor.h | 4 ++-- include/vdso/vsyscall.h | 4 ++-- include/xen/arm/interface.h | 2 +- include/xen/interface/xen-mca.h | 4 ++-- include/xen/interface/xen.h | 8 ++++---- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- tools/include/asm-generic/barrier.h | 4 ++-- tools/include/asm/alternative.h | 2 +- tools/include/linux/bits.h | 6 +++--- tools/include/linux/cfi_types.h | 6 +++--- tools/include/linux/compiler.h | 4 ++-- tools/include/linux/objtool_types.h | 4 ++-- tools/include/linux/static_call_types.h | 4 ++-- tools/include/uapi/linux/const.h | 4 ++-- .../trace/beauty/include/uapi/linux/sched.h | 2 +- .../testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- .../testing/selftests/riscv/cfi/cfi_rv_test.h | 2 +- .../testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 172 files changed, 329 insertions(+), 336 deletions(-)
Signature · 1 line
2.53.0
PATCH v5 1/8 arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
From: Thomas Huth <[email protected]>
__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.
--- arch/arm/include/uapi/asm/ptrace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/uapi/asm/ptrace.h +2 -2
@@ -110,7 +110,7 @@#define PT_DATA_ADDR 0x10004#define PT_TEXT_END_ADDR 0x10008 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This struct defines the way the registers are stored on the
@@ -149,6 +149,6 @@ struct pt_regs { #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */
Signature · 1 line
2.53.0
PATCH v5 2/8 arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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 now on the __ASSEMBLER__ macro that is provided by the compilers.
This is a completely mechanical patch (done with a simple "sed -i" statement).
--- arch/arm/include/asm/arch_gicv3.h | 4 ++-- arch/arm/include/asm/assembler.h | 2 +- arch/arm/include/asm/barrier.h | 4 ++-- arch/arm/include/asm/cache.h | 2 +- arch/arm/include/asm/cp15.h | 4 ++-- arch/arm/include/asm/cputype.h | 4 ++-- arch/arm/include/asm/current.h | 4 ++-- arch/arm/include/asm/delay.h | 4 ++-- arch/arm/include/asm/domain.h | 8 ++++---- arch/arm/include/asm/fpstate.h | 2 +- arch/arm/include/asm/ftrace.h | 6 +++--- arch/arm/include/asm/hardware/cache-b15-rac.h | 2 +- arch/arm/include/asm/hardware/cache-l2x0.h | 4 ++-- arch/arm/include/asm/hardware/dec21285.h | 2 +- arch/arm/include/asm/hardware/ioc.h | 2 +- arch/arm/include/asm/hardware/iomd.h | 4 ++-- arch/arm/include/asm/hardware/memc.h | 2 +- arch/arm/include/asm/hwcap.h | 2 +- arch/arm/include/asm/irq.h | 2 +- arch/arm/include/asm/jump_label.h | 4 ++-- arch/arm/include/asm/kexec.h | 4 ++-- arch/arm/include/asm/kgdb.h | 4 ++-- arch/arm/include/asm/mach/arch.h | 2 +- arch/arm/include/asm/mcpm.h | 4 ++-- arch/arm/include/asm/memory.h | 4 ++-- arch/arm/include/asm/mpu.h | 4 ++-- arch/arm/include/asm/opcodes.h | 12 ++++++------ arch/arm/include/asm/page.h | 4 ++-- arch/arm/include/asm/pgtable-2level.h | 4 ++-- arch/arm/include/asm/pgtable-3level.h | 4 ++-- arch/arm/include/asm/pgtable-nommu.h | 4 ++-- arch/arm/include/asm/pgtable.h | 10 +++++----- arch/arm/include/asm/probes.h | 4 ++-- arch/arm/include/asm/proc-fns.h | 4 ++-- arch/arm/include/asm/ptrace.h | 4 ++-- arch/arm/include/asm/system_info.h | 4 ++-- arch/arm/include/asm/system_misc.h | 4 ++-- arch/arm/include/asm/thread_info.h | 2 +- arch/arm/include/asm/thread_notify.h | 2 +- arch/arm/include/asm/tlbflush.h | 10 +++++----- arch/arm/include/asm/tls.h | 4 ++-- arch/arm/include/asm/unified.h | 6 +++--- arch/arm/include/asm/unwind.h | 4 ++-- arch/arm/include/asm/v7m.h | 4 ++-- arch/arm/include/asm/vdso.h | 4 ++-- arch/arm/include/asm/vdso/cp15.h | 4 ++-- arch/arm/include/asm/vdso/gettimeofday.h | 4 ++-- arch/arm/include/asm/vdso/processor.h | 4 ++-- arch/arm/include/asm/vdso/vsyscall.h | 4 ++-- arch/arm/include/asm/vfp.h | 2 +- arch/arm/include/asm/virt.h | 4 ++-- arch/arm/mach-at91/pm.h | 2 +- arch/arm/mach-exynos/smc.h | 4 ++-- arch/arm/mach-footbridge/include/mach/hardware.h | 2 +- arch/arm/mach-imx/hardware.h | 2 +- arch/arm/mach-imx/mxc.h | 2 +- arch/arm/mach-omap2/control.h | 8 ++++---- arch/arm/mach-omap2/soc.h | 4 ++-- arch/arm/mach-omap2/sram.h | 4 ++-- arch/arm/mach-pxa/irqs.h | 2 +- arch/arm/mach-pxa/pxa-regs.h | 2 +- arch/arm/mach-s3c/map-base.h | 2 +- arch/arm/mach-sa1100/include/mach/bitfield.h | 2 +- arch/arm/mach-sa1100/include/mach/hardware.h | 2 +- arch/arm/mach-tegra/reset.h | 2 +- arch/arm/mach-tegra/sleep.h | 2 +- arch/arm/tools/gen-mach-types | 2 +- drivers/memory/emif.h | 4 ++-- include/linux/arm-smccc.h | 6 +++--- 69 files changed, 130 insertions(+), 130 deletions(-)
arch/arm/include/asm/arch_gicv3.h +2 -2
@@ -7,7 +7,7 @@#ifndef __ASM_ARCH_GICV3_H#define __ASM_ARCH_GICV3_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h>
@@ -257,5 +257,5 @@ static inline bool gic_has_relaxed_pmr_sync(void)return false; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !__ASM_ARCH_GICV3_H */
arch/arm/include/asm/assembler.h +1 -1
@@ -13,7 +13,7 @@#ifndef __ASM_ASSEMBLER_H__#define __ASM_ASSEMBLER_H__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#error "Only include this from assembly code"#endif
arch/arm/include/asm/barrier.h +2 -2
@@ -2,7 +2,7 @@#ifndef __ASM_BARRIER_H#define __ASM_BARRIER_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define nop () __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
@@ -99,5 +99,5 @@ static inline unsigned long array_index_mask_nospec(unsigned long idx,#include <asm-generic/barrier.h> -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_BARRIER_H */
arch/arm/include/asm/cache.h +1 -1
@@ -26,7 +26,7 @@#define __read_mostly __section(".data..read_mostly") -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_ARCH_HAS_CACHE_LINE_SIZE int cache_line_size (void );#endif
arch/arm/include/asm/cp15.h +2 -2
@@ -40,7 +40,7 @@#define CR_AFE (1 << 29)/* Access flag enable */ #define CR_TE (1 << 30)/* Thumb exception enable */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if __LINUX_ARM_ARCH__ >=4 #define vectors_high () (get_cr() & CR_V)
@@ -117,6 +117,6 @@ static inline unsigned long get_cr(void)#endif /* ifdef CONFIG_CPU_CP15 / else */ -#endif /* ifndef __ASSEMBLY__ */ +#endif /* ifndef __ASSEMBLER__ */ #endif
arch/arm/include/asm/cputype.h +2 -2
@@ -109,7 +109,7 @@/* Qualcomm implemented cores */ #define ARM_CPU_PART_SCORPION 0x510002d0 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/stringify.h> #include <linux/kernel.h>
@@ -343,6 +343,6 @@ static inline int __attribute_const__ cpuid_feature_extract_field(u32 features,#define cpuid_feature_extract (reg, field) \ cpuid_feature_extract_field(read_cpuid_ext(reg), field) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/arm/include/asm/current.h +2 -2
@@ -7,7 +7,7 @@#ifndef _ASM_ARM_CURRENT_H#define _ASM_ARM_CURRENT_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/insn.h> struct task_struct ;
@@ -60,6 +60,6 @@ static __always_inline __attribute_const__ struct task_struct *get_current(void)#define current get_current() -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_ARM_CURRENT_H */
arch/arm/include/asm/delay.h +2 -2
@@ -41,7 +41,7 @@#define UDELAY_MULT UL(2147 * HZ + 483648 * HZ / 1000000)#define UDELAY_SHIFT 31 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct delay_timer { unsigned long (*read_current_timer)(void);
@@ -94,7 +94,7 @@ extern void __loop_const_udelay(unsigned long);#define ARCH_HAS_READ_CURRENT_TIMER extern void register_current_timer_delay (const struct delay_timer *timer); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* defined(_ARM_DELAY_H) */
arch/arm/include/asm/domain.h +4 -4
@@ -7,7 +7,7 @@#ifndef __ASM_PROC_DOMAIN_H#define __ASM_PROC_DOMAIN_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/thread_info.h> #include <asm/barrier.h> #endif
@@ -79,7 +79,7 @@#define DACR_UACCESS_ENABLE \ (__DACR_DEFAULT | domain_val(DOMAIN_USER, DOMAIN_CLIENT)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_CPU_CP15_MMU static __always_inline unsigned int get_domain(void)
@@ -124,7 +124,7 @@ static __always_inline void set_domain(unsigned int val)#define TUSERCOND (instr, cond) #instr #cond#endif -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ /* * Generate the T (user) versions of the LDR/STR and related
@@ -136,6 +136,6 @@ static __always_inline void set_domain(unsigned int val)#define TUSER (instr) instr#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* !__ASM_PROC_DOMAIN_H */
arch/arm/include/asm/fpstate.h +1 -1
@@ -9,7 +9,7 @@#define __ASM_ARM_FPSTATE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * VFP storage area has:
arch/arm/include/asm/ftrace.h +3 -3
@@ -12,7 +12,7 @@#define MCOUNT_ADDR ((unsigned long)(__gnu_mcount_nc))#define MCOUNT_INSN_SIZE 4/* sizeof mcount call */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __gnu_mcount_nc (void );#ifdef CONFIG_DYNAMIC_FTRACE
@@ -33,7 +33,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if defined(CONFIG_FRAME_POINTER ) && !defined(CONFIG_ARM_UNWIND )/*
@@ -79,6 +79,6 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self,unsigned long frame_pointer, unsigned long stack_pointer); -#endif /* ifndef __ASSEMBLY__ */ +#endif /* ifndef __ASSEMBLER__ */ #endif /* _ASM_ARM_FTRACE */
arch/arm/include/asm/hardware/cache-b15-rac.h +1 -1
@@ -1,7 +1,7 @@#ifndef __ASM_ARM_HARDWARE_CACHE_B15_RAC_H#define __ASM_ARM_HARDWARE_CACHE_B15_RAC_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void b15_flush_kern_cache_all (void );
arch/arm/include/asm/hardware/cache-l2x0.h +2 -2
@@ -147,7 +147,7 @@#define L2X0_WAY_SIZE_SHIFT 3 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __init l2x0_init (void __iomem *base,u32 aux_val,u32 aux_mask);#if defined(CONFIG_CACHE_L2X0 ) && defined(CONFIG_OF )extern int l2x0_of_init (u32 aux_val,u32 aux_mask);
@@ -187,6 +187,6 @@ struct l2x0_regs {extern struct l2x0_regs l2x0_saved_regs; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/arm/include/asm/hardware/dec21285.h +1 -1
@@ -15,7 +15,7 @@#define DC21285_PCI_IO 0x7c000000#define DC21285_PCI_MEM 0x80000000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <mach/hardware.h> #define DC21285_IO (x) ((volatile unsigned long *)(ARMCSR_BASE+(x)))#else
arch/arm/include/asm/hardware/ioc.h +1 -1
@@ -10,7 +10,7 @@#ifndef __ASMARM_HARDWARE_IOC_H#define __ASMARM_HARDWARE_IOC_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * We use __raw_base variants here so that we give the compiler the
arch/arm/include/asm/hardware/iomd.h +2 -2
@@ -11,7 +11,7 @@#define __ASMARM_HARDWARE_IOMD_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * We use __raw_base variants here so that we give the compiler the
@@ -167,7 +167,7 @@#define VDMA_START IOMD_VIDSTART#define VDMA_END IOMD_VIDEND -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned int vram_half_sam;#define video_set_dma (start,end,offset) \ do { \
arch/arm/include/asm/hardware/memc.h +1 -1
@@ -10,7 +10,7 @@#define VDMA_START 1#define VDMA_END 2 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void memc_write (unsigned int reg,unsigned long val);#define video_set_dma (start,end,offset) \
arch/arm/include/asm/hwcap.h +1 -1
@@ -4,7 +4,7 @@#include <uapi/asm/hwcap.h> -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * This yields a mask that user programs can use to figure out what * instruction set this cpu supports.
arch/arm/include/asm/irq.h +1 -1
@@ -22,7 +22,7 @@#define NO_IRQ ((unsigned int)(-1))#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct irqaction ;struct pt_regs ;
arch/arm/include/asm/jump_label.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_ARM_JUMP_LABEL_H#define _ASM_ARM_JUMP_LABEL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/unified.h>
@@ -49,5 +49,5 @@ struct jump_entry {jump_label_t key; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/arm/include/asm/kexec.h +2 -2
@@ -16,7 +16,7 @@#define KEXEC_ARM_ATAGS_OFFSET 0x1000#define KEXEC_ARM_ZIMAGE_OFFSET 0x8000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define ARCH_HAS_KIMAGE_ARCH struct kimage_arch {
@@ -78,6 +78,6 @@ static inline struct page *boot_pfn_to_page(unsigned long boot_pfn) }#define boot_pfn_to_page boot_pfn_to_page -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ARM_KEXEC_H */
arch/arm/include/asm/kgdb.h +2 -2
@@ -39,7 +39,7 @@#define KGDB_COMPILED_BREAK 0xe7ffdeff#define CACHE_FLUSH_IS_SAFE 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void arch_kgdb_breakpoint (void ) {
@@ -49,7 +49,7 @@ static inline void arch_kgdb_breakpoint(void)extern void kgdb_handle_bus_error (void );extern int kgdb_fault_expected; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * From Kevin Hilman:
arch/arm/include/asm/mach/arch.h +1 -1
@@ -7,7 +7,7 @@#include <linux/types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/reboot.h> struct tag ;
arch/arm/include/asm/mcpm.h +2 -2
@@ -24,7 +24,7 @@#define MAX_NR_CLUSTERS 2#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <asm/cacheflush.h>
@@ -307,7 +307,7 @@ struct sync_struct {#include <asm/asm-offsets.h> #define __CACHE_WRITEBACK_GRANULE CACHE_WRITEBACK_GRANULE -#endif /* ! __ASSEMBLY__ */ +#endif /* ! __ASSEMBLER__ */ /* Definitions for mcpm_sync_struct */ #define CPU_DOWN 0x11
arch/arm/include/asm/memory.h +2 -2
@@ -98,7 +98,7 @@#else /* CONFIG_MMU */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long setup_vectors_base (void );extern unsigned long vectors_base;#define VECTORS_BASE vectors_base
@@ -155,7 +155,7 @@ extern unsigned long vectors_base;*/ #define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Physical start and end address of the kernel sections. These addresses are
arch/arm/include/asm/mpu.h +2 -2
@@ -91,7 +91,7 @@#define PMSAv7_DATA_SIDE 0#define PMSAv7_INSTR_SIDE 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct mpu_rgn {/* Assume same attributes for d/i-side */
@@ -128,6 +128,6 @@ static inline void pmsav7_setup(void) {};static inline void pmsav8_setup (void ) {};#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/arm/include/asm/opcodes.h +6 -6
@@ -6,7 +6,7 @@#ifndef __ASM_ARM_OPCODES_H#define __ASM_ARM_OPCODES_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/linkage.h> extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);#endif
@@ -71,7 +71,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);* involving inline assembler. For .S files, the normal __opcode_*() macros * should do the right thing. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define ___opcode_swab32 (x) ___asm_opcode_swab32(x)#define ___opcode_swab16 (x) ___asm_opcode_swab16(x)
@@ -80,7 +80,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);#define ___opcode_identity32 (x) ___asm_opcode_identity32(x)#define ___opcode_identity16 (x) ___asm_opcode_identity16(x) -#else /* ! __ASSEMBLY__ */ +#else /* ! __ASSEMBLER__ */ #include <linux/types.h> #include <linux/swab.h>
@@ -92,7 +92,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);#define ___opcode_identity32 (x) ((u32)(x))#define ___opcode_identity16 (x) ((u16)(x)) -#endif /* ! __ASSEMBLY__ */ +#endif /* ! __ASSEMBLER__ */ #ifdef CONFIG_CPU_ENDIAN_BE8
@@ -111,7 +111,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);#define ___asm_opcode_to_mem_arm (x) ___asm_opcode_identity32(x)#define ___asm_opcode_to_mem_thumb16 (x) ___asm_opcode_identity16(x)#ifdef CONFIG_CPU_ENDIAN_BE32 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * On BE32 systems, using 32-bit accesses to store Thumb instructions will not * work in all cases, due to alignment constraints. For now, a correct
@@ -219,7 +219,7 @@ extern __u32 __opcode_to_mem_thumb32(__u32);#endif /* Helpers for the helpers. Don't use these directly. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define ___inst_arm (x) .long x#define ___inst_thumb16 (x) .short x#define ___inst_thumb32 (first, second) .short first, second
arch/arm/include/asm/page.h +2 -2
@@ -9,7 +9,7 @@#include <vdso/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifndef CONFIG_MMU
@@ -180,7 +180,7 @@ extern int pfn_valid(unsigned long);#define pfn_valid pfn_valid#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #include <asm/memory.h>
arch/arm/include/asm/pgtable-2level.h +2 -2
@@ -175,7 +175,7 @@#define L_PTE_MT_VECTORS (_AT(pteval_t, 0x0f) << 2)/* 1111 */ #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * The "pud_xxx()" functions here are trivial when the pmd is folded into
@@ -242,6 +242,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)*/ #define pmd_hugewillfault (pmd) (0) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_PGTABLE_2LEVEL_H */
arch/arm/include/asm/pgtable-3level.h +2 -2
@@ -109,7 +109,7 @@*/ #define L_PGD_SWAPPER (_AT(pgdval_t, 1) << 55)/* swapper_pg_dir entry */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define pud_none (pud) (!pud_val(pud))#define pud_bad (pud) (!(pud_val(pud) & PUD_TABLE_BIT))
@@ -245,6 +245,6 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,flush_pmd_entry (pmdp); } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_PGTABLE_3LEVEL_H */
arch/arm/include/asm/pgtable-nommu.h +2 -2
@@ -8,7 +8,7 @@#ifndef _ASMARM_PGTABLE_NOMMU_H#define _ASMARM_PGTABLE_NOMMU_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/slab.h> #include <asm/processor.h>
@@ -84,6 +84,6 @@ extern unsigned int kobjsize(const void *objp);#define v6_user_fns (0)#define xscale_mc_user_fns (0) -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* _ASMARM_PGTABLE_H */
arch/arm/include/asm/pgtable.h +5 -5
@@ -10,7 +10,7 @@#include <linux/const.h> #include <asm/proc-fns.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc..
@@ -52,7 +52,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];#define LIBRARY_TEXT_START 0x0c000000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void __pte_error (const char *file,int line,pte_t );extern void __pmd_error (const char *file,int line,pmd_t );extern void __pgd_error (const char *file,int line,pgd_t );
@@ -135,7 +135,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED | L_PTE_XN)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * The table below defines the page protection levels that we insert into our
@@ -146,7 +146,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,* 3) write implies read permissions */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern pgd_t swapper_pg_dir[PTRS_PER_PGD ];
@@ -329,7 +329,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)#define HAVE_ARCH_UNMAPPED_AREA #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* CONFIG_MMU */
arch/arm/include/asm/probes.h +2 -2
@@ -11,7 +11,7 @@#ifndef _ASM_PROBES_H#define _ASM_PROBES_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__typedef u32 probes_opcode_t ;
@@ -37,7 +37,7 @@ struct arch_probes_insn { bool kprobe_direct_exec; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * We assume one instruction can consume at most 64 bytes stack, which is
arch/arm/include/asm/proc-fns.h +2 -2
@@ -13,7 +13,7 @@#include <asm/glue-proc.h> #include <asm/page.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct mm_struct ;
@@ -196,6 +196,6 @@ static inline void cpu_set_ttbcr(unsigned int ttbcr)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __KERNEL__ */ #endif /* __ASM_PROCFNS_H */
arch/arm/include/asm/ptrace.h +2 -2
@@ -9,7 +9,7 @@#include <uapi/asm/ptrace.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bitfield.h> #include <linux/types.h>
@@ -198,5 +198,5 @@ static inline unsigned long it_advance(unsigned long cpsr)int syscall_trace_enter (struct pt_regs *regs);void syscall_trace_exit (struct pt_regs *regs); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
arch/arm/include/asm/system_info.h +2 -2
@@ -14,7 +14,7 @@#define CPU_ARCH_ARMv7 9#define CPU_ARCH_ARMv7M 10 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* information about the system we're running on */ extern unsigned int system_rev;
@@ -25,6 +25,6 @@ extern unsigned int mem_fclk_21285;extern int __pure cpu_architecture (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_ARM_SYSTEM_INFO_H */
arch/arm/include/asm/system_misc.h +2 -2
@@ -2,7 +2,7 @@#ifndef __ASM_ARM_SYSTEM_MISC_H#define __ASM_ARM_SYSTEM_MISC_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler.h> #include <linux/linkage.h>
@@ -37,6 +37,6 @@ static inline void harden_branch_predictor(void)extern unsigned int user_debug; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_ARM_SYSTEM_MISC_H */
arch/arm/include/asm/thread_info.h +1 -1
@@ -33,7 +33,7 @@#define OVERFLOW_STACK_SIZE SZ_4K -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct task_struct ;
arch/arm/include/asm/thread_notify.h +1 -1
@@ -9,7 +9,7 @@#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/notifier.h> #include <asm/thread_info.h>
arch/arm/include/asm/tlbflush.h +5 -5
@@ -7,7 +7,7 @@#ifndef _ASMARM_TLBFLUSH_H#define _ASMARM_TLBFLUSH_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__# include <linux/mm_types.h> #endif
@@ -200,7 +200,7 @@#error Unknown TLB model#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/sched.h>
@@ -641,7 +641,7 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf,#elif defined(CONFIG_SMP )/* !CONFIG_MMU */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void local_flush_tlb_all (void ) { }static inline void local_flush_tlb_mm (struct mm_struct *mm) { }static inline void local_flush_tlb_page (struct vm_area_struct *vma,unsigned long uaddr) { }
@@ -657,11 +657,11 @@ extern void flush_tlb_kernel_page(unsigned long kaddr);extern void flush_tlb_range (struct vm_area_struct *vma,unsigned long start,unsigned long end);extern void flush_tlb_kernel_range (unsigned long start,unsigned long end);extern void flush_bp_all (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_ARM_ERRATA_798181 extern void erratum_a15_798181_init (void );#else
arch/arm/include/asm/tls.h +2 -2
@@ -5,7 +5,7 @@#include <linux/compiler.h> #include <asm/thread_info.h> -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include <asm/asm-offsets.h> .macro switch_tls_none, base, tp, tpuser, tmp1, tmp2 .endm
@@ -68,7 +68,7 @@ ALT_UP_B(.L0_\@)#define switch_tls switch_tls_software#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__static inline void set_tls (unsigned long val) {
arch/arm/include/asm/unified.h +3 -3
@@ -8,7 +8,7 @@#ifndef __ASM_UNIFIED_H#define __ASM_UNIFIED_H -#if defined(__ASSEMBLY__) +#if defined(__ASSEMBLER__) .syntax unified#else __asm__(".syntax unified" );
@@ -29,7 +29,7 @@ __asm__(".syntax unified"); #define ARM(x...) #define THUMB(x...) x -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define W (instr) instr.w#else #define WASM (instr) #instr ".w"
@@ -42,7 +42,7 @@ __asm__(".syntax unified"); #define ARM(x...) x #define THUMB(x...) -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define W (instr) instr#else #define WASM (instr) #instr
arch/arm/include/asm/unwind.h +2 -2
@@ -8,7 +8,7 @@#ifndef __ASM_UNWIND_H#define __ASM_UNWIND_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Unwind reason code according the the ARM EABI documents */ enum unwind_reason_code {
@@ -44,7 +44,7 @@ void __aeabi_unwind_cpp_pr0(void);void __aeabi_unwind_cpp_pr1 (void );void __aeabi_unwind_cpp_pr2 (void ); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #ifdef CONFIG_ARM_UNWIND #define UNWIND(code...) code
arch/arm/include/asm/v7m.h +2 -2
@@ -89,10 +89,10 @@#define V7M_SCB_DCCISW 0x274/* D-cache clean and invalidate by set-way */ #define V7M_SCB_BPIALL 0x278/* D-cache clean and invalidate by set-way */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum reboot_mode ;void armv7m_restart (enum reboot_mode mode,const char *cmd); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */
arch/arm/include/asm/vdso.h +2 -2
@@ -6,7 +6,7 @@#define __VDSO_PAGES 4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct mm_struct ;
@@ -26,7 +26,7 @@ static inline void arm_install_vdso(struct mm_struct *mm, unsigned long addr)#endif /* CONFIG_VDSO */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __KERNEL__ */
arch/arm/include/asm/vdso/cp15.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_CP15_H#define __ASM_VDSO_CP15_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_CPU_CP15
@@ -33,6 +33,6 @@#endif /* CONFIG_CPU_CP15 */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_VDSO_CP15_H */
arch/arm/include/asm/vdso/gettimeofday.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_GETTIMEOFDAY_H#define __ASM_VDSO_GETTIMEOFDAY_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/barrier.h> #include <asm/errno.h>
@@ -135,6 +135,6 @@ static __always_inline u64 __arch_get_hw_counter(int clock_mode,#endif } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/arm/include/asm/vdso/processor.h +2 -2
@@ -5,7 +5,7 @@#ifndef __ASM_VDSO_PROCESSOR_H#define __ASM_VDSO_PROCESSOR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if __LINUX_ARM_ARCH__ ==6 || defined(CONFIG_ARM_ERRATA_754327 )#define cpu_relax () \
@@ -17,6 +17,6 @@#define cpu_relax () barrier()#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_VDSO_PROCESSOR_H */
arch/arm/include/asm/vdso/vsyscall.h +2 -2
@@ -2,7 +2,7 @@#ifndef __ASM_VDSO_VSYSCALL_H#define __ASM_VDSO_VSYSCALL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <vdso/datapage.h> #include <asm/cacheflush.h>
@@ -17,6 +17,6 @@ void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)/* The asm-generic header needs to be included after the definitions above */ #include <asm-generic/vdso/vsyscall.h> -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_VDSO_VSYSCALL_H */
arch/arm/include/asm/vfp.h +1 -1
@@ -90,7 +90,7 @@#define VFPOPDESC_UNUSED_MASK (0xFF << VFPOPDESC_UNUSED_BIT)#define VFPOPDESC_OPDESC_MASK (~(VFPOPDESC_LENGTH_MASK | VFPOPDESC_UNUSED_MASK)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__void vfp_disable (void );#endif
arch/arm/include/asm/virt.h +2 -2
@@ -15,7 +15,7 @@*/ #define BOOT_CPU_MODE_MISMATCH PSR_N_BIT -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/cacheflush.h> #ifdef CONFIG_ARM_VIRT_EXT
@@ -74,7 +74,7 @@ static inline bool is_kernel_in_hyp_mode(void)#define HVC_SET_VECTORS 0#define HVC_SOFT_RESTART 1 -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #define HVC_STUB_ERR 0xbadca11
arch/arm/mach-at91/pm.h +1 -1
@@ -25,7 +25,7 @@#define AT91_PM_ULP1 0x03#define AT91_PM_BACKUP 0x04 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct at91_pm_data { void __iomem *pmc; void __iomem *ramc[2];
arch/arm/mach-exynos/smc.h +2 -2
@@ -32,11 +32,11 @@#define SMC_REG_CLASS_SFR_W (0x1 << 30)#define SMC_REG_ID_SFR_W (addr) (SMC_REG_CLASS_SFR_W | ((addr) >> 2)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern void exynos_smc (u32 cmd,u32 arg1,u32 arg2,u32 arg3); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* op type for SMC_CMD_SAVE and SMC_CMD_SHUTDOWN */ #define OP_TYPE_CORE 0x0
arch/arm/mach-footbridge/include/mach/hardware.h +1 -1
@@ -79,7 +79,7 @@#define CPLD_UNMUTE 2#define CPLD_FLASH_WR_ENABLE 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern raw_spinlock_t nw_gpio_lock;extern void nw_gpio_modify_op (unsigned int mask,unsigned int set);extern void nw_gpio_modify_io (unsigned int mask,unsigned int in);
arch/arm/mach-imx/hardware.h +1 -1
@@ -7,7 +7,7 @@#ifndef __ASM_ARCH_MXC_HARDWARE_H__#define __ASM_ARCH_MXC_HARDWARE_H__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/io.h> #include <soc/imx/revision.h> #endif
arch/arm/mach-imx/mxc.h +1 -1
@@ -16,7 +16,7 @@#define IMX_DDR_TYPE_LPDDR2 1 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_SOC_IMX6SL static inline bool cpu_is_imx6sl (void )
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.
arch/arm/mach-pxa/irqs.h +1 -1
@@ -94,7 +94,7 @@#define PXA_NR_IRQS (IRQ_BOARD_START) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__struct irq_data ;struct pt_regs ;
arch/arm/mach-pxa/pxa-regs.h +1 -1
@@ -31,7 +31,7 @@#define io_v2p (x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))#define io_p2v (x) IOMEM(0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__# define __REG (x) (*((volatile u32 __iomem *)io_p2v(x)))/* With indexed regs we don't want to feed the index through io_p2v()
arch/arm/mach-s3c/map-base.h +1 -1
@@ -20,7 +20,7 @@#define S3C_ADDR_BASE 0xF6000000 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define S3C_ADDR (x) ((void __iomem __force *)S3C_ADDR_BASE + (x))#else #define S3C_ADDR (x) (S3C_ADDR_BASE + (x))
arch/arm/mach-sa1100/include/mach/bitfield.h +1 -1
@@ -15,7 +15,7 @@#ifndef __BITFIELD_H#define __BITFIELD_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define UData (Data) ((unsigned long) (Data))#else #define UData (Data) (Data)
arch/arm/mach-sa1100/include/mach/hardware.h +1 -1
@@ -39,7 +39,7 @@#define __MREG (x) IOMEM(io_p2v(x)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__# define __REG (x) (*((volatile unsigned long __iomem *)io_p2v(x)))# define __PREG (x) (io_v2p((unsigned long)&(x)))
arch/arm/mach-tegra/reset.h +1 -1
@@ -21,7 +21,7 @@#define RESET_DATA (x) ((TEGRA_RESET_##x)*4) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include "irammap.h"
arch/arm/mach-tegra/sleep.h +1 -1
@@ -38,7 +38,7 @@#define TEGRA_FLUSH_CACHE_LOUIS 0#define TEGRA_FLUSH_CACHE_ALL 1 -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* waits until the microsecond counter (base) is > rn */ .macro wait_until, rn, base, tmp add \rn, \rn, #1
arch/arm/tools/gen-mach-types +1 -1
@@ -29,7 +29,7 @@ END { printf(" */\n\n"); printf("#ifndef __ASM_ARM_MACH_TYPE_H\n"); printf("#define __ASM_ARM_MACH_TYPE_H\n\n"); - printf("#ifndef __ASSEMBLY__\n"); + printf("#ifndef __ASSEMBLER__\n"); printf("/* The type of machine we're running on */\n"); printf("extern unsigned int __machine_arch_type;\n"); printf("#endif\n\n");
drivers/memory/emif.h +2 -2
@@ -558,7 +558,7 @@#define EMIF_SRAM_AM33_REG_LAYOUT 0x00000000#define EMIF_SRAM_AM43_REG_LAYOUT 0x00000001 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Structure containing shadow of important registers in EMIF * The calculation function fills in this structure to be later used for
@@ -603,5 +603,5 @@ void ti_emif_enter_sr(void);void ti_emif_exit_sr (void );void ti_emif_abort_sr (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __EMIF_H */
include/linux/arm-smccc.h +3 -3
@@ -8,7 +8,7 @@#include <linux/args.h> #include <linux/init.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/uuid.h> #endif
@@ -353,7 +353,7 @@ s32 arm_smccc_get_soc_id_version(void);*/ s32 arm_smccc_get_soc_id_revision (void ); -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Returns whether a specific hypervisor UUID is advertised for the
@@ -402,7 +402,7 @@ static inline u32 smccc_uuid_to_reg(const uuid_t *uuid, int reg) return val; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /** * struct arm_smccc_res - Result from SMC/HVC call
Signature · 1 line
2.53.0
PATCH v5 3/8 hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.
--- arch/hexagon/include/uapi/asm/registers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/hexagon/include/uapi/asm/registers.h +2 -2
@@ -7,7 +7,7 @@#ifndef _ASM_REGISTERS_H#define _ASM_REGISTERS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* See kernel/entry.S for further documentation. */
@@ -224,6 +224,6 @@ struct pt_regs { (regs)->hvmer.vmest = (HVM_VMEST_UM_MSK <<HVM_VMEST_UM_SFT ) \ | (HVM_VMEST_IE_MSK << HVM_VMEST_IE_SFT) -#endif /* ifndef __ASSEMBLY */ +#endif /* ifndef __ASSEMBLER__ */ #endif
Signature · 1 line
2.53.0
PATCH v5 4/8 hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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 now on the __ASSEMBLER__ macro that is provided by the compilers.
This is a completely mechanical patch (done with a simple "sed -i" statement).
--- arch/hexagon/include/asm/hexagon_vm.h | 4 ++-- arch/hexagon/include/asm/mem-layout.h | 6 +++--- arch/hexagon/include/asm/page.h | 4 ++-- arch/hexagon/include/asm/processor.h | 4 ++-- arch/hexagon/include/asm/thread_info.h | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-)
arch/hexagon/include/asm/hexagon_vm.h +2 -2
@@ -39,7 +39,7 @@#define HVM_TRAP1_VMGETREGS 22#define HVM_TRAP1_VMTIMEROP 24 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum VM_CACHE_OPS { hvmc_ickill,
@@ -178,7 +178,7 @@ static inline long __vmintop_clear(long i)#else /* Only assembly code should reference these */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Constants for virtual instruction parameters and return values
arch/hexagon/include/asm/mem-layout.h +3 -3
@@ -25,7 +25,7 @@*/ #ifdef CONFIG_HEXAGON_PHYS_OFFSET -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned long __phys_offset;#endif #define PHYS_OFFSET __phys_offset
@@ -44,7 +44,7 @@ extern unsigned long __phys_offset;#define STACK_TOP TASK_SIZE#define STACK_TOP_MAX TASK_SIZE -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum fixed_addresses {FIX_KMAP_BEGIN , FIX_KMAP_END, /* check for per-cpuism */
@@ -101,7 +101,7 @@ extern int max_kernel_seg;* and pkmap_base begins. */ #define VMALLOC_END (PKMAP_BASE-PAGE_SIZE*2) -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _ASM_HEXAGON_MEM_LAYOUT_H */
arch/hexagon/include/asm/page.h +2 -2
@@ -48,7 +48,7 @@#include <vdso/page.h> #ifdef __KERNEL__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This is for PFN_DOWN, which mm.h needs. Seems the right place to pull it in.
@@ -127,7 +127,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)/* XXX Todo: implement assembly-optimized version of getorder. */ #include <asm-generic/getorder.h> -#endif /* ifdef __ASSEMBLY__ */ +#endif /* ifdef __ASSEMBLER__ */ #endif /* ifdef __KERNEL__ */ #endif
arch/hexagon/include/asm/processor.h +2 -2
@@ -8,7 +8,7 @@#ifndef _ASM_PROCESSOR_H#define _ASM_PROCESSOR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/mem-layout.h> #include <asm/registers.h>
@@ -124,6 +124,6 @@ struct hexagon_switch_stack {unsigned long lr; }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif
arch/hexagon/include/asm/thread_info.h +6 -6
@@ -10,7 +10,7 @@#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/processor.h> #include <asm/registers.h> #include <asm/page.h>
@@ -20,7 +20,7 @@#define THREAD_SIZE (1<<THREAD_SHIFT)#define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This is union'd with the "bottom" of the kernel stack.
@@ -47,13 +47,13 @@ struct thread_info {unsigned long sp; }; -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #include <asm/asm-offsets.h> -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define INIT_THREAD_INFO (tsk) \ { \
@@ -73,7 +73,7 @@ struct thread_info { register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);#define current_thread_info () __current_thread_info -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * thread information flags
Signature · 1 line
2.53.0
PATCH v5 5/8 kselftest/riscv: Replace __ASSEMBLY__ with __ASSEMBLER__
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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 now on the __ASSEMBLER__ macro that is provided by the compilers.
--- tools/testing/selftests/riscv/cfi/cfi_rv_test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/riscv/cfi/cfi_rv_test.h +1 -1
@@ -56,7 +56,7 @@#define CSR_SSP 0x011 -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define __ASM_STR (x) x#else #define __ASM_STR (x) #x
Signature · 1 line
2.53.0
PATCH v5 6/8 uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.
--- Documentation/dev-tools/checkuapi.rst | 2 +- include/uapi/asm-generic/int-l64.h | 4 ++-- include/uapi/asm-generic/int-ll64.h | 4 ++-- include/uapi/asm-generic/signal-defs.h | 2 +- include/uapi/asm-generic/signal.h | 4 ++-- include/uapi/linux/a.out.h | 4 ++-- include/uapi/linux/const.h | 4 ++-- include/uapi/linux/edd.h | 4 ++-- include/uapi/linux/hdlc/ioctl.h | 4 ++-- include/uapi/linux/sched.h | 2 +- include/uapi/linux/types.h | 4 ++-- tools/include/uapi/linux/const.h | 4 ++-- tools/perf/trace/beauty/include/uapi/linux/sched.h | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-)
Documentation/dev-tools/checkuapi.rst +1 -1
@@ -273,7 +273,7 @@ Consider this change:: -typedef unsigned __bitwise __poll_t; +typedef unsigned short __bitwise __poll_t; - #endif /* __ASSEMBLY__ */ + #endif /* __ASSEMBLER__ */ #endif /* _UAPI_LINUX_TYPES_H */ EOF
include/uapi/asm-generic/int-l64.h +2 -2
@@ -11,7 +11,7 @@#include <asm/bitsperlong.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the * header files exported to user space
@@ -29,7 +29,7 @@ typedef unsigned int __u32;typedef __signed__ long __s64 ;typedef unsigned long __u64 ; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_ASM_GENERIC_INT_L64_H */
include/uapi/asm-generic/int-ll64.h +2 -2
@@ -11,7 +11,7 @@#include <asm/bitsperlong.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the * header files exported to user space
@@ -34,7 +34,7 @@ typedef __signed__ long long __s64;typedef unsigned long long __u64 ;#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_ASM_GENERIC_INT_LL64_H */
include/uapi/asm-generic/signal-defs.h +1 -1
@@ -78,7 +78,7 @@#define SIG_SETMASK 2/* for setting the signal mask */ #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__typedef void __signalfn_t (int );typedef __signalfn_t __user *__sighandler_t ;
include/uapi/asm-generic/signal.h +2 -2
@@ -57,7 +57,7 @@#define SIGSTKSZ 8192#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__typedef struct {unsigned long sig[_NSIG_WORDS]; }sigset_t ;
@@ -88,6 +88,6 @@ typedef struct sigaltstack {__kernel_size_t ss_size; } stack_t; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI__ASM_GENERIC_SIGNAL_H */
include/uapi/linux/a.out.h +2 -2
@@ -10,7 +10,7 @@#endif /* __STRUCT_EXEC_OVERRIDE__ */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* these go in the N_MACHTYPE field */ enum machine_type {
@@ -247,5 +247,5 @@ struct relocation_info };#endif /* no N_RELOCATION_INFO_DECLARED. */ -#endif /*__ASSEMBLY__ */ +#endif /*__ASSEMBLER__ */ #endif /* _UAPI__A_OUT_GNU_H__ */
include/uapi/linux/const.h +2 -2
@@ -13,7 +13,7 @@* leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _AC (X ,Y ) X#define _AT (T ,X ) X#else
@@ -28,7 +28,7 @@#define _BITUL (x) (_UL(1) << (x))#define _BITULL (x) (_ULL(1) << (x)) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing asm support *
include/uapi/linux/edd.h +2 -2
@@ -53,7 +53,7 @@#define EDD_MBR_SIG_NR_BUF 0x1ea/* addr of number of MBR signtaures at EDD_MBR_SIG_BUF in boot_params - treat this as 1 byte */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define EDD_EXT_FIXED_DISK_ACCESS (1 << 0)#define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1)
@@ -187,6 +187,6 @@ struct edd {unsigned char edd_info_nr; }; -#endif /*!__ASSEMBLY__ */ +#endif /*!__ASSEMBLER__ */ #endif /* _UAPI_LINUX_EDD_H */
include/uapi/linux/hdlc/ioctl.h +2 -2
@@ -35,7 +35,7 @@#define LMI_CCITT 3/* ITU-T Annex A */ #define LMI_CISCO 4/* The "original" LMI, aka Gang of Four */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ typedef struct { unsigned int clock_rate; /* bits per second */
@@ -90,5 +90,5 @@ typedef struct {/* PPP doesn't need any info now - supply length = 0 to ioctl */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __HDLC_IOCTL_H__ */
include/uapi/linux/sched.h +1 -1
@@ -43,7 +43,7 @@*/ #define CLONE_NEWTIME 0x00000080/* New time namespace */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct clone_args - arguments for the clone3 syscall * @flags: Flags for the new process as listed above.
include/uapi/linux/types.h +2 -2
@@ -4,7 +4,7 @@#include <asm/types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifndef __KERNEL__#ifndef __EXPORTED_HEADERS__#warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
@@ -59,5 +59,5 @@ typedef __u32 __bitwise __wsum;typedef unsigned __bitwise __poll_t ; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_LINUX_TYPES_H */
tools/include/uapi/linux/const.h +2 -2
@@ -13,7 +13,7 @@* leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _AC (X ,Y ) X#define _AT (T ,X ) X#else
@@ -28,7 +28,7 @@#define _BITUL (x) (_UL(1) << (x))#define _BITULL (x) (_ULL(1) << (x)) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing asm support *
tools/perf/trace/beauty/include/uapi/linux/sched.h +1 -1
@@ -43,7 +43,7 @@*/ #define CLONE_NEWTIME 0x00000080/* New time namespace */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct clone_args - arguments for the clone3 syscall * @flags: Flags for the new process as listed above.
Signature · 1 line
2.53.0
PATCH v5 7/8 include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
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 now on the __ASSEMBLER__ macro that is provided by the compilers.
This is a completely mechanical patch (done with a simple "sed -i" statement), except for some manual tweaking in the files include/linux/irqchip/arm-gic.h and include/soc/tegra/flowctrl.h (which got the macro wrong in a comment).
--- include/asm-generic/barrier.h | 4 ++-- include/asm-generic/bug.h | 4 ++-- include/asm-generic/current.h | 2 +- include/asm-generic/error-injection.h | 2 +- include/asm-generic/fixmap.h | 4 ++-- include/asm-generic/getorder.h | 4 ++-- include/asm-generic/int-ll64.h | 6 +++--- include/asm-generic/kprobes.h | 4 ++-- include/asm-generic/memory_model.h | 4 ++-- include/asm-generic/mmu.h | 2 +- include/asm-generic/pgtable-nop4d.h | 4 ++-- include/asm-generic/pgtable-nopmd.h | 4 ++-- include/asm-generic/pgtable-nopud.h | 4 ++-- include/asm-generic/rwonce.h | 4 ++-- include/asm-generic/signal.h | 4 ++-- include/asm-generic/vdso/vsyscall.h | 4 ++-- include/linux/amba/serial.h | 4 ++-- include/linux/annotate.h | 18 +++++++++--------- include/linux/arm-smccc.h | 4 ++-- include/linux/bitmap.h | 4 ++-- include/linux/bits.h | 6 +++--- include/linux/cfi_types.h | 6 +++--- include/linux/compiler.h | 4 ++-- include/linux/compiler_types.h | 8 ++++---- include/linux/edd.h | 4 ++-- include/linux/err.h | 2 +- include/linux/export.h | 2 +- include/linux/init.h | 6 +++--- include/linux/ioport.h | 4 ++-- include/linux/irqchip/arm-gic-v3.h | 2 +- include/linux/irqchip/arm-gic.h | 4 ++-- include/linux/jump_label.h | 10 +++++----- include/linux/kexec.h | 2 +- include/linux/linkage.h | 6 +++--- include/linux/mem_encrypt.h | 4 ++-- include/linux/mmzone.h | 4 ++-- include/linux/objtool.h | 8 ++++---- include/linux/objtool_types.h | 4 ++-- include/linux/of_fdt.h | 4 ++-- include/linux/pe.h | 4 ++-- include/linux/percpu-defs.h | 4 ++-- include/linux/pfn.h | 2 +- include/linux/pgtable.h | 4 ++-- include/linux/platform_data/emif_plat.h | 4 ++-- include/linux/serial_s3c.h | 4 ++-- include/linux/static_call_types.h | 4 ++-- include/linux/ti-emif-sram.h | 2 +- include/linux/types.h | 4 ++-- include/soc/imx/cpu.h | 2 +- include/soc/tegra/flowctrl.h | 4 ++-- include/soc/tegra/fuse.h | 4 ++-- include/vdso/datapage.h | 6 +++--- include/vdso/helpers.h | 4 ++-- include/vdso/processor.h | 4 ++-- include/vdso/vsyscall.h | 4 ++-- include/xen/arm/interface.h | 2 +- include/xen/interface/xen-mca.h | 4 ++-- include/xen/interface/xen.h | 8 ++++---- tools/include/asm-generic/barrier.h | 4 ++-- tools/include/asm/alternative.h | 2 +- tools/include/linux/bits.h | 6 +++--- tools/include/linux/cfi_types.h | 6 +++--- tools/include/linux/compiler.h | 4 ++-- tools/include/linux/objtool_types.h | 4 ++-- tools/include/linux/static_call_types.h | 4 ++-- 65 files changed, 142 insertions(+), 142 deletions(-)
include/asm-generic/barrier.h +2 -2
@@ -11,7 +11,7 @@#ifndef __ASM_GENERIC_BARRIER_H#define __ASM_GENERIC_BARRIER_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler.h> #include <linux/kcsan-checks.h>
@@ -302,5 +302,5 @@ do { \# define smp_mb__after_switch_mm () smp_mb()#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_GENERIC_BARRIER_H */
include/asm-generic/bug.h +2 -2
@@ -26,7 +26,7 @@#endif #endif /* WARN_CONDITION_STR */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/panic.h> #include <linux/printk.h>
@@ -258,6 +258,6 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);# define WARN_ON_SMP (x) ({0;})#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
include/asm-generic/current.h +1 -1
@@ -2,7 +2,7 @@#ifndef __ASM_GENERIC_CURRENT_H#define __ASM_GENERIC_CURRENT_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/thread_info.h> #define get_current () (current_thread_info()->task)
include/asm-generic/error-injection.h +1 -1
@@ -2,7 +2,7 @@#ifndef _ASM_GENERIC_ERROR_INJECTION_H#define _ASM_GENERIC_ERROR_INJECTION_H -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)enum {EI_ETYPE_NULL ,/* Return NULL if failure */ EI_ETYPE_ERRNO, /* Return -ERRNO if failure */
include/asm-generic/fixmap.h +2 -2
@@ -21,7 +21,7 @@#define __fix_to_virt (x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))#define __virt_to_fix (x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * 'index to address' translation. If anyone tries to use the idx * directly without translation, we catch the bug with a NULL-deference
@@ -97,5 +97,5 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)#define set_fixmap_io (idx, phys) \ __set_fixmap(idx, phys, FIXMAP_PAGE_IO) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_GENERIC_FIXMAP_H */
include/asm-generic/getorder.h +2 -2
@@ -2,7 +2,7 @@#ifndef __ASM_GENERIC_GETORDER_H#define __ASM_GENERIC_GETORDER_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler.h> #include <linux/log2.h>
@@ -47,6 +47,6 @@ static __always_inline __attribute_const__ int get_order(unsigned long size)#endif } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_GENERIC_GETORDER_H */
include/asm-generic/int-ll64.h +3 -3
@@ -11,7 +11,7 @@#include <uapi/asm-generic/int-ll64.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__typedef __s8 s8 ;typedef __u8 u8 ;
@@ -31,7 +31,7 @@ typedef __u64 u64;#define S64_C (x) x ## LL#define U64_C (x) x ## ULL -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define S8_C (x) x#define U8_C (x) x
@@ -42,6 +42,6 @@ typedef __u64 u64;#define S64_C (x) x#define U64_C (x) x -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_GENERIC_INT_LL64_H */
include/asm-generic/kprobes.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_GENERIC_KPROBES_H#define _ASM_GENERIC_KPROBES_H -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)#ifdef CONFIG_KPROBES /* * Blacklist ganerating macro. Specify functions which is not probed
@@ -21,6 +21,6 @@ static unsigned long __used \# define __kprobes# define nokprobe_inline inline#endif -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */ #endif /* _ASM_GENERIC_KPROBES_H */
include/asm-generic/memory_model.h +2 -2
@@ -4,7 +4,7 @@#include <linux/pfn.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * supports 3 memory models.
@@ -86,6 +86,6 @@ static inline int pfn_valid(unsigned long pfn)#endif /* CONFIG_DEBUG_VIRTUAL */ #define phys_to_page (phys) pfn_to_page(PHYS_PFN(phys)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif
include/asm-generic/mmu.h +1 -1
@@ -6,7 +6,7 @@* This is the mmu.h header for nommu implementations. * Architectures with an MMU need something more complex. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ typedef struct { unsigned long end_brk;
include/asm-generic/pgtable-nop4d.h +2 -2
@@ -2,7 +2,7 @@#ifndef _PGTABLE_NOP4D_H#define _PGTABLE_NOP4D_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define __PAGETABLE_P4D_FOLDED 1
@@ -54,5 +54,5 @@ static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)#undef p4d_addr_end#define p4d_addr_end (addr, end) (end) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _PGTABLE_NOP4D_H */
include/asm-generic/pgtable-nopmd.h +2 -2
@@ -2,7 +2,7 @@#ifndef _PGTABLE_NOPMD_H#define _PGTABLE_NOPMD_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm-generic/pgtable-nopud.h>
@@ -68,6 +68,6 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)#undef pmd_addr_end#define pmd_addr_end (addr, end) (end) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _PGTABLE_NOPMD_H */
include/asm-generic/pgtable-nopud.h +2 -2
@@ -2,7 +2,7 @@#ifndef _PGTABLE_NOPUD_H#define _PGTABLE_NOPUD_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm-generic/pgtable-nop4d.h>
@@ -62,5 +62,5 @@ static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)#undef pud_addr_end#define pud_addr_end (addr, end) (end) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _PGTABLE_NOPUD_H */
include/asm-generic/rwonce.h +2 -2
@@ -20,7 +20,7 @@#ifndef __ASM_GENERIC_RWONCE_H#define __ASM_GENERIC_RWONCE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler_types.h> #include <linux/kasan-checks.h>
@@ -94,5 +94,5 @@ unsigned long read_word_at_a_time(const void *addr)return *(unsigned long *)addr; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_GENERIC_RWONCE_H */
include/asm-generic/signal.h +2 -2
@@ -4,10 +4,10 @@#include <uapi/asm-generic/signal.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/sigcontext.h> #undef __HAVE_ARCH_SIG_BITOPS -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_GENERIC_SIGNAL_H */
include/asm-generic/vdso/vsyscall.h +2 -2
@@ -2,7 +2,7 @@#ifndef __ASM_GENERIC_VSYSCALL_H#define __ASM_GENERIC_VSYSCALL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifndef __arch_get_vdso_u_time_data static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
@@ -30,6 +30,6 @@ static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vd }#endif /* __arch_sync_vdso_time_data */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_GENERIC_VSYSCALL_H */
include/linux/amba/serial.h +2 -2
@@ -10,7 +10,7 @@#ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H #define ASM_ARM_HARDWARE_SERIAL_AMBA_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/bitfield.h> #include <linux/bits.h> #endif
@@ -215,7 +215,7 @@#define UART01x_RSR_ANY (UART01x_RSR_OE | UART01x_RSR_BE | UART01x_RSR_PE | UART01x_RSR_FE)#define UART01x_FR_MODEM_ANY (UART01x_FR_DCD | UART01x_FR_DSR | UART01x_FR_CTS) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct amba_device; /* in uncompress this is included but amba/bus.h is not */ struct amba_pl010_data { void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl);
include/linux/annotate.h +9 -9
@@ -11,7 +11,7 @@ .long label - ., type; \ .popsection -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define ASM_ANNOTATE_LABEL (label, type) \ __stringify(__ASM_ANNOTATE(.discard.annotate_insn, label, type))
@@ -24,7 +24,7 @@"912: " \ __stringify(__ASM_ANNOTATE(.discard.annotate_data, 912b, type)) -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ .macro ANNOTATE type .Lhere_\@:
@@ -36,22 +36,22 @@ __ASM_ANNOTATE(.discard.annotate_data, .Lhere_\@, \type) .endm -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* !CONFIG_OBJTOOL */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define ASM_ANNOTATE_LABEL (label, type) ""#define ASM_ANNOTATE (type)#define ASM_ANNOTATE_DATA (type) -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ .macro ANNOTATE type .endm .macro ANNOTATE_DATA type .endm -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* !CONFIG_OBJTOOL */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Annotate away the various 'relocation to !ENDBR` complaints; knowing that
@@ -111,7 +111,7 @@*/ #define ANNOTATE_DATA_SPECIAL ASM_ANNOTATE_DATA(ANNOTYPE_DATA_SPECIAL) -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define ANNOTATE_NOENDBR ANNOTATE type=ANNOTYPE_NOENDBR#define ANNOTATE_RETPOLINE_SAFE ANNOTATE type=ANNOTYPE_RETPOLINE_SAFE/* ANNOTATE_INSTR_BEGIN ANNOTATE type=ANNOTYPE_INSTR_BEGIN */
@@ -122,6 +122,6 @@#define ANNOTATE_REACHABLE ANNOTATE type=ANNOTYPE_REACHABLE#define ANNOTATE_NOCFI_SYM ANNOTATE type=ANNOTYPE_NOCFI#define ANNOTATE_DATA_SPECIAL ANNOTATE_DATA type=ANNOTYPE_DATA_SPECIAL -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_ANNOTATE_H */
include/linux/arm-smccc.h +2 -2
@@ -302,7 +302,7 @@#define SMCCC_RET_NOT_REQUIRED -2#define SMCCC_RET_INVALID_PARAMETER -3 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/linkage.h> #include <linux/types.h>
@@ -750,5 +750,5 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1, })#endif /*CONFIG_ARM64*/ -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /*__LINUX_ARM_SMCCC_H*/
include/linux/bitmap.h +2 -2
@@ -2,7 +2,7 @@#ifndef __LINUX_BITMAP_H#define __LINUX_BITMAP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/align.h> #include <linux/bitops.h>
@@ -846,6 +846,6 @@ void bitmap_write(unsigned long *map, unsigned long value,#define bitmap_set_value8 (map, value, start) \ bitmap_write(map, value, start, BITS_PER_BYTE) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __LINUX_BITMAP_H */
include/linux/bits.h +3 -3
@@ -17,7 +17,7 @@* position @h. For example * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing asm support
@@ -75,7 +75,7 @@#define BIT_U32 (nr) BIT_TYPE(u32, nr)#define BIT_U64 (nr) BIT_TYPE(u64, nr) -#else /* defined(__ASSEMBLY__) */ +#else /* defined(__ASSEMBLER__) */ /* * BUILD_BUG_ON_ZERO is not available in h files included from asm files,
@@ -84,6 +84,6 @@#define GENMASK (h, l) __GENMASK(h, l)#define GENMASK_ULL (h, l) __GENMASK_ULL(h, l) -#endif /* !defined(__ASSEMBLY__) */ +#endif /* !defined(__ASSEMBLER__) */ #endif /* __LINUX_BITS_H */
include/linux/cfi_types.h +3 -3
@@ -5,7 +5,7 @@#ifndef _LINUX_CFI_TYPES_H#define _LINUX_CFI_TYPES_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include <linux/linkage.h> #ifdef CONFIG_CFI
@@ -41,7 +41,7 @@ SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)#endif -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_CFI #define DEFINE_CFI_TYPE (name, func) \
@@ -64,5 +64,5 @@ );#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_CFI_TYPES_H */
include/linux/compiler.h +2 -2
@@ -4,7 +4,7 @@#include <linux/compiler_types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef __KERNEL__
@@ -263,7 +263,7 @@ static inline void *offset_to_ptr(const int *off) return (void *)((unsigned long)off + *off); } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * Force the compiler to emit 'sym' as a symbol, so that we can reference
include/linux/compiler_types.h +4 -4
@@ -15,7 +15,7 @@#define ___PASTE (a, b) a##b#define __PASTE (a, b) ___PASTE(a, b) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * C23 introduces "auto" as a standard way to define type-inferred
@@ -461,7 +461,7 @@ struct ftrace_likely_data {#endif /* __KERNEL__ */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * The below symbols may be defined for one or more, but not ALL, of the above
@@ -605,7 +605,7 @@ struct ftrace_likely_data {#define asm_inline asm#endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Use __typeof_unqual__() when available. */
@@ -641,7 +641,7 @@ struct ftrace_likely_data {#else #define __unqual_scalar_typeof (x) __typeof_unqual__(x)#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ /* * __signed_scalar_typeof(x) - Declare a signed scalar type, leaving
include/linux/edd.h +2 -2
@@ -23,7 +23,7 @@#include <uapi/linux/edd.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern struct edd edd; -#endif /*!__ASSEMBLY__ */ +#endif /*!__ASSEMBLER__ */ #endif /* _LINUX_EDD_H */
include/linux/err.h +1 -1
@@ -17,7 +17,7 @@*/ #define MAX_ERRNO 4095 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * IS_ERR_VALUE - Detect an error pointer.
include/linux/export.h +1 -1
@@ -51,7 +51,7 @@#define __EXPORT_SYMBOL (sym, license, ns) __GENKSYMS_EXPORT_SYMBOL(sym) -#elif defined(__ASSEMBLY__) +#elif defined(__ASSEMBLER__)#define __EXPORT_SYMBOL (sym, license, ns) \ ___EXPORT_SYMBOL(sym, license, ns)
include/linux/init.h +3 -3
@@ -102,7 +102,7 @@#define __REFDATA .section ".ref.data", "aw"#define __REFCONST .section ".ref.rodata", "a" -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * Used for initialization calls.. */
@@ -180,7 +180,7 @@ extern struct module __this_module;#ifndef MODULE -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * initcalls are now grouped by functionality into separate
@@ -375,7 +375,7 @@ extern const struct obs_kernel_param __setup_start[], __setup_end[];/* Relies on boot_command_line being set */ void __init parse_early_param (void );void __init parse_early_options (char *cmdline); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* MODULE */
include/linux/ioport.h +2 -2
@@ -9,7 +9,7 @@#ifndef _LINUX_IOPORT_H#define _LINUX_IOPORT_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/args.h> #include <linux/bits.h> #include <linux/compiler.h>
@@ -445,5 +445,5 @@ static inline void irqresource_disabled(struct resource *res, u32 irq)extern struct address_space *iomem_get_mapping (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_IOPORT_H */
include/linux/irqchip/arm-gic-v3.h +1 -1
@@ -604,7 +604,7 @@#include <asm/arch_gicv3.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * We need a value to serve as a irq-type for LPIs. Choose one that will
include/linux/irqchip/arm-gic.h +2 -2
@@ -131,7 +131,7 @@#define GICV_PMR_PRIORITY_SHIFT 3#define GICV_PMR_PRIORITY_MASK (0x1f << GICV_PMR_PRIORITY_SHIFT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/irqdomain.h>
@@ -162,5 +162,5 @@ int gic_get_cpu_id(unsigned int cpu);void gic_migrate_target (unsigned int new_cpu_id);unsigned long gic_get_sgir_physaddr (void ); -#endif /* __ASSEMBLY */ +#endif /* __ASSEMBLER__ */ #endif
include/linux/jump_label.h +5 -5
@@ -71,7 +71,7 @@* Additional babbling in: Documentation/staging/static-keys.rst */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #include <linux/compiler.h>
@@ -107,12 +107,12 @@ struct static_key {#endif /* CONFIG_JUMP_LABEL */ }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #ifdef CONFIG_JUMP_LABEL #include <asm/jump_label.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE struct jump_entry {
@@ -187,7 +187,7 @@ static inline int jump_entry_size(struct jump_entry *entry)#endif #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum jump_label_type { JUMP_LABEL_NOP = 0,
@@ -538,6 +538,6 @@ extern bool ____wrong_branch_error(void);#define static_branch_enable_cpuslocked (x) static_key_enable_cpuslocked(&(x)->key)#define static_branch_disable_cpuslocked (x) static_key_disable_cpuslocked(&(x)->key) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_JUMP_LABEL_H */
include/linux/kexec.h +1 -1
@@ -13,7 +13,7 @@#define IND_SOURCE (1 << IND_SOURCE_BIT)#define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)#include <linux/vmcore_info.h> #include <linux/crash_reserve.h>
include/linux/linkage.h +3 -3
@@ -62,7 +62,7 @@* end up needing stack temporaries for). */ /* Assembly files may be compiled with -traditional .. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifndef asmlinkage_protect # define asmlinkage_protect(n, ret, args...) do { } while (0)#endif
@@ -73,7 +73,7 @@#define __ALIGN_STR __stringify(__ALIGN)#endif -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__/* SYM_T_FUNC -- type used by assembler to mark functions */ #ifndef SYM_T_FUNC
@@ -351,6 +351,6 @@ SYM_DATA_END(name)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_LINKAGE_H */
include/linux/mem_encrypt.h +2 -2
@@ -10,7 +10,7 @@#ifndef __MEM_ENCRYPT_H__#define __MEM_ENCRYPT_H__ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_ARCH_HAS_MEM_ENCRYPT
@@ -54,6 +54,6 @@#define dma_addr_canonical (x) (x)#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __MEM_ENCRYPT_H__ */
include/linux/mmzone.h +2 -2
@@ -2,7 +2,7 @@#ifndef _LINUX_MMZONE_H#define _LINUX_MMZONE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifndef __GENERATING_BOUNDS_H#include <linux/spinlock.h>
@@ -2318,5 +2318,5 @@ static inline unsigned long next_present_section_nr(unsigned long section_nr)#endif #endif /* !__GENERATING_BOUNDS.H */ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* _LINUX_MMZONE_H */
include/linux/objtool.h +4 -4
@@ -7,7 +7,7 @@#ifdef CONFIG_OBJTOOL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define UNWIND_HINT (type, sp_reg, sp_offset, signal) \ "987: \n\t" \
@@ -53,7 +53,7 @@#define __ASM_BREF (label) label ## b -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ /* * In asm, there are two kinds of code: normal C-type callable functions and
@@ -102,11 +102,11 @@#endif .endm -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #else /* !CONFIG_OBJTOOL */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define UNWIND_HINT (type, sp_reg, sp_offset, signal) "\n\t"#define STACK_FRAME_NON_STANDARD (func)
include/linux/objtool_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _LINUX_OBJTOOL_TYPES_H#define _LINUX_OBJTOOL_TYPES_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -18,7 +18,7 @@ struct unwind_hint { u8 signal; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * UNWIND_HINT_TYPE_UNDEFINED: A blind spot in ORC coverage which can result in
include/linux/of_fdt.h +2 -2
@@ -16,7 +16,7 @@/* Definitions used by the flattened device tree */ #define OF_DT_HEADER 0xd00dfeed/* marker */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#if defined(CONFIG_OF_FLATTREE )
@@ -103,5 +103,5 @@ static inline void unflatten_device_tree(void) {}static inline void unflatten_and_copy_device_tree (void ) {}#endif /* CONFIG_OF_EARLY_FLATTREE */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_OF_FDT_H */
include/linux/pe.h +2 -2
@@ -240,7 +240,7 @@#define IMAGE_DEBUG_TYPE_EX_DLLCHARACTERISTICS 20/* Extended DLL characteristics bits */ #define IMAGE_DEBUG_TYPE_PERFMAP 21/* Location of associated Ready To Run PerfMap file */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct mz_hdr { uint16_t magic; /* MZ_MAGIC */
@@ -546,6 +546,6 @@ struct win_certificate {uint16_t cert_type; }; -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __LINUX_PE_H */
include/linux/percpu-defs.h +2 -2
@@ -203,7 +203,7 @@/* * Accessors and operations. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * __verify_pcpu_ptr() verifies @ptr is a percpu pointer without evaluating
@@ -514,5 +514,5 @@ do { \#define this_cpu_inc_return (pcp) this_cpu_add_return(pcp, 1)#define this_cpu_dec_return (pcp) this_cpu_add_return(pcp, -1) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_PERCPU_DEFS_H */
include/linux/pfn.h +1 -1
@@ -2,7 +2,7 @@#ifndef _LINUX_PFN_H_#define _LINUX_PFN_H_ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h> #endif
include/linux/pgtable.h +2 -2
@@ -8,7 +8,7 @@#define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)#define PUD_ORDER (PUD_SHIFT - PAGE_SHIFT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_MMU #include <linux/mm_types.h>
@@ -2192,7 +2192,7 @@ static inline const char *pgtable_level_to_str(enum pgtable_level level) } } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #if !defined(MAX_POSSIBLE_PHYSMEM_BITS ) && !defined(CONFIG_64BIT )#ifdef CONFIG_PHYS_ADDR_T_64BIT
include/linux/platform_data/emif_plat.h +2 -2
@@ -39,7 +39,7 @@#define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002#define EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART 0x00000004 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct ddr_device_info - All information about the DDR device except AC * timing parameters
@@ -121,6 +121,6 @@ struct emif_platform_data {u32 ip_rev;u32 phy_type; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __LINUX_EMIF_H */
include/linux/serial_s3c.h +2 -2
@@ -269,7 +269,7 @@#define APPLE_S5L_UTRSTAT_RXTO BIT(9)#define APPLE_S5L_UTRSTAT_ALL_FLAGS GENMASK(9, 3) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/serial_core.h>
@@ -294,7 +294,7 @@ struct s3c2410_uartcfg {unsigned long ufcon;/* value of ufcon for port */ }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_ARM_REGS_SERIAL_H */
include/linux/static_call_types.h +2 -2
@@ -25,7 +25,7 @@#define STATIC_CALL_SITE_INIT 2UL/* init section */ #define STATIC_CALL_SITE_FLAGS 3UL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * The static call site table needs to be created by external tooling (objtool
@@ -102,6 +102,6 @@ struct static_call_key {#endif /* CONFIG_HAVE_STATIC_CALL */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _STATIC_CALL_TYPES_H */
include/linux/ti-emif-sram.h +1 -1
@@ -10,7 +10,7 @@#include <linux/kbuild.h> #include <linux/types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct emif_regs_amx3 { u32 emif_sdcfg_val;
include/linux/types.h +2 -2
@@ -4,7 +4,7 @@#include <uapi/linux/types.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#define DECLARE_BITMAP (name,bits) \ unsigned long name[BITS_TO_LONGS(bits)]
@@ -270,5 +270,5 @@ struct rcuwait {struct task_struct __rcu *task; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_TYPES_H */
include/soc/imx/cpu.h +1 -1
@@ -30,7 +30,7 @@#define MXC_CPU_VF600 0x600#define MXC_CPU_VF610 (MXC_CPU_VF600 | MXC_CPU_VFx10) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__extern unsigned int __mxc_cpu_type;#endif
include/soc/tegra/flowctrl.h +2 -2
@@ -39,7 +39,7 @@#define TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP (0xF << 4)#define TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP (0xF << 8) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#ifdef CONFIG_SOC_TEGRA_FLOWCTRL u32 flowctrl_read_cpu_csr (unsigned int cpuid);void flowctrl_write_cpu_csr (unsigned int cpuid,u32 value);
@@ -67,5 +67,5 @@ static inline void flowctrl_cpu_suspend_exit(unsigned int cpuid) { }#endif /* CONFIG_SOC_TEGRA_FLOWCTRL */ -#endif /* __ASSEMBLY */ +#endif /* __ASSEMBLER__ */ #endif /* __SOC_TEGRA_FLOWCTRL_H__ */
include/soc/tegra/fuse.h +2 -2
@@ -24,7 +24,7 @@#define TEGRA30_FUSE_SATA_CALIB 0x124#define TEGRA_FUSE_USB_CALIB_EXT_0 0x250 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__enum tegra_revision { TEGRA_REVISION_UNKNOWN = 0,
@@ -122,6 +122,6 @@ static inline int tegra194_miscreg_mask_serror(void)struct device *tegra_soc_device_register (void ); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __SOC_TEGRA_FUSE_H__ */
include/vdso/datapage.h +3 -3
@@ -2,7 +2,7 @@#ifndef __VDSO_DATAPAGE_H#define __VDSO_DATAPAGE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler.h> #include <uapi/linux/bits.h>
@@ -195,7 +195,7 @@ enum vdso_pages {*/ #include <asm/vdso/gettimeofday.h> -#else /* !__ASSEMBLY__ */ +#else /* !__ASSEMBLER__ */ #ifdef CONFIG_VDSO_GETRANDOM #define __vdso_u_rng_data PROVIDE(vdso_u_rng_data = vdso_u_data + 2 * PAGE_SIZE);
@@ -216,6 +216,6 @@ enum vdso_pages { __vdso_u_arch_data \ -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __VDSO_DATAPAGE_H */
include/vdso/helpers.h +2 -2
@@ -2,7 +2,7 @@#ifndef __VDSO_HELPERS_H#define __VDSO_HELPERS_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/barrier.h> #include <vdso/datapage.h>
@@ -82,6 +82,6 @@ static __always_inline void vdso_write_end(struct vdso_time_data *vd)vdso_write_seq_end (&vc[CS_RAW ]); } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __VDSO_HELPERS_H */
include/vdso/processor.h +2 -2
@@ -5,10 +5,10 @@#ifndef __VDSO_PROCESSOR_H#define __VDSO_PROCESSOR_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/vdso/processor.h> -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __VDSO_PROCESSOR_H */
include/vdso/vsyscall.h +2 -2
@@ -2,13 +2,13 @@#ifndef __VDSO_VSYSCALL_H#define __VDSO_VSYSCALL_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <asm/vdso/vsyscall.h> unsigned long vdso_update_begin (void );void vdso_update_end (unsigned long flags); -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __VDSO_VSYSCALL_H */
include/xen/arm/interface.h +1 -1
@@ -30,7 +30,7 @@#define __HYPERVISOR_platform_op_raw __HYPERVISOR_platform_op -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* Explicitly size integers that represent pfns in the interface with * Xen so that we can have one ABI that works for 32 and 64 bit guests. * Note that this means that the xen_pfn_t type may be capable of
include/xen/interface/xen-mca.h +2 -2
@@ -50,7 +50,7 @@/* OUT: There was no machine check data to fetch. */ #define XEN_MC_NODATA 0x2 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* vIRQ injected to Dom0 */ #define VIRQ_MCA VIRQ_ARCH_0
@@ -388,5 +388,5 @@ struct xen_mce_log {#define MCE_GET_LOG_LEN _IOR('M', 2, int)#define MCE_GETCLEAR_FLAGS _IOR('M', 3, int) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __XEN_PUBLIC_ARCH_X86_MCA_H__ */
include/xen/interface/xen.h +4 -4
@@ -337,7 +337,7 @@#define MMUEXT_MARK_SUPER 19#define MMUEXT_UNMARK_SUPER 20 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct mmuext_op { unsigned int cmd; union {
@@ -415,7 +415,7 @@ DEFINE_GUEST_HANDLE_STRUCT(mmuext_op);#define MAX_VMASST_TYPE 5 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__typedef uint16_t domid_t ;
@@ -760,11 +760,11 @@ struct tmem_op {DEFINE_GUEST_HANDLE (u64); -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ /* In assembly code we cannot use C numeric constant suffixes. */ #define mk_unsigned_long (x) x -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __XEN_PUBLIC_XEN_H__ */
tools/include/asm-generic/barrier.h +2 -2
@@ -13,7 +13,7 @@#ifndef __TOOLS_LINUX_ASM_GENERIC_BARRIER_H#define __TOOLS_LINUX_ASM_GENERIC_BARRIER_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler.h>
@@ -36,5 +36,5 @@#define wmb () mb()#endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __TOOLS_LINUX_ASM_GENERIC_BARRIER_H */
tools/include/asm/alternative.h +1 -1
@@ -3,7 +3,7 @@#define _TOOLS_ASM_ALTERNATIVE_ASM_H#if defined(__s390x__) -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__ .macro ALTERNATIVE oldinstr, newinstr, feature \oldinstr .endm
tools/include/linux/bits.h +3 -3
@@ -17,7 +17,7 @@* position @h. For example * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing asm support
@@ -75,7 +75,7 @@#define BIT_U32 (nr) BIT_TYPE(u32, nr)#define BIT_U64 (nr) BIT_TYPE(u64, nr) -#else /* defined(__ASSEMBLY__) */ +#else /* defined(__ASSEMBLER__) */ /* * BUILD_BUG_ON_ZERO is not available in h files included from asm files,
@@ -84,6 +84,6 @@#define GENMASK (h, l) __GENMASK(h, l)#define GENMASK_ULL (h, l) __GENMASK_ULL(h, l) -#endif /* !defined(__ASSEMBLY__) */ +#endif /* !defined(__ASSEMBLER__) */ #endif /* __LINUX_BITS_H */
tools/include/linux/cfi_types.h +3 -3
@@ -5,7 +5,7 @@#ifndef _LINUX_CFI_TYPES_H#define _LINUX_CFI_TYPES_H -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#include <linux/linkage.h> #ifdef CONFIG_CFI
@@ -41,7 +41,7 @@ SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)#endif -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #ifdef CONFIG_CFI #define DEFINE_CFI_TYPE (name, func) \
@@ -64,5 +64,5 @@ );#endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _LINUX_CFI_TYPES_H */
tools/include/linux/compiler.h +2 -2
@@ -2,7 +2,7 @@#ifndef _TOOLS_LINUX_COMPILER_H_#define _TOOLS_LINUX_COMPILER_H_ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/compiler_types.h>
@@ -256,6 +256,6 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s#endif #endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _TOOLS_LINUX_COMPILER_H */
tools/include/linux/objtool_types.h +2 -2
@@ -2,7 +2,7 @@#ifndef _LINUX_OBJTOOL_TYPES_H#define _LINUX_OBJTOOL_TYPES_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/types.h>
@@ -18,7 +18,7 @@ struct unwind_hint { u8 signal; }; -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* * UNWIND_HINT_TYPE_UNDEFINED: A blind spot in ORC coverage which can result in
tools/include/linux/static_call_types.h +2 -2
@@ -25,7 +25,7 @@#define STATIC_CALL_SITE_INIT 2UL/* init section */ #define STATIC_CALL_SITE_FLAGS 3UL -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * The static call site table needs to be created by external tooling (objtool
@@ -102,6 +102,6 @@ struct static_call_key {#endif /* CONFIG_HAVE_STATIC_CALL */ -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _STATIC_CALL_TYPES_H */
Signature · 1 line
2.53.0
PATCH v5 8/8 treewide: Stop defining __ASSEMBLY__ for assembler files
In reply to Thomas HuthFrom: Thomas Huth <[email protected]>
All spots have been changed to __ASSEMBLER__ (i.e. the macro that gets defined by the compiler), so we don't have to manually define __ASSEMBLY__ now anymore.
--- Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 1 - arch/loongarch/vdso/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/platforms/cell/spufs/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 2 +- arch/xtensa/kernel/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/net/wan/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 18 files changed, 15 insertions(+), 22 deletions(-)
Makefile +1 -1
@@ -585,7 +585,7 @@ LINUXINCLUDE := \ -I$(objtree)/include \ $(USERINCLUDE) -KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE +KBUILD_AFLAGS := -fno-PIE KBUILD_CFLAGS := KBUILD_CFLAGS += -std=gnu11
arch/arm64/kernel/vdso32/Makefile +0 -1
@@ -82,7 +82,6 @@ VDSO_CFLAGS += -marm endif VDSO_AFLAGS := $(VDSO_CAFLAGS) -VDSO_AFLAGS += -D__ASSEMBLY__ # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
arch/loongarch/vdso/Makefile +1 -1
@@ -29,7 +29,7 @@ cflags-vdso := $(ccflags-vdso) \ $(call cc-option, -fasynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
arch/mips/boot/compressed/Makefile +1 -1
@@ -30,7 +30,7 @@ endif KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ +KBUILD_AFLAGS := $(KBUILD_AFLAGS) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
arch/mips/vdso/Makefile +1 -1
@@ -33,7 +33,7 @@ cflags-vdso := $(ccflags-vdso) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y)
arch/powerpc/boot/Makefile +1 -1
@@ -80,7 +80,7 @@ BOOTCFLAGS := $(BOOTTARGETFLAGS) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \ -fomit-frame-pointer -fno-builtin -fPIC -BOOTAFLAGS := $(BOOTTARGETFLAGS) -D__ASSEMBLY__ +BOOTAFLAGS := $(BOOTTARGETFLAGS) BOOTARFLAGS := -crD
arch/powerpc/platforms/cell/spufs/Makefile +1 -1
@@ -16,7 +16,7 @@ SPU_AS := $(SPU_CROSS)gcc SPU_LD := $(SPU_CROSS)ld SPU_OBJCOPY := $(SPU_CROSS)objcopy SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -D__KERNEL__ -SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__ +SPU_AFLAGS := -c -I$(srctree)/include -D__KERNEL__ SPU_LDFLAGS := -N -Ttext=0x0 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h
arch/s390/Makefile +1 -1
@@ -18,7 +18,7 @@ KBUILD_CFLAGS += -fPIC LDFLAGS_vmlinux := $(call ld-option,-no-pie) extra_tools := relocs aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif
arch/x86/boot/Makefile +1 -1
@@ -52,7 +52,7 @@ targets += cpustr.h # --------------------------------------------------------------------------- KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
arch/x86/boot/compressed/Makefile +1 -1
@@ -52,7 +52,7 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h # that the compiler finds it even with out-of-tree builds (make O=/some/path). CFLAGS_sev-handle-vc.o += -I$(objtree)/arch/x86/lib/ -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info)
arch/x86/realmode/rm/Makefile +1 -1
@@ -65,5 +65,5 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
arch/xtensa/kernel/Makefile +1 -1
@@ -39,7 +39,7 @@ sed-y = -e ':a; s/\*(\([^)]*\)\.text\.unlikely/*(\1.literal.unlikely .{text}.unl -e 's/\.{text}/.text/g' quiet_cmd__cpp_lds_S = LDS $@ -cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ \ +cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa \ -DLINKER_SCRIPT $< | sed $(sed-y) >$@ $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE
drivers/firmware/efi/libstub/Makefile +1 -1
@@ -62,7 +62,7 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) # `-fdata-sections` flag from KBUILD_CFLAGS_KERNEL KBUILD_CFLAGS_KERNEL := $(filter-out -fdata-sections, $(KBUILD_CFLAGS_KERNEL)) -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \ file.o mem.o random.o randomalloc.o pci.o \
drivers/net/wan/Makefile +1 -1
@@ -57,7 +57,7 @@ $(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE $(call if_changed,m68kld_bin_o) quiet_cmd_m68kas_o_S = M68KAS $@ - cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< + cmd_m68kas_o_S = $(M68KCC) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< $(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE $(call if_changed_dep,m68kas_o_S)
scripts/Makefile.build +1 -1
@@ -441,7 +441,7 @@ targets += $(lib-y) $(always-y) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \ - -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< + -DLINKER_SCRIPT -o $@ $< $(obj)/%.lds: $(src)/%.lds.S FORCE $(call if_changed_dep,cpp_lds_S)
scripts/gfp-translate +1 -1
@@ -73,7 +73,7 @@ echo Parsing: $GFPMASK #include <stdio.h> // Try to fool compiler.h into not including extra stuff -#define __ASSEMBLY__ 1 +#define __ASSEMBLER__ 1 #include <generated/autoconf.h> #include <linux/gfp_types.h>
tools/testing/selftests/kvm/lib/riscv/handlers.S +0 -4
@@ -3,10 +3,6 @@ * Copyright (c) 2023 Intel Corporation */ -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ -#endif - #include <asm/csr.h> .macro save_context
tools/testing/selftests/vDSO/vgetrandom-chacha.S +0 -2
@@ -3,8 +3,6 @@ * Copyright (C) 2024 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */ -#define __ASSEMBLY__ - #if defined(__aarch64__) #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" #elif defined(__loongarch__)
Signature · 1 line
2.53.0
Re: [PATCH v5 1/8] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
In reply to Thomas HuthQuoted 28 lines · Thomas Huth
From: Thomas Huth <[email protected]>
__ASSEMBLY__is only defined by theMakefileof the kernel, so this is not really useful for uapi headers (unless the userspaceMakefiledefines it, too). Let's switch to__ASSEMBLER__which gets set automatically by the compiler when compiling assembly code.Cc Russell King <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- arch/arm/include/uapi/asm/ptrace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/include/uapi/asm/ptrace.h +1
-1@@ -110,7 +110,7 @@#define PT_DATA_ADDR 0x10004#define PT_TEXT_END_ADDR 0x10008 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This struct defines the way the registers are stored on the
arch/arm/include/uapi/asm/ptrace.h struct pt_regs { · line 154
Quoted 7 lines
arch/arm/include/uapi/asm/ptrace.h +1
-1@@ -149,6 +149,6 @@ struct pt_regs { #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */
Ping!
Oleg, could you maybe take this patch through your ptrace tree?
Thanks,
Thomas
Oleg Nesterov
maintainerRe: [PATCH v5 1/8] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
Quoted 18 lines · Thomas Huth
Quoted 11 lines
arch/arm/include/uapi/asm/ptrace.h +1
-1@@ -110,7 +110,7 @@#define PT_DATA_ADDR 0x10004#define PT_TEXT_END_ADDR 0x10008 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * This struct defines the way the registers are stored on the arch/arm/include/uapi/asm/ptrace.h struct pt_regs { · line 151
Quoted 4 lines
arch/arm/include/uapi/asm/ptrace.h +1
-1@@ -149,6 +149,6 @@ struct pt_regs { #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */ Ping!
Quoted 1 line
Oleg, could you maybe take this patch through your ptrace tree?
No, sorry, I can't.
I lost my account on git.kernel.org years ago, and I still haven't gotten around to restoring it...
I think this should routed via arm tree.
Oleg.