[PATCH v2 2/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Segher Boessenkool
segher at kernel.crashing.org
Wed Jun 11 06:26:34 AEST 2025
On Tue, Jun 10, 2025 at 06:01:28PM +0200, 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.
And it should not, the kernel is not allowed to define any symbol
starting with two underscores at all! Including __ASSEMBLER__ yes.
> 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 on
> the __ASSEMBLER__ macro that is provided by the compilers now.
"Now"? This is true since at least 2003, and probably a lot longer
already.
Segher
More information about the Linuxppc-dev
mailing list