On 03/07/2025 19.38, Thomas Huth wrote:
The kernel Makefiles define the __ASSEMBLY__ macro to provide a way to use headers in both, assembler and C source code. However, all the supported versions of the GCC and Clang compilers also define the macro __ASSEMBLER__ automatically already when compiling assembly code, 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@xxxxxxxxxx/ 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 would make sense to standardize on the macro that gets defined by the compiler, so this patch series changes all occurances of __ASSEMBLY__ into __ASSEMBLER__. I split the patches per architecture to ease the review, and I also split the uapi headers from the normal ones in case we decide that uapi needs to be treated differently from the normal headers here.
Friendly ping! The patches should still apply cleanly, I think. Thomas