* [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
@ 2026-10-23 6:48 Thomas Huth
2026-10-23 6:48 ` [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file Thomas Huth
` (13 more replies)
0 siblings, 14 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Alexandre Ghiti, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-riscv, llvm
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 (and
also other compilers like Tiny-C or PCC) define the macro __ASSEMBLER__
automatically already when compiling assembly code, too, 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/20250222014526.2302653-1-seanjc@google.com/
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 makes sense to standardize
on the macro that gets defined by the compiler, so this patch series
changes all occurrences of __ASSEMBLY__ into __ASSEMBLER__ and
finally removes the -D__ASSEMBLY__ from the Makefiles.
I split the patches per architecture / maintained subsystem to ease
the review, and I also split the uapi headers from the normal ones in
case we ever decide that uapi needs to be treated differently from the
normal headers here and the patches would need to get reverted.
v5:
- To ease the review, I split some huge patches into smaller patches
when there was a separate entry for the files in the MAINTAINERS file
- Dropped the patches that were already merged
- Rebased the patches to the current master branch and fixed new
occurrences of __ASSEMBLY__
Thomas Huth (13):
of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header
file
smccc: Replace __ASSEMBLY__ with __ASSEMBLER__
ARM: PXA: Replace __ASSEMBLY__ with __ASSEMBLER__
ARM: BCM7XXX: Replace __ASSEMBLY__ with __ASSEMBLER__
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header
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
asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-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/alpha/boot/compressed/Makefile | 2 +-
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/kexec.h | 4 ++--
arch/arm/include/asm/kgdb.h | 4 ++--
arch/arm/include/asm/linkage.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 | 8 ++++----
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/vfp.h | 2 +-
arch/arm/include/asm/virt.h | 4 ++--
arch/arm/include/uapi/asm/ptrace.h | 4 ++--
.../mach-footbridge/include/mach/hardware.h | 2 +-
arch/arm/mach-pxa/irqs.h | 2 +-
arch/arm/mach-pxa/pxa-regs.h | 2 +-
arch/arm/mach-sa1100/include/mach/bitfield.h | 2 +-
arch/arm/mach-sa1100/include/mach/hardware.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/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/int-ll64.h | 6 +++---
include/asm-generic/rwonce.h | 4 ++--
include/asm-generic/signal.h | 4 ++--
include/linux/amba/serial.h | 4 ++--
include/linux/annotate.h | 18 +++++++++---------
include/linux/arm-smccc.h | 10 +++++-----
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/linkage.h | 6 +++---
include/linux/mem_encrypt.h | 4 ++--
include/linux/of_fdt.h | 4 ++--
include/linux/pe.h | 4 ++--
include/linux/platform_data/emif_plat.h | 4 ++--
include/linux/ti-emif-sram.h | 2 +-
include/linux/types.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/types.h | 4 ++--
scripts/Makefile.build | 2 +-
scripts/gfp-translate | 2 +-
scripts/headers_install.sh | 1 -
.../tests/cmd_graph/test_savedcmd_parser.py | 2 +-
tools/include/asm-generic/barrier.h | 4 ++--
tools/include/asm/alternative.h | 2 +-
tools/include/linux/cfi_types.h | 6 +++---
tools/include/linux/compiler.h | 4 ++--
tools/include/uapi/linux/const.h | 4 ++--
.../testing/selftests/kvm/lib/riscv/handlers.S | 4 ----
.../testing/selftests/vDSO/vgetrandom-chacha.S | 2 --
123 files changed, 229 insertions(+), 237 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 02/13] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__ Thomas Huth
` (12 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Rob Herring,
Saravana Kannan
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Nick Desaulniers, Bill Wendling, Justin Stitt, devicetree, llvm
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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/linux/of_fdt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 51dadbaa3d63a..72b452e388eeb 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -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 */
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 02/13] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2026-10-23 6:48 ` [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 03/13] ARM: PXA: " Thomas Huth
` (11 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Mark Rutland,
Lorenzo Pieralisi, Sudeep Holla
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
llvm
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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/linux/arm-smccc.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index 4de81848fe2ee..724bcaf0775ad 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -8,7 +8,7 @@
#include <linux/args.h>
#include <linux/init.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/uuid.h>
#endif
@@ -313,7 +313,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>
@@ -364,7 +364,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
@@ -413,7 +413,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
@@ -761,5 +761,5 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
})
#endif /*CONFIG_ARM64*/
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
#endif /*__LINUX_ARM_SMCCC_H*/
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 03/13] ARM: PXA: Replace __ASSEMBLY__ with __ASSEMBLER__
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2026-10-23 6:48 ` [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file Thomas Huth
2026-10-23 6:48 ` [PATCH v5 02/13] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__ Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 04/13] ARM: BCM7XXX: " Thomas Huth
` (10 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Daniel Mack,
Haojian Zhuang, Robert Jarzmik, Russell King
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
llvm
While the GCC and Clang compilers already define __ASSEMBLER__ auto-
matically when compiling assembly code, __ASSEMBLY__ is a macro that
only gets defined by the Makefiles in the kernel. This can be very
confusing when switching between userspace and kernelspace coding, or
when dealing with uapi headers that rather should use __ASSEMBLER__
instead. Let's standardize now on the __ASSEMBLER__ macro to avoid
this confusion.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
arch/arm/mach-pxa/irqs.h | 2 +-
arch/arm/mach-pxa/pxa-regs.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-pxa/irqs.h b/arch/arm/mach-pxa/irqs.h
index 22bf536a462d0..07d7aa3a65065 100644
--- a/arch/arm/mach-pxa/irqs.h
+++ b/arch/arm/mach-pxa/irqs.h
@@ -94,7 +94,7 @@
#define PXA_NR_IRQS (IRQ_BOARD_START)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct irq_data;
struct pt_regs;
diff --git a/arch/arm/mach-pxa/pxa-regs.h b/arch/arm/mach-pxa/pxa-regs.h
index ba5120c06b8a5..b56c8899042c4 100644
--- a/arch/arm/mach-pxa/pxa-regs.h
+++ b/arch/arm/mach-pxa/pxa-regs.h
@@ -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()
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 04/13] ARM: BCM7XXX: Replace __ASSEMBLY__ with __ASSEMBLER__
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (2 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 03/13] ARM: PXA: " Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 05/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header Thomas Huth
` (9 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier,
Florian Fainelli, Russell King
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Broadcom internal kernel review list, Nick Desaulniers,
Bill Wendling, Justin Stitt, linux-arm-kernel, llvm
While the GCC and Clang compilers already define __ASSEMBLER__ auto-
matically when compiling assembly code, __ASSEMBLY__ is a macro that
only gets defined by the Makefiles in the kernel. This can be very
confusing when switching between userspace and kernelspace coding, or
when dealing with uapi headers that rather should use __ASSEMBLER__
instead. Let's standardize now on the __ASSEMBLER__ macro to avoid
this confusion.
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
arch/arm/include/asm/hardware/cache-b15-rac.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/hardware/cache-b15-rac.h b/arch/arm/include/asm/hardware/cache-b15-rac.h
index 3d43ec06fd359..b96365bfb2a87 100644
--- a/arch/arm/include/asm/hardware/cache-b15-rac.h
+++ b/arch/arm/include/asm/hardware/cache-b15-rac.h
@@ -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);
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 05/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (3 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 04/13] ARM: BCM7XXX: " Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 06/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
` (8 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Russell King
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh, linux-arm-kernel
__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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
arch/arm/include/uapi/asm/ptrace.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
index 2ef917957005c..15e6bff56b609 100644
--- a/arch/arm/include/uapi/asm/ptrace.h
+++ b/arch/arm/include/uapi/asm/ptrace.h
@@ -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 */
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 06/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (4 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 05/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 07/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
` (7 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Russell King,
Steven Rostedt, Masami Hiramatsu, Oleg Nesterov
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Mark Rutland, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-arm-kernel, linux-trace-kernel, llvm
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).
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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-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/kexec.h | 4 ++--
arch/arm/include/asm/kgdb.h | 4 ++--
arch/arm/include/asm/linkage.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 | 8 ++++----
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/vfp.h | 2 +-
arch/arm/include/asm/virt.h | 4 ++--
| 2 +-
arch/arm/mach-sa1100/include/mach/bitfield.h | 2 +-
arch/arm/mach-sa1100/include/mach/hardware.h | 2 +-
arch/arm/tools/gen-mach-types | 2 +-
52 files changed, 101 insertions(+), 101 deletions(-)
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index d33c1e24e00b3..0f1f3b907825e 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -13,7 +13,7 @@
#ifndef __ASM_ASSEMBLER_H__
#define __ASM_ASSEMBLER_H__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#error "Only include this from assembly code"
#endif
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h
index 83ae97c049d9b..af3516cfa8dcd 100644
--- a/arch/arm/include/asm/barrier.h
+++ b/arch/arm/include/asm/barrier.h
@@ -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 */
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index ecbc100d22a56..38a38a53badc9 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -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
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h
index a54230e656479..603a33c4bf572 100644
--- a/arch/arm/include/asm/cp15.h
+++ b/arch/arm/include/asm/cp15.h
@@ -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
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 0163c3e78a67f..4b2832e14c3e1 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -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
diff --git a/arch/arm/include/asm/current.h b/arch/arm/include/asm/current.h
index 5225cb1c803b1..12968d3cdc269 100644
--- a/arch/arm/include/asm/current.h
+++ b/arch/arm/include/asm/current.h
@@ -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 */
diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h
index d2231deb90fa5..43200c56b5eea 100644
--- a/arch/arm/include/asm/delay.h
+++ b/arch/arm/include/asm/delay.h
@@ -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);
@@ -93,7 +93,7 @@ extern void __loop_const_udelay(unsigned long);
/* Delay-loop timer registration. */
extern void register_current_timer_delay(const struct delay_timer *timer);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* defined(_ARM_DELAY_H) */
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h
index f91c2a72b9dc6..35c53e2542df4 100644
--- a/arch/arm/include/asm/domain.h
+++ b/arch/arm/include/asm/domain.h
@@ -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
@@ -62,7 +62,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)
@@ -107,7 +107,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
@@ -119,6 +119,6 @@ static __always_inline void set_domain(unsigned int val)
#define TUSER(instr) instr
#endif
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* !__ASM_PROC_DOMAIN_H */
diff --git a/arch/arm/include/asm/fpstate.h b/arch/arm/include/asm/fpstate.h
index e29d9c7a52388..2b4469e151851 100644
--- a/arch/arm/include/asm/fpstate.h
+++ b/arch/arm/include/asm/fpstate.h
@@ -9,7 +9,7 @@
#define __ASM_ARM_FPSTATE_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
/*
* VFP storage area has:
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 5be3ddc96a503..9675ede04f09c 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -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 */
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index 5a7ee70f561c9..2c9568768ad73 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -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
diff --git a/arch/arm/include/asm/hardware/dec21285.h b/arch/arm/include/asm/hardware/dec21285.h
index 894f2a635cbbd..bf722733bbb6f 100644
--- a/arch/arm/include/asm/hardware/dec21285.h
+++ b/arch/arm/include/asm/hardware/dec21285.h
@@ -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
diff --git a/arch/arm/include/asm/hardware/ioc.h b/arch/arm/include/asm/hardware/ioc.h
index 6edd27fcd0483..bd4f66591026b 100644
--- a/arch/arm/include/asm/hardware/ioc.h
+++ b/arch/arm/include/asm/hardware/ioc.h
@@ -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
diff --git a/arch/arm/include/asm/hardware/iomd.h b/arch/arm/include/asm/hardware/iomd.h
index 53006ba5350f0..9b8a289f4db63 100644
--- a/arch/arm/include/asm/hardware/iomd.h
+++ b/arch/arm/include/asm/hardware/iomd.h
@@ -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 { \
diff --git a/arch/arm/include/asm/hardware/memc.h b/arch/arm/include/asm/hardware/memc.h
index 1d4ebe0a9678f..8b1865cb564ec 100644
--- a/arch/arm/include/asm/hardware/memc.h
+++ b/arch/arm/include/asm/hardware/memc.h
@@ -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) \
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h
index e31d9f1b8549b..d5b5ebaad011b 100644
--- a/arch/arm/include/asm/hwcap.h
+++ b/arch/arm/include/asm/hwcap.h
@@ -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.
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 26c1d2ced4ce1..7c8f826071162 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -22,7 +22,7 @@
#define NO_IRQ ((unsigned int)(-1))
#endif
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct irqaction;
struct pt_regs;
diff --git a/arch/arm/include/asm/kexec.h b/arch/arm/include/asm/kexec.h
index a8287e7ab9d41..8488f4b611402 100644
--- a/arch/arm/include/asm/kexec.h
+++ b/arch/arm/include/asm/kexec.h
@@ -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 */
diff --git a/arch/arm/include/asm/kgdb.h b/arch/arm/include/asm/kgdb.h
index 8de1100d10674..1b7c65935976f 100644
--- a/arch/arm/include/asm/kgdb.h
+++ b/arch/arm/include/asm/kgdb.h
@@ -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:
diff --git a/arch/arm/include/asm/linkage.h b/arch/arm/include/asm/linkage.h
index bba992f5d7a80..7be126af3b102 100644
--- a/arch/arm/include/asm/linkage.h
+++ b/arch/arm/include/asm/linkage.h
@@ -9,7 +9,7 @@
.type name, %function; \
END(name)
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
/*
* Variants of SYM_TYPED_START/SYM_TYPED_FUNC_START that align the
@@ -36,6 +36,6 @@
#define SYM_TYPED_FUNC_START_ALIGNED(name, align) \
SYM_TYPED_START_ALIGNED(name, SYM_L_GLOBAL, align)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 2b18a258204d7..ce0137aee0845 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -7,7 +7,7 @@
#include <linux/types.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/reboot.h>
struct tag;
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h
index 755c97de348c3..743f68f89337e 100644
--- a/arch/arm/include/asm/mcpm.h
+++ b/arch/arm/include/asm/mcpm.h
@@ -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
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index e25749bfbf90b..e11b4241ce178 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -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
diff --git a/arch/arm/include/asm/mpu.h b/arch/arm/include/asm/mpu.h
index 5e088c83d3d8e..6058788a85730 100644
--- a/arch/arm/include/asm/mpu.h
+++ b/arch/arm/include/asm/mpu.h
@@ -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
diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h
index 38e3eabff5c3f..c2e3ed5157cf3 100644
--- a/arch/arm/include/asm/opcodes.h
+++ b/arch/arm/include/asm/opcodes.h
@@ -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
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h
index fa4c1225dde57..be24b6ba62869 100644
--- a/arch/arm/include/asm/page.h
+++ b/arch/arm/include/asm/page.h
@@ -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>
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
index 7e1c08fdd0294..17d8e982689ec 100644
--- a/arch/arm/include/asm/pgtable-2level.h
+++ b/arch/arm/include/asm/pgtable-2level.h
@@ -168,7 +168,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
@@ -235,6 +235,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 */
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
index 7b71a3d414b72..5b17ebef203ea 100644
--- a/arch/arm/include/asm/pgtable-3level.h
+++ b/arch/arm/include/asm/pgtable-3level.h
@@ -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 */
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h
index 61480d096054d..a8bca82198381 100644
--- a/arch/arm/include/asm/pgtable-nommu.h
+++ b/arch/arm/include/asm/pgtable-nommu.h
@@ -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 */
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 982795cf45637..fe96852f0e739 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -43,7 +43,7 @@
#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);
@@ -126,7 +126,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
@@ -137,7 +137,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];
@@ -320,7 +320,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 */
diff --git a/arch/arm/include/asm/probes.h b/arch/arm/include/asm/probes.h
index ebbd9ec95d21c..0d5067e7f51a9 100644
--- a/arch/arm/include/asm/probes.h
+++ b/arch/arm/include/asm/probes.h
@@ -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
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h
index b4986a23d8528..fd72f5fac6602 100644
--- a/arch/arm/include/asm/proc-fns.h
+++ b/arch/arm/include/asm/proc-fns.h
@@ -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 */
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
index 6eb311fb2da06..de3378a8845ec 100644
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
@@ -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
diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h
index ef7fdb588b5fe..3a872ec5d4e2e 100644
--- a/arch/arm/include/asm/system_info.h
+++ b/arch/arm/include/asm/system_info.h
@@ -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 */
diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/system_misc.h
index 98b37340376bc..8f9f7e833c013 100644
--- a/arch/arm/include/asm/system_misc.h
+++ b/arch/arm/include/asm/system_misc.h
@@ -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 */
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index 943ffcf069d29..186fd662b1c62 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -33,7 +33,7 @@
#define OVERFLOW_STACK_SIZE SZ_4K
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct task_struct;
diff --git a/arch/arm/include/asm/thread_notify.h b/arch/arm/include/asm/thread_notify.h
index 1c1542e2ed634..eac8fc4837651 100644
--- a/arch/arm/include/asm/thread_notify.h
+++ b/arch/arm/include/asm/thread_notify.h
@@ -9,7 +9,7 @@
#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/notifier.h>
#include <asm/thread_info.h>
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index 38c6e4a2a0b60..3eb0b3fa6cc9c 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -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
diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h
index 3dcd0f71a0dae..9b09775e20931 100644
--- a/arch/arm/include/asm/tls.h
+++ b/arch/arm/include/asm/tls.h
@@ -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)
{
diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h
index ce9689118dbb9..2cdeafb6afb63 100644
--- a/arch/arm/include/asm/unified.h
+++ b/arch/arm/include/asm/unified.h
@@ -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
diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h
index d60b09a5acfc3..071c89b1b4099 100644
--- a/arch/arm/include/asm/unwind.h
+++ b/arch/arm/include/asm/unwind.h
@@ -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
diff --git a/arch/arm/include/asm/v7m.h b/arch/arm/include/asm/v7m.h
index 4512f7e1918f0..b334f8009a505 100644
--- a/arch/arm/include/asm/v7m.h
+++ b/arch/arm/include/asm/v7m.h
@@ -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__ */
diff --git a/arch/arm/include/asm/vdso.h b/arch/arm/include/asm/vdso.h
index 88364a6727ffc..93a7338cd3057 100644
--- a/arch/arm/include/asm/vdso.h
+++ b/arch/arm/include/asm/vdso.h
@@ -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__ */
diff --git a/arch/arm/include/asm/vdso/cp15.h b/arch/arm/include/asm/vdso/cp15.h
index bed16fa1865e9..f5dea30743765 100644
--- a/arch/arm/include/asm/vdso/cp15.h
+++ b/arch/arm/include/asm/vdso/cp15.h
@@ -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 */
diff --git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h
index 26da5d8621cc9..c8e461a37bde9 100644
--- a/arch/arm/include/asm/vdso/gettimeofday.h
+++ b/arch/arm/include/asm/vdso/gettimeofday.h
@@ -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>
@@ -137,6 +137,6 @@ static __always_inline u64 __arch_get_hw_counter(int clock_mode,
#endif
}
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __ASM_VDSO_GETTIMEOFDAY_H */
diff --git a/arch/arm/include/asm/vdso/processor.h b/arch/arm/include/asm/vdso/processor.h
index 45efb3ff511c9..b24304f248b71 100644
--- a/arch/arm/include/asm/vdso/processor.h
+++ b/arch/arm/include/asm/vdso/processor.h
@@ -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 */
diff --git a/arch/arm/include/asm/vfp.h b/arch/arm/include/asm/vfp.h
index 85ccc422d4d0b..94171e09bda0b 100644
--- a/arch/arm/include/asm/vfp.h
+++ b/arch/arm/include/asm/vfp.h
@@ -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
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h
index dd9697b2bde80..719a08fa6a29b 100644
--- a/arch/arm/include/asm/virt.h
+++ b/arch/arm/include/asm/virt.h
@@ -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
--git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h
index 985ad3a956712..5391848d8c8cc 100644
--- a/arch/arm/mach-footbridge/include/mach/hardware.h
+++ b/arch/arm/mach-footbridge/include/mach/hardware.h
@@ -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);
diff --git a/arch/arm/mach-sa1100/include/mach/bitfield.h b/arch/arm/mach-sa1100/include/mach/bitfield.h
index f1f0e3387d9c6..e786bf730b31c 100644
--- a/arch/arm/mach-sa1100/include/mach/bitfield.h
+++ b/arch/arm/mach-sa1100/include/mach/bitfield.h
@@ -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)
diff --git a/arch/arm/mach-sa1100/include/mach/hardware.h b/arch/arm/mach-sa1100/include/mach/hardware.h
index 6f2dbdc286632..350e2665ca495 100644
--- a/arch/arm/mach-sa1100/include/mach/hardware.h
+++ b/arch/arm/mach-sa1100/include/mach/hardware.h
@@ -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)))
diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index cbe1c33bb8710..6ad8f055ba6b5 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -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");
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 07/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (5 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 06/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 08/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
` (6 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Brian Cain
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh, linux-hexagon
__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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
arch/hexagon/include/uapi/asm/registers.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/hexagon/include/uapi/asm/registers.h b/arch/hexagon/include/uapi/asm/registers.h
index d51270f3b3582..8f73d41651e87 100644
--- a/arch/hexagon/include/uapi/asm/registers.h
+++ b/arch/hexagon/include/uapi/asm/registers.h
@@ -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
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 08/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (6 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 07/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 09/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
` (5 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Brian Cain
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Brian Cain, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-hexagon, llvm
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.
Acked-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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(-)
diff --git a/arch/hexagon/include/asm/hexagon_vm.h b/arch/hexagon/include/asm/hexagon_vm.h
index 9aa2493fe7863..e1e702eb9e12a 100644
--- a/arch/hexagon/include/asm/hexagon_vm.h
+++ b/arch/hexagon/include/asm/hexagon_vm.h
@@ -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
diff --git a/arch/hexagon/include/asm/mem-layout.h b/arch/hexagon/include/asm/mem-layout.h
index e2f99413fe56e..8bad920d8928a 100644
--- a/arch/hexagon/include/asm/mem-layout.h
+++ b/arch/hexagon/include/asm/mem-layout.h
@@ -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 */
diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
index 6d82572a7f210..3379b7a700fec 100644
--- a/arch/hexagon/include/asm/page.h
+++ b/arch/hexagon/include/asm/page.h
@@ -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
diff --git a/arch/hexagon/include/asm/processor.h b/arch/hexagon/include/asm/processor.h
index 0cd39c2cdf8f7..b93c2cc4be22e 100644
--- a/arch/hexagon/include/asm/processor.h
+++ b/arch/hexagon/include/asm/processor.h
@@ -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
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h
index e90f280b9ce3e..a0da6c694c87b 100644
--- a/arch/hexagon/include/asm/thread_info.h
+++ b/arch/hexagon/include/asm/thread_info.h
@@ -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
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 09/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (7 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 08/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 10/13] uapi: " Thomas Huth
` (4 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh, linux-arch
__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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/uapi/asm-generic/int-l64.h b/include/uapi/asm-generic/int-l64.h
index ed8bcd99c34d7..f840806bbe7e9 100644
--- a/include/uapi/asm-generic/int-l64.h
+++ b/include/uapi/asm-generic/int-l64.h
@@ -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 */
diff --git a/include/uapi/asm-generic/int-ll64.h b/include/uapi/asm-generic/int-ll64.h
index 1ed06964257c3..4fc3e882bcff9 100644
--- a/include/uapi/asm-generic/int-ll64.h
+++ b/include/uapi/asm-generic/int-ll64.h
@@ -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 */
diff --git a/include/uapi/asm-generic/signal-defs.h b/include/uapi/asm-generic/signal-defs.h
index 7572f2f46ee89..4073143fa3dae 100644
--- a/include/uapi/asm-generic/signal-defs.h
+++ b/include/uapi/asm-generic/signal-defs.h
@@ -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;
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 0eb69dc8e5722..6b089d4b2965b 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -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 */
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 10/13] uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (8 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 09/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
` (3 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Jonathan Corbet
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Shuah Khan, Randy Dunlap, workflows, linux-doc
__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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
Documentation/dev-tools/checkuapi.rst | 2 +-
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/types.h | 4 ++--
tools/include/uapi/linux/const.h | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Documentation/dev-tools/checkuapi.rst b/Documentation/dev-tools/checkuapi.rst
index 9072f21b50b0c..3c9a3a58c24da 100644
--- a/Documentation/dev-tools/checkuapi.rst
+++ b/Documentation/dev-tools/checkuapi.rst
@@ -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
diff --git a/include/uapi/linux/a.out.h b/include/uapi/linux/a.out.h
index 5fafde3798e57..cbcc37674e64c 100644
--- a/include/uapi/linux/a.out.h
+++ b/include/uapi/linux/a.out.h
@@ -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__ */
diff --git a/include/uapi/linux/const.h b/include/uapi/linux/const.h
index 565f309b9df8b..6d89e477fc79c 100644
--- a/include/uapi/linux/const.h
+++ b/include/uapi/linux/const.h
@@ -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
*
diff --git a/include/uapi/linux/edd.h b/include/uapi/linux/edd.h
index 0fe3e02aec653..566f206964862 100644
--- a/include/uapi/linux/edd.h
+++ b/include/uapi/linux/edd.h
@@ -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 */
diff --git a/include/uapi/linux/hdlc/ioctl.h b/include/uapi/linux/hdlc/ioctl.h
index b06341acab5ec..0905383d72aa5 100644
--- a/include/uapi/linux/hdlc/ioctl.h
+++ b/include/uapi/linux/hdlc/ioctl.h
@@ -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__ */
diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index 48b933938877d..00743f894e7e3 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -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 */
diff --git a/tools/include/uapi/linux/const.h b/tools/include/uapi/linux/const.h
index 565f309b9df8b..6d89e477fc79c 100644
--- a/tools/include/uapi/linux/const.h
+++ b/tools/include/uapi/linux/const.h
@@ -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
*
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (9 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 10/13] uapi: " Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 6:48 ` [PATCH v5 12/13] include: " Thomas Huth
` (2 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arch, llvm
While the GCC and Clang compilers already define __ASSEMBLER__ auto-
matically when compiling assembly code, __ASSEMBLY__ is a macro that
only gets defined by the Makefiles in the kernel. This can be very
confusing when switching between userspace and kernelspace coding, or
when dealing with uapi headers that rather should use __ASSEMBLER__
instead. Let's standardize now on the __ASSEMBLER__ macro to avoid
this confusion.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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/int-ll64.h | 6 +++---
include/asm-generic/rwonce.h | 4 ++--
include/asm-generic/signal.h | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h
index b99cb57dfcccc..c029b1e1854c4 100644
--- a/include/asm-generic/barrier.h
+++ b/include/asm-generic/barrier.h
@@ -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 */
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 09e8eccee8ed9..044ebc96f373c 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -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
diff --git a/include/asm-generic/current.h b/include/asm-generic/current.h
index 9c2aeecbd05a6..8e7d8f019377f 100644
--- a/include/asm-generic/current.h
+++ b/include/asm-generic/current.h
@@ -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)
diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h
index b05253f68eaa5..0a9ec33fa8f20 100644
--- a/include/asm-generic/error-injection.h
+++ b/include/asm-generic/error-injection.h
@@ -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 */
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
index a248545f1e18c..58974e8abbfae 100644
--- a/include/asm-generic/int-ll64.h
+++ b/include/asm-generic/int-ll64.h
@@ -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 */
diff --git a/include/asm-generic/rwonce.h b/include/asm-generic/rwonce.h
index 52b969c7cef93..c35b262ee4223 100644
--- a/include/asm-generic/rwonce.h
+++ b/include/asm-generic/rwonce.h
@@ -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 */
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h
index 663dd6d0795dc..392e59fd3d8b9 100644
--- a/include/asm-generic/signal.h
+++ b/include/asm-generic/signal.h
@@ -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 */
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 12/13] include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (10 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 15:33 ` Bart Van Assche
2026-10-23 6:48 ` [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Thomas Huth
2026-10-23 15:47 ` [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Weißschuh
13 siblings, 1 reply; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Russell King, Chris Li
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-sparse,
llvm
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).
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/linux/amba/serial.h | 4 ++--
include/linux/annotate.h | 18 +++++++++---------
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/linkage.h | 6 +++---
include/linux/mem_encrypt.h | 4 ++--
include/linux/pe.h | 4 ++--
include/linux/platform_data/emif_plat.h | 4 ++--
include/linux/ti-emif-sram.h | 2 +-
include/linux/types.h | 4 ++--
tools/include/asm-generic/barrier.h | 4 ++--
tools/include/asm/alternative.h | 2 +-
tools/include/linux/cfi_types.h | 6 +++---
tools/include/linux/compiler.h | 4 ++--
20 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h
index 9120de05ead08..b9129c0d6304f 100644
--- a/include/linux/amba/serial.h
+++ b/include/linux/amba/serial.h
@@ -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);
diff --git a/include/linux/annotate.h b/include/linux/annotate.h
index 2f1599c9e5732..de8fdcb04f44d 100644
--- a/include/linux/annotate.h
+++ b/include/linux/annotate.h
@@ -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 */
diff --git a/include/linux/cfi_types.h b/include/linux/cfi_types.h
index a86af9bc8bdc4..b17614c493e4c 100644
--- a/include/linux/cfi_types.h
+++ b/include/linux/cfi_types.h
@@ -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 */
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 70cb31d605384..bb602ab527c88 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -4,7 +4,7 @@
#include <linux/compiler_types.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#ifdef __KERNEL__
@@ -277,7 +277,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
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index c5921f1390079..7c2432987105b 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -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
@@ -454,7 +454,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
@@ -598,7 +598,7 @@ struct ftrace_likely_data {
#define asm_inline asm
#endif
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
/*
* Use __typeof_unqual__() when available.
*/
@@ -637,7 +637,7 @@ struct ftrace_likely_data {
#include <asm/percpu_types.h>
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
/*
* __signed_scalar_typeof(x) - Declare a signed scalar type, leaving
diff --git a/include/linux/edd.h b/include/linux/edd.h
index 1c16fbcb81c06..32517f283f044 100644
--- a/include/linux/edd.h
+++ b/include/linux/edd.h
@@ -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 */
diff --git a/include/linux/err.h b/include/linux/err.h
index d3e38d5b3a985..033faa80be885 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -17,7 +17,7 @@
*/
#define MAX_ERRNO 4095
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
/**
* IS_ERR_VALUE - Detect an error pointer.
diff --git a/include/linux/export.h b/include/linux/export.h
index a686fd0ba4065..432e980140f2b 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -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)
diff --git a/include/linux/init.h b/include/linux/init.h
index 6326c61e2332d..cf43f1765eb2e 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -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 */
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index f7930b3dfd0a5..4728386ce65ca 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -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>
@@ -461,5 +461,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 */
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 53fe1f48fd28d..303e74cf4ead6 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -66,7 +66,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
@@ -77,7 +77,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
@@ -355,6 +355,6 @@
SYM_DATA_END(name)
#endif
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _LINUX_LINKAGE_H */
diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h
index 07584c5e36fb4..463090c4f9517 100644
--- a/include/linux/mem_encrypt.h
+++ b/include/linux/mem_encrypt.h
@@ -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__ */
diff --git a/include/linux/pe.h b/include/linux/pe.h
index cd2b7275385f3..ab45bba90ce82 100644
--- a/include/linux/pe.h
+++ b/include/linux/pe.h
@@ -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 */
diff --git a/include/linux/platform_data/emif_plat.h b/include/linux/platform_data/emif_plat.h
index b93feef5d586f..ad7f706c124e3 100644
--- a/include/linux/platform_data/emif_plat.h
+++ b/include/linux/platform_data/emif_plat.h
@@ -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 */
diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
index 441b2988e66a5..b256a9b4ef053 100644
--- a/include/linux/ti-emif-sram.h
+++ b/include/linux/ti-emif-sram.h
@@ -10,7 +10,7 @@
#include <linux/kbuild.h>
#include <linux/types.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct emif_regs_amx3 {
u32 emif_sdcfg_val;
diff --git a/include/linux/types.h b/include/linux/types.h
index 53e0adca4b9fb..c4aa8cc4b1cd6 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -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)]
@@ -288,5 +288,5 @@ struct rcuwait {
struct task_struct __rcu *task;
};
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _LINUX_TYPES_H */
diff --git a/tools/include/asm-generic/barrier.h b/tools/include/asm-generic/barrier.h
index 6ef36e920ea8a..b61c3bde0447e 100644
--- a/tools/include/asm-generic/barrier.h
+++ b/tools/include/asm-generic/barrier.h
@@ -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 */
diff --git a/tools/include/asm/alternative.h b/tools/include/asm/alternative.h
index 8e548ac8f740c..85db65074a714 100644
--- a/tools/include/asm/alternative.h
+++ b/tools/include/asm/alternative.h
@@ -3,7 +3,7 @@
#define _TOOLS_ASM_ALTERNATIVE_ASM_H
#if defined(__s390x__)
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
.macro ALTERNATIVE oldinstr, newinstr, feature
\oldinstr
.endm
diff --git a/tools/include/linux/cfi_types.h b/tools/include/linux/cfi_types.h
index a86af9bc8bdc4..b17614c493e4c 100644
--- a/tools/include/linux/cfi_types.h
+++ b/tools/include/linux/cfi_types.h
@@ -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 */
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index f2f54b0381680..0e08ad7e9a386 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -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 */
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (11 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 12/13] include: " Thomas Huth
@ 2026-10-23 6:48 ` Thomas Huth
2026-10-23 15:47 ` [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Weißschuh
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2026-10-23 6:48 UTC (permalink / raw)
To: Arnd Bergmann, Nathan Chancellor, Nicolas Schier,
Richard Henderson, Matt Turner, Magnus Lindholm, Catalin Marinas,
Will Deacon, Huacai Chen, Thomas Bogendoerfer,
Madhavan Srinivasan, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, Chris Zankel, Max Filippov, Ard Biesheuvel,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Luis Augenstein, Maximilian Huber, Anup Patel,
Paolo Bonzini, Shuah Khan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Andy Lutomirski, Vincenzo Frascino
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Mark Rutland, WANG Xuerui, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Christian Borntraeger, Sven Schnelle,
H. Peter Anvin, Ilias Apalodimas, Atish Patra,
Sean Christopherson, Alexandre Ghiti, Nick Desaulniers,
Bill Wendling, Justin Stitt, linux-alpha, linux-arm-kernel,
loongarch, linux-mips, linuxppc-dev, linux-s390, linux-efi,
netdev, kvm, kvm-riscv, linux-riscv, linux-kselftest, llvm
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__ anymore.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
Makefile | 2 +-
arch/alpha/boot/compressed/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 +-
| 1 -
scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py | 2 +-
tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ----
tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 --
21 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/Makefile b/Makefile
index 0319cd716d73b..98bffdd9cf2d6 100644
--- a/Makefile
+++ b/Makefile
@@ -606,7 +606,7 @@ LINUXINCLUDE := \
-I$(objtree)/include \
$(USERINCLUDE)
-KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
+KBUILD_AFLAGS := -fno-PIE
KBUILD_CFLAGS :=
KBUILD_CFLAGS += -fshort-wchar
diff --git a/arch/alpha/boot/compressed/Makefile b/arch/alpha/boot/compressed/Makefile
index eb930f01b4be4..16119a13e53a3 100644
--- a/arch/alpha/boot/compressed/Makefile
+++ b/arch/alpha/boot/compressed/Makefile
@@ -22,7 +22,7 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += -pipe -mcpu=ev4 -mno-fp-regs -ffixed-8
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS
KBUILD_CFLAGS += $(CC_FLAGS_DIALECT)
-KBUILD_AFLAGS := -D__ASSEMBLY__ $(KBUILD_CFLAGS)
+KBUILD_AFLAGS := $(KBUILD_CFLAGS)
# The stub has no sanitizer or coverage runtime. arch/alpha/lib/lib.a is
# built with the kernel's instrumentation and -mcpu=, so build private
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 00efdc5d23543..0ba0b4bb3e013 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -77,7 +77,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
diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile
index 0b84892d084b6..c2b73fd3781c0 100644
--- a/arch/loongarch/vdso/Makefile
+++ b/arch/loongarch/vdso/Makefile
@@ -32,7 +32,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)
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 2684540758a8d..3e3803b2db48f 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -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)
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index 00d3ba2c482ac..4d04987e995de 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -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),)
obj-vdso-y += vgettimeofday.o
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 7ee0fa2d3371e..5dca91ec9f4aa 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -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
diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile
index 60319d4ff25a6..959617c4ee89c 100644
--- a/arch/powerpc/platforms/cell/spufs/Makefile
+++ b/arch/powerpc/platforms/cell/spufs/Makefile
@@ -15,7 +15,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
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 8b712cd85fcd3..83ecc702f7146 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -17,7 +17,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
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 4a9bce32586d3..69d75072888d1 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -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)
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 680ad803cba7d..e73ef522496e1 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -49,7 +49,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)
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
index a0fb39abc5c86..20bbe1af05acd 100644
--- a/arch/x86/realmode/rm/Makefile
+++ b/arch/x86/realmode/rm/Makefile
@@ -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
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index d3ef0407401f6..ece4ae6dea97d 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -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
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index 415f63105b481..d4edc3c0c4556 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -61,7 +61,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 \
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index 00e9b7ee1e012..4233143534465 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -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)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 6127feb970c65..0b7c1e273f0cb 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -465,7 +465,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)
diff --git a/scripts/gfp-translate b/scripts/gfp-translate
index 8385ae0d5af93..f6353795fdca3 100755
--- a/scripts/gfp-translate
+++ b/scripts/gfp-translate
@@ -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>
--git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 2f1d1767ca267..9c15e748761c4 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -36,7 +36,6 @@ sed -E -e '
s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g
s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g
s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @
- s/__ASSEMBLY__/__ASSEMBLER__/g
' $INFILE > $TMPFILE || exit 1
scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE
diff --git a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py
index 93787a1cd1566..8d9ae35764040 100644
--- a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py
+++ b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py
@@ -152,7 +152,7 @@ class TestSavedCmdParser(unittest.TestCase):
self._assert_parsing(cmd, expected)
def test_clang(self):
- cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -D__ASSEMBLY__ -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S"""
+ cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S"""
expected = "../arch/x86/entry/entry_64_compat.S"
self._assert_parsing(cmd, expected)
diff --git a/tools/testing/selftests/kvm/lib/riscv/handlers.S b/tools/testing/selftests/kvm/lib/riscv/handlers.S
index b787b982e922a..c8cc2d695f483 100644
--- a/tools/testing/selftests/kvm/lib/riscv/handlers.S
+++ b/tools/testing/selftests/kvm/lib/riscv/handlers.S
@@ -3,10 +3,6 @@
* Copyright (c) 2023 Intel Corporation
*/
-#ifndef __ASSEMBLY__
-#define __ASSEMBLY__
-#endif
-
#include <asm/csr.h>
.macro save_context
diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testing/selftests/vDSO/vgetrandom-chacha.S
index 16f985b089d45..42839c5cf5ec4 100644
--- a/tools/testing/selftests/vDSO/vgetrandom-chacha.S
+++ b/tools/testing/selftests/vDSO/vgetrandom-chacha.S
@@ -3,8 +3,6 @@
* Copyright (C) 2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
-#define __ASSEMBLY__
-
#if defined(__aarch64__)
#include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S"
#elif defined(__loongarch__)
--
2.56.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v5 12/13] include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
2026-10-23 6:48 ` [PATCH v5 12/13] include: " Thomas Huth
@ 2026-10-23 15:33 ` Bart Van Assche
0 siblings, 0 replies; 16+ messages in thread
From: Bart Van Assche @ 2026-10-23 15:33 UTC (permalink / raw)
To: Thomas Huth, Arnd Bergmann, Nathan Chancellor, Nicolas Schier,
Russell King, Chris Li
Cc: soc, linux-kernel, linux-kbuild, Thomas Weißschuh,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-sparse,
llvm
On 10/22/26 11:48 PM, Thomas Huth wrote:
> 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).
For future patch submissions, please include the command that has been
used to modify the code in the patch description. Anyway:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
` (12 preceding siblings ...)
2026-10-23 6:48 ` [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Thomas Huth
@ 2026-10-23 15:47 ` Thomas Weißschuh
13 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-10-23 15:47 UTC (permalink / raw)
To: Thomas Huth
Cc: Arnd Bergmann, Nathan Chancellor, Nicolas Schier, Paul Walmsley,
Palmer Dabbelt, Albert Ou, soc, linux-kernel, linux-kbuild,
Alexandre Ghiti, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-riscv, llvm
On 2026-10-23 08:48:37+0200, Thomas Huth wrote:
(...)
> I split the patches per architecture / maintained subsystem to ease
> the review, and I also split the uapi headers from the normal ones in
> case we ever decide that uapi needs to be treated differently from the
> normal headers here and the patches would need to get reverted.
Nit:
The UAPI split doesn't really matter anymore, now that
scripts/headers_install.sh normalizes all UAPI headers.
(...)
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-10-23 15:47 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2026-10-23 6:48 ` [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file Thomas Huth
2026-10-23 6:48 ` [PATCH v5 02/13] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__ Thomas Huth
2026-10-23 6:48 ` [PATCH v5 03/13] ARM: PXA: " Thomas Huth
2026-10-23 6:48 ` [PATCH v5 04/13] ARM: BCM7XXX: " Thomas Huth
2026-10-23 6:48 ` [PATCH v5 05/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header Thomas Huth
2026-10-23 6:48 ` [PATCH v5 06/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 07/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 08/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 09/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 10/13] uapi: " Thomas Huth
2026-10-23 6:48 ` [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 12/13] include: " Thomas Huth
2026-10-23 15:33 ` Bart Van Assche
2026-10-23 6:48 ` [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Thomas Huth
2026-10-23 15:47 ` [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Weißschuh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®