linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Thomas Huth <thuth@redhat.com>
Cc: linuxppc-dev@lists.ozlabs.org,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Geoff Levand <geoff@infradead.org>,
	Naveen N Rao <naveen@kernel.org>
Subject: Re: [PATCH v2 2/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Date: Wed, 11 Jun 2025 08:47:30 -0500	[thread overview]
Message-ID: <20250611134730.GI30295@gate.crashing.org> (raw)
In-Reply-To: <53b46042-4ca3-4ba8-bf72-2dee9c54dc6d@redhat.com>

On Wed, Jun 11, 2025 at 07:55:45AM +0200, Thomas Huth wrote:
> On 10/06/2025 22.26, Segher Boessenkool wrote:
> >On Tue, Jun 10, 2025 at 06:01:28PM +0200, Thomas Huth wrote:
> >>From: Thomas Huth <thuth@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.
> 
> Right, I can add that in the next version, too.
> 
> >>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


  reply	other threads:[~2025-06-11 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 16:01 [PATCH v2 0/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2025-06-10 16:01 ` [PATCH v2 1/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-06-10 20:12   ` Segher Boessenkool
2025-06-11  5:48     ` Thomas Huth
2025-06-10 16:01 ` [PATCH v2 2/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-06-10 20:26   ` Segher Boessenkool
2025-06-11  5:55     ` Thomas Huth
2025-06-11 13:47       ` Segher Boessenkool [this message]
2025-06-10 20:00 ` [PATCH v2 0/2] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250611134730.GI30295@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=geoff@infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).