mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Huth" <thuth@redhat.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>
Cc: soc@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	linux-riscv@lists.infradead.org, llvm@lists.linux.dev
Subject: Re: [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
Date: Thu, 29 Oct 2026 13:41:36 +0100	[thread overview]
Message-ID: <f7533c95-8b42-4154-b76b-7d0dfb56148c@app.fastmail.com> (raw)
In-Reply-To: <20261023064908.66707-1-thuth@redhat.com>

On Fri, Oct 23, 2026, at 08:48, Thomas Huth wrote:
> The kernel Makefiles define the __ASSEMBLY__ macro to provide
> a way to use headers in both, assembly and C source code.
> However, all the supported versions of the GCC and Clang compilers (and
> also other compilers like Tiny-C or PCC) define the macro __ASSEMBLER__
> automatically already when compiling assembly code, too, so some kernel
> headers are using __ASSEMBLER__ instead. With regards to userspace code,
> this seems also to be constant source of confusion, see for example these
> links here:
>
>  https://lore.kernel.org/kvm/20250222014526.2302653-1-seanjc@google.com/
>  
> https://stackoverflow.com/questions/28924355/gcc-assembler-preprocessor-not-compatible-with-standard-headers
>  https://forums.raspberrypi.com/viewtopic.php?p=1652944#p1653834
>  https://github.com/riscv-software-src/opensbi/issues/199
>
> To avoid confusion in the future, it makes sense to standardize
> on the macro that gets defined by the compiler, so this patch series
> changes all occurrences of __ASSEMBLY__ into __ASSEMBLER__ and
> finally removes the -D__ASSEMBLY__ from the Makefiles.
>
> I split the patches per architecture / maintained subsystem to ease
> the review, and I also split the uapi headers from the normal ones in
> case we ever decide that uapi needs to be treated differently from the
> normal headers here and the patches would need to get reverted.

I have started an asm-generic branch[1] for 7.5 based on today's mainline
snapshot and applied the series. I'll rebase once more after -rc1 is
out to ensure this can be tested in linux-next.

Thanks a lot for getting this finished!

     Arnd

[1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/log/?h=asm-generic

      parent reply	other threads:[~2026-10-29 12:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23  6:48 Thomas Huth
2026-10-23  6:48 ` [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file Thomas Huth
2026-10-23  6:48 ` [PATCH v5 02/13] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__ Thomas Huth
2026-10-23  6:48 ` [PATCH v5 03/13] ARM: PXA: " Thomas Huth
2026-10-23  6:48 ` [PATCH v5 04/13] ARM: BCM7XXX: " Thomas Huth
2026-10-23  6:48 ` [PATCH v5 05/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header Thomas Huth
2026-10-23  6:48 ` [PATCH v5 06/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23  6:48 ` [PATCH v5 07/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2026-10-23  6:48 ` [PATCH v5 08/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23  6:48 ` [PATCH v5 09/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2026-10-23  6:48 ` [PATCH v5 10/13] uapi: " Thomas Huth
2026-10-23  6:48 ` [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23  6:48 ` [PATCH v5 12/13] include: " Thomas Huth
2026-10-23 15:33   ` Bart Van Assche
2026-10-23  6:48 ` [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Thomas Huth
2026-10-23 15:47 ` [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Weißschuh
2026-10-29 12:41 ` Arnd Bergmann [this message]

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=f7533c95-8b42-4154-b76b-7d0dfb56148c@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=justinstitt@google.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@weissschuh.net \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nsc@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=soc@lists.linux.dev \
    --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

all inboxes | Powered by JetHome®