irqchip/gic: Replace __ASSEMBLY__ with __ASSEMBLER__
Subsystems (2)
PATCH 1/1 irqchip/gic: Replace __ASSEMBLY__ with __ASSEMBLER__
From: Thomas Huth <[email protected]>
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize now on the __ASSEMBLER__ macro that is provided by the compilers.
---
Note: Patch has been split from an earlier patch series of mine to ease reviewing
arch/arm/include/asm/arch_gicv3.h | 4 ++-- include/linux/irqchip/arm-gic-v3.h | 2 +- include/linux/irqchip/arm-gic.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/include/asm/arch_gicv3.h +2 -2
@@ -7,7 +7,7 @@#ifndef __ASM_ARCH_GICV3_H#define __ASM_ARCH_GICV3_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h>
@@ -257,5 +257,5 @@ static inline bool gic_has_relaxed_pmr_sync(void)return false; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !__ASM_ARCH_GICV3_H */
include/linux/irqchip/arm-gic-v3.h +1 -1
@@ -604,7 +604,7 @@#include <asm/arch_gicv3.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * We need a value to serve as a irq-type for LPIs. Choose one that will
include/linux/irqchip/arm-gic.h +2 -2
@@ -131,7 +131,7 @@#define GICV_PMR_PRIORITY_SHIFT 3#define GICV_PMR_PRIORITY_MASK (0x1f << GICV_PMR_PRIORITY_SHIFT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/irqdomain.h>
@@ -162,5 +162,5 @@ int gic_get_cpu_id(unsigned int cpu);void gic_migrate_target (unsigned int new_cpu_id);unsigned long gic_get_sgir_physaddr (void ); -#endif /* __ASSEMBLY */ +#endif /* __ASSEMBLER__ */ #endif
Signature · 1 line
2.53.0
The following commit has been merged into the irq/drivers branch of tip:
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 5a59e82f95d3521fa64f24b6450417ee098d8546 Gitweb: https://git.kernel.org/tip/5a59e82f95d3521fa64f24b6450417ee098d8546 Author: Thomas Huth <[email protected]> AuthorDate: Tue, 21 Apr 2026 13:30:12 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 30 Apr 2026 12:53:06 +02:00
irqchip/gic: Replace __ASSEMBLY__ with __ASSEMBLER__
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.
Standardize now on the __ASSEMBLER__ macro that is provided by the compilers.
--- arch/arm/include/asm/arch_gicv3.h | 4 ++-- include/linux/irqchip/arm-gic-v3.h | 2 +- include/linux/irqchip/arm-gic.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/include/asm/arch_gicv3.h +2 -2
@@ -7,7 +7,7 @@#ifndef __ASM_ARCH_GICV3_H#define __ASM_ARCH_GICV3_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h>
@@ -257,5 +257,5 @@ static inline bool gic_has_relaxed_pmr_sync(void)return false; } -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* !__ASM_ARCH_GICV3_H */
include/linux/irqchip/arm-gic-v3.h +1 -1
@@ -604,7 +604,7 @@#include <asm/arch_gicv3.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/* * We need a value to serve as a irq-type for LPIs. Choose one that will
include/linux/irqchip/arm-gic.h +2 -2
@@ -131,7 +131,7 @@#define GICV_PMR_PRIORITY_SHIFT 3#define GICV_PMR_PRIORITY_MASK (0x1f << GICV_PMR_PRIORITY_SHIFT) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__#include <linux/irqdomain.h>
@@ -162,5 +162,5 @@ int gic_get_cpu_id(unsigned int cpu);void gic_migrate_target (unsigned int new_cpu_id);unsigned long gic_get_sgir_physaddr (void ); -#endif /* __ASSEMBLY */ +#endif /* __ASSEMBLER__ */ #endif