Skip to content

treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files

Thomas Huth kvm kvm-riscv linux-alpha linux-arch linux-arm-kernel linux-devicetree linux-doc linux-efi linux-hexagon linux-kbuild linux-kselftest linux-mips linux-riscv linux-s390 linux-sparse linux-trace-kernel linuxppc-dev lkml llvm loongarch netdev soc workflows 16 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest posting 2/213 patches 4 repliesIn review
  2. v5 posting 1/28 patches 2 repliesSuperseded
  3. v49 patches 2 repliesSuperseded
Earlier versions · 13
VersionPostedPatchesRepliesStatus
v2 posting 7/72 patches1 replyApplied
v3 posting 5/52 patches0 repliesSuperseded
v3 posting 4/51 patch1 replyApplied
v3 posting 3/52 patches1 replyApplied
v2 posting 6/72 patches1 replySuperseded
v3 posting 2/52 patches2 repliesApplied
v2 posting 5/71 patch2 repliesSuperseded
v2 posting 4/72 patches2 repliesSuperseded
v2 posting 3/71 patch3 repliesSuperseded
v3 posting 1/52 patches0 repliesSuperseded
v2 posting 2/72 patches6 repliesSuperseded
v2 posting 1/72 patches4 repliesApplied 2/2
v141 patches46 repliesApplied

Changes in v5 from the cover letter

- To ease the review, I split some huge patches into smaller patches when there was a separate entry for the files in the MAINTAINERS file
- Dropped the patches that were already merged
- Rebased the patches to the current master branch and fixed new occurrences of __ASSEMBLY__

Patches in v5 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header fileinclude/linux/of_fdt.h+2 -20 replies
2/13smccc: Replace __ASSEMBLY__ with __ASSEMBLER__include/linux/arm-smccc.h+5 -50 replies
3/13ARM: PXA: Replace __ASSEMBLY__ with __ASSEMBLER__arch/arm/mach-pxa/irqs.h arch/arm/mach-pxa/pxa-regs.h+2 -20 replies
4/13ARM: BCM7XXX: Replace __ASSEMBLY__ with __ASSEMBLER__arch/arm/include/asm/hardware/cache-b15-rac.h+1 -10 replies
5/13arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi headerarch/arm/include/uapi/asm/ptrace.h+2 -20 replies
6/13arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headersarch/arm/include/asm/assembler.h arch/arm/include/asm/barrier.h arch/arm/include/asm/cache.h +49 more+101 -1010 replies
7/13hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headersarch/hexagon/include/uapi/asm/registers.h+2 -20 replies
8/13hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headersarch/hexagon/include/asm/hexagon_vm.h arch/hexagon/include/asm/mem-layout.h arch/hexagon/include/asm/page.h +2 more+15 -150 replies
9/13asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headersinclude/uapi/asm-generic/int-l64.h include/uapi/asm-generic/int-ll64.h include/uapi/asm-generic/signal-defs.h +1 more+7 -70 replies
10/13uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headersDocumentation/dev-tools/checkuapi.rst include/uapi/linux/a.out.h include/uapi/linux/const.h +4 more+13 -130 replies
11/13asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headersinclude/asm-generic/barrier.h include/asm-generic/bug.h include/asm-generic/current.h +4 more+13 -130 replies
12/13include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headersinclude/linux/amba/serial.h include/linux/annotate.h include/linux/cfi_types.h +17 more+49 -491 reply
13/13treewide: Stop defining __ASSEMBLY__ for assembler filesMakefile arch/alpha/boot/compressed/Makefile arch/arm64/kernel/vdso32/Makefile +18 more+17 -251 reply

Reviews trailers per patch

4 of 13 patches have a Reviewed-by or Acked-by.

PatchFlorian FainelliBrian CainBart Van AsscheNicolas Schier
1/13
2/13
3/13
4/13R-b
5/13
6/13
7/13
8/13A-b
9/13
10/13
11/13
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files

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/[email protected]/
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.

v5:
- To ease the review, I split some huge patches into smaller patches when there was a separate entry for the files in the MAINTAINERS file
- Dropped the patches that were already merged
- Rebased the patches to the current master branch and fixed new occurrences of __ASSEMBLY__

