Re: [PATCH v2 2/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

From
Segher Boessenkool <hidden>
Date
2025-06-11 13:56:03
Reply to
Thomas Huth, 2025-06-11
On Wed, Jun 11, 2025 at 07:55:45AM +0200, Thomas Huth wrote:
On 10/06/2025 22.26, Segher Boessenkool wrote:
quoted
On Tue, Jun 10, 2025 at 06:01:28PM +0200, Thomas Huth wrote:
quoted
From: Thomas Huth <redacted>

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.
Right, I can add that in the next version, too.
quoted
quoted
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.
Sorry, I've put the "now" into the wrong location ... it should rather be 
in the first half of the sentence instead :-)
Ah :-)

So do you want to redefine this symbol (which is off-limits) at all?  Or
do you belief that the compiler will have already defined it (like has
been documented for forever-and-a-half already, and there never were
problems with it)?


Segher
Thread (9 messages) 9 messages, 2 authors, last reply 2025-06-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help