[PATCH] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__
Thomas Huth
thuth at redhat.com
Thu Aug 13 00:44:48 PDT 2026
On 21/04/2026 16.40, Thomas Huth wrote:
> From: Thomas Huth <thuth at redhat.com>
>
> 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 at redhat.com>
> ---
> Note: This patch has been split from an earlier patch series of mine
> to ease reviewing
>
> include/linux/arm-smccc.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Friendly ping!
Could anybody please pick this up? Thanks!
Thomas
> diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
> index 50b47eba7d015..96d7a61055a70 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
>
> @@ -302,7 +302,7 @@
> #define SMCCC_RET_NOT_REQUIRED -2
> #define SMCCC_RET_INVALID_PARAMETER -3
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> #include <linux/linkage.h>
> #include <linux/types.h>
> @@ -353,7 +353,7 @@ s32 arm_smccc_get_soc_id_version(void);
> */
> s32 arm_smccc_get_soc_id_revision(void);
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> /*
> * Returns whether a specific hypervisor UUID is advertised for the
> @@ -402,7 +402,7 @@ static inline u32 smccc_uuid_to_reg(const uuid_t *uuid, int reg)
> return val;
> }
>
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>
> /**
> * struct arm_smccc_res - Result from SMC/HVC call
> @@ -750,5 +750,5 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
> })
> #endif /*CONFIG_ARM64*/
>
> -#endif /*__ASSEMBLY__*/
> +#endif /*__ASSEMBLER__*/
> #endif /*__LINUX_ARM_SMCCC_H*/
More information about the linux-arm-kernel
mailing list