Thomas Huth (13):
of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header
file
smccc: Replace __ASSEMBLY__ with __ASSEMBLER__
ARM: PXA: Replace __ASSEMBLY__ with __ASSEMBLER__
ARM: BCM7XXX: Replace __ASSEMBLY__ with __ASSEMBLER__
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi
headers
include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
treewide: Stop defining __ASSEMBLY__ for assembler files

 Documentation/dev-tools/checkuapi.rst          |  2 +-
 Makefile                                       |  2 +-
 arch/alpha/boot/compressed/Makefile            |  2 +-
 arch/arm/include/asm/assembler.h               |  2 +-
 arch/arm/include/asm/barrier.h                 |  4 ++--
 arch/arm/include/asm/cache.h                   |  2 +-
 arch/arm/include/asm/cp15.h                    |  4 ++--
 arch/arm/include/asm/cputype.h                 |  4 ++--
 arch/arm/include/asm/current.h                 |  4 ++--
 arch/arm/include/asm/delay.h                   |  4 ++--
 arch/arm/include/asm/domain.h                  |  8 ++++----
 arch/arm/include/asm/fpstate.h                 |  2 +-
 arch/arm/include/asm/ftrace.h                  |  6 +++---
 arch/arm/include/asm/hardware/cache-b15-rac.h  |  2 +-
 arch/arm/include/asm/hardware/cache-l2x0.h     |  4 ++--
 arch/arm/include/asm/hardware/dec21285.h       |  2 +-
 arch/arm/include/asm/hardware/ioc.h            |  2 +-
 arch/arm/include/asm/hardware/iomd.h           |  4 ++--
 arch/arm/include/asm/hardware/memc.h           |  2 +-
 arch/arm/include/asm/hwcap.h                   |  2 +-
 arch/arm/include/asm/irq.h                     |  2 +-
 arch/arm/include/asm/kexec.h                   |  4 ++--
 arch/arm/include/asm/kgdb.h                    |  4 ++--
 arch/arm/include/asm/linkage.h                 |  4 ++--
 arch/arm/include/asm/mach/arch.h               |  2 +-
 arch/arm/include/asm/mcpm.h                    |  4 ++--
 arch/arm/include/asm/memory.h                  |  4 ++--
 arch/arm/include/asm/mpu.h                     |  4 ++--
 arch/arm/include/asm/opcodes.h                 | 12 ++++++------
 arch/arm/include/asm/page.h                    |  4 ++--
 arch/arm/include/asm/pgtable-2level.h          |  4 ++--
 arch/arm/include/asm/pgtable-3level.h          |  4 ++--
 arch/arm/include/asm/pgtable-nommu.h           |  4 ++--
 arch/arm/include/asm/pgtable.h                 |  8 ++++----
 arch/arm/include/asm/probes.h                  |  4 ++--
 arch/arm/include/asm/proc-fns.h                |  4 ++--
 arch/arm/include/asm/ptrace.h                  |  4 ++--
 arch/arm/include/asm/system_info.h             |  4 ++--
 arch/arm/include/asm/system_misc.h             |  4 ++--
 arch/arm/include/asm/thread_info.h             |  2 +-
 arch/arm/include/asm/thread_notify.h           |  2 +-
 arch/arm/include/asm/tlbflush.h                | 10 +++++-----
 arch/arm/include/asm/tls.h                     |  4 ++--
 arch/arm/include/asm/unified.h                 |  6 +++---
 arch/arm/include/asm/unwind.h                  |  4 ++--
 arch/arm/include/asm/v7m.h                     |  4 ++--
 arch/arm/include/asm/vdso.h                    |  4 ++--
 arch/arm/include/asm/vdso/cp15.h               |  4 ++--
 arch/arm/include/asm/vdso/gettimeofday.h       |  4 ++--
 arch/arm/include/asm/vdso/processor.h          |  4 ++--
 arch/arm/include/asm/vfp.h                     |  2 +-
 arch/arm/include/asm/virt.h                    |  4 ++--
 arch/arm/include/uapi/asm/ptrace.h             |  4 ++--
 .../mach-footbridge/include/mach/hardware.h    |  2 +-
 arch/arm/mach-pxa/irqs.h                       |  2 +-
 arch/arm/mach-pxa/pxa-regs.h                   |  2 +-
 arch/arm/mach-sa1100/include/mach/bitfield.h   |  2 +-
 arch/arm/mach-sa1100/include/mach/hardware.h   |  2 +-
 arch/arm/tools/gen-mach-types                  |  2 +-
 arch/arm64/kernel/vdso32/Makefile              |  1 -
 arch/hexagon/include/asm/hexagon_vm.h          |  4 ++--
 arch/hexagon/include/asm/mem-layout.h          |  6 +++---
 arch/hexagon/include/asm/page.h                |  4 ++--
 arch/hexagon/include/asm/processor.h           |  4 ++--
 arch/hexagon/include/asm/thread_info.h         | 12 ++++++------
 arch/hexagon/include/uapi/asm/registers.h      |  4 ++--
 arch/loongarch/vdso/Makefile                   |  2 +-
 arch/mips/boot/compressed/Makefile             |  2 +-
 arch/mips/vdso/Makefile                        |  2 +-
 arch/powerpc/boot/Makefile                     |  2 +-
 arch/powerpc/platforms/cell/spufs/Makefile     |  2 +-
 arch/s390/Makefile                             |  2 +-
 arch/x86/boot/Makefile                         |  2 +-
 arch/x86/boot/compressed/Makefile              |  2 +-
 arch/x86/realmode/rm/Makefile                  |  2 +-
 arch/xtensa/kernel/Makefile                    |  2 +-
 drivers/firmware/efi/libstub/Makefile          |  2 +-
 drivers/net/wan/Makefile                       |  2 +-
 include/asm-generic/barrier.h                  |  4 ++--
 include/asm-generic/bug.h                      |  4 ++--
 include/asm-generic/current.h                  |  2 +-
 include/asm-generic/error-injection.h          |  2 +-
 include/asm-generic/int-ll64.h                 |  6 +++---
 include/asm-generic/rwonce.h                   |  4 ++--
 include/asm-generic/signal.h                   |  4 ++--
 include/linux/amba/serial.h                    |  4 ++--
 include/linux/annotate.h                       | 18 +++++++++---------
 include/linux/arm-smccc.h                      | 10 +++++-----
 include/linux/cfi_types.h                      |  6 +++---
 include/linux/compiler.h                       |  4 ++--
 include/linux/compiler_types.h                 |  8 ++++----
 include/linux/edd.h                            |  4 ++--
 include/linux/err.h                            |  2 +-
 include/linux/export.h                         |  2 +-
 include/linux/init.h                           |  6 +++---
 include/linux/ioport.h                         |  4 ++--
 include/linux/linkage.h                        |  6 +++---
 include/linux/mem_encrypt.h                    |  4 ++--
 include/linux/of_fdt.h                         |  4 ++--
 include/linux/pe.h                             |  4 ++--
 include/linux/platform_data/emif_plat.h        |  4 ++--
 include/linux/ti-emif-sram.h                   |  2 +-
 include/linux/types.h                          |  4 ++--
 include/uapi/asm-generic/int-l64.h             |  4 ++--
 include/uapi/asm-generic/int-ll64.h            |  4 ++--
 include/uapi/asm-generic/signal-defs.h         |  2 +-
 include/uapi/asm-generic/signal.h              |  4 ++--
 include/uapi/linux/a.out.h                     |  4 ++--
 include/uapi/linux/const.h                     |  4 ++--
 include/uapi/linux/edd.h                       |  4 ++--
 include/uapi/linux/hdlc/ioctl.h                |  4 ++--
 include/uapi/linux/types.h                     |  4 ++--
 scripts/Makefile.build                         |  2 +-
 scripts/gfp-translate                          |  2 +-
 scripts/headers_install.sh                     |  1 -
 .../tests/cmd_graph/test_savedcmd_parser.py    |  2 +-
 tools/include/asm-generic/barrier.h            |  4 ++--
 tools/include/asm/alternative.h                |  2 +-
 tools/include/linux/cfi_types.h                |  6 +++---
 tools/include/linux/compiler.h                 |  4 ++--
 tools/include/uapi/linux/const.h               |  4 ++--
 .../testing/selftests/kvm/lib/riscv/handlers.S |  4 ----
 .../testing/selftests/vDSO/vgetrandom-chacha.S |  2 --
 123 files changed, 229 insertions(+), 237 deletions(-)
Signature · 1 line
2.56.0