Skip to contentSkip to conversation

treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files

PATCH Applied Thomas Huth 16 participants 90 messages Mar 14, 2025 – Oct 10, 2025 Page 1 of 3

Subsystems (90)

v1 of 5 Applied Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover 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 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/[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 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__ and finally removes the -D__ASSEMBLY__ from the Makefiles.

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.

Thomas Huth (41):
uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers
arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi header
csky: 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
loongarch: Replace __ASSEMBLY__ with __ASSEMBLER__ in the loongarch
headers
m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi
headers
mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers
nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers s390/uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
s390x: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in the SuperH headers
sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
xtensa: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
xtensa: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers scripts/dtc: Update fdt.h to the latest version
treewide: Stop defining __ASSEMBLY__ for assembler files

 Documentation/dev-tools/checkuapi.rst         |  2 +-
 Makefile                                      |  2 +-
 arch/alpha/include/asm/console.h              |  4 +-
 arch/alpha/include/asm/page.h                 |  4 +-
 arch/alpha/include/asm/pal.h                  |  4 +-
 arch/alpha/include/asm/thread_info.h          |  8 +-
 arch/arc/include/asm/arcregs.h                |  2 +-
 arch/arc/include/asm/atomic.h                 |  4 +-
 arch/arc/include/asm/bitops.h                 |  4 +-
 arch/arc/include/asm/bug.h                    |  4 +-
 arch/arc/include/asm/cache.h                  |  4 +-
 arch/arc/include/asm/current.h                |  4 +-
 arch/arc/include/asm/dsp-impl.h               |  2 +-
 arch/arc/include/asm/dsp.h                    |  4 +-
 arch/arc/include/asm/dwarf.h                  |  4 +-
 arch/arc/include/asm/entry.h                  |  4 +-
 arch/arc/include/asm/irqflags-arcv2.h         |  4 +-
 arch/arc/include/asm/irqflags-compact.h       |  4 +-
 arch/arc/include/asm/jump_label.h             |  4 +-
 arch/arc/include/asm/linkage.h                |  6 +-
 arch/arc/include/asm/mmu-arcv2.h              |  4 +-
 arch/arc/include/asm/mmu.h                    |  2 +-
 arch/arc/include/asm/page.h                   |  4 +-
 arch/arc/include/asm/pgtable-bits-arcv2.h     |  4 +-
 arch/arc/include/asm/pgtable-levels.h         |  4 +-
 arch/arc/include/asm/pgtable.h                |  4 +-
 arch/arc/include/asm/processor.h              |  4 +-
 arch/arc/include/asm/ptrace.h                 |  4 +-
 arch/arc/include/asm/switch_to.h              |  2 +-
 arch/arc/include/asm/thread_info.h            |  4 +-
 arch/arc/include/uapi/asm/ptrace.h            |  4 +-
 arch/arm/include/asm/arch_gicv3.h             |  4 +-
 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/jump_label.h             |  4 +-
 arch/arm/include/asm/kexec.h                  |  4 +-
 arch/arm/include/asm/kgdb.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                | 10 +-
 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/vdso/vsyscall.h          |  4 +-
 arch/arm/include/asm/vfp.h                    |  2 +-
 arch/arm/include/asm/virt.h                   |  4 +-
 arch/arm/include/uapi/asm/ptrace.h            |  4 +-
 arch/arm/mach-at91/pm.h                       |  2 +-
 arch/arm/mach-exynos/smc.h                    |  4 +-
 .../mach-footbridge/include/mach/hardware.h   |  2 +-
 arch/arm/mach-imx/hardware.h                  |  2 +-
 arch/arm/mach-imx/mxc.h                       |  2 +-
 arch/arm/mach-omap2/control.h                 |  8 +-
 arch/arm/mach-omap2/soc.h                     |  4 +-
 arch/arm/mach-omap2/sram.h                    |  4 +-
 arch/arm/mach-pxa/irqs.h                      |  2 +-
 arch/arm/mach-pxa/pxa-regs.h                  |  2 +-
 arch/arm/mach-s3c/map-base.h                  |  2 +-
 arch/arm/mach-sa1100/include/mach/bitfield.h  |  2 +-
 arch/arm/mach-sa1100/include/mach/hardware.h  |  2 +-
 arch/arm/mach-tegra/reset.h                   |  2 +-
 arch/arm/mach-tegra/sleep.h                   |  2 +-
 arch/arm/tools/gen-mach-types                 |  2 +-
 arch/arm64/include/asm/alternative-macros.h   |  8 +-
 arch/arm64/include/asm/alternative.h          |  4 +-
 arch/arm64/include/asm/arch_gicv3.h           |  4 +-
 arch/arm64/include/asm/asm-extable.h          |  6 +-
 arch/arm64/include/asm/assembler.h            |  2 +-
 arch/arm64/include/asm/barrier.h              |  4 +-
 arch/arm64/include/asm/cache.h                |  4 +-
 arch/arm64/include/asm/cpucaps.h              |  4 +-
 arch/arm64/include/asm/cpufeature.h           |  4 +-
 arch/arm64/include/asm/cputype.h              |  4 +-
 arch/arm64/include/asm/current.h              |  4 +-
 arch/arm64/include/asm/debug-monitors.h       |  4 +-
 arch/arm64/include/asm/el2_setup.h            |  2 +-
 arch/arm64/include/asm/elf.h                  |  4 +-
 arch/arm64/include/asm/esr.h                  |  4 +-
 arch/arm64/include/asm/fixmap.h               |  4 +-
 arch/arm64/include/asm/fpsimd.h               |  2 +-
 arch/arm64/include/asm/ftrace.h               |  6 +-
 arch/arm64/include/asm/gpr-num.h              |  6 +-
 arch/arm64/include/asm/hwcap.h                |  2 +-
 arch/arm64/include/asm/image.h                |  4 +-
 arch/arm64/include/asm/insn.h                 |  4 +-
 arch/arm64/include/asm/jump_label.h           |  4 +-
 arch/arm64/include/asm/kasan.h                |  2 +-
 arch/arm64/include/asm/kexec.h                |  4 +-
 arch/arm64/include/asm/kgdb.h                 |  4 +-
 arch/arm64/include/asm/kvm_asm.h              |  4 +-
 arch/arm64/include/asm/kvm_mmu.h              |  4 +-
 arch/arm64/include/asm/kvm_mte.h              |  4 +-
 arch/arm64/include/asm/kvm_ptrauth.h          |  6 +-
 arch/arm64/include/asm/linkage.h              |  2 +-
 arch/arm64/include/asm/memory.h               |  4 +-
 arch/arm64/include/asm/mmu.h                  |  4 +-
 arch/arm64/include/asm/mmu_context.h          |  4 +-
 arch/arm64/include/asm/mte-kasan.h            |  4 +-
 arch/arm64/include/asm/mte.h                  |  4 +-
 arch/arm64/include/asm/page.h                 |  4 +-
 arch/arm64/include/asm/pgtable-prot.h         |  4 +-
 arch/arm64/include/asm/pgtable.h              |  4 +-
 arch/arm64/include/asm/proc-fns.h             |  4 +-
 arch/arm64/include/asm/processor.h            |  4 +-
 arch/arm64/include/asm/ptrace.h               |  4 +-
 arch/arm64/include/asm/rsi_smc.h              |  4 +-
 arch/arm64/include/asm/rwonce.h               |  4 +-
 arch/arm64/include/asm/scs.h                  |  4 +-
 arch/arm64/include/asm/sdei.h                 |  4 +-
 arch/arm64/include/asm/smp.h                  |  4 +-
 arch/arm64/include/asm/spectre.h              |  4 +-
 arch/arm64/include/asm/stacktrace/frame.h     |  4 +-
 arch/arm64/include/asm/sysreg.h               | 10 +-
 arch/arm64/include/asm/system_misc.h          |  4 +-
 arch/arm64/include/asm/thread_info.h          |  2 +-
 arch/arm64/include/asm/tlbflush.h             |  2 +-
 arch/arm64/include/asm/vdso.h                 |  4 +-
 arch/arm64/include/asm/vdso/compat_barrier.h  |  4 +-
 .../include/asm/vdso/compat_gettimeofday.h    |  4 +-
 arch/arm64/include/asm/vdso/getrandom.h       |  4 +-
 arch/arm64/include/asm/vdso/gettimeofday.h    |  4 +-
 arch/arm64/include/asm/vdso/processor.h       |  4 +-
 arch/arm64/include/asm/vdso/vsyscall.h        |  4 +-
 arch/arm64/include/asm/virt.h                 |  4 +-
 arch/arm64/include/uapi/asm/kvm.h             |  2 +-
 arch/arm64/include/uapi/asm/ptrace.h          |  4 +-
 arch/arm64/include/uapi/asm/sigcontext.h      |  4 +-
 arch/arm64/kernel/vdso32/Makefile             |  1 -
 arch/csky/abiv1/inc/abi/regdef.h              |  2 +-
 arch/csky/abiv2/inc/abi/regdef.h              |  2 +-
 arch/csky/include/asm/barrier.h               |  4 +-
 arch/csky/include/asm/cache.h                 |  2 +-
 arch/csky/include/asm/ftrace.h                |  4 +-
 arch/csky/include/asm/jump_label.h            |  4 +-
 arch/csky/include/asm/page.h                  |  4 +-
 arch/csky/include/asm/ptrace.h                |  4 +-
 arch/csky/include/asm/string.h                |  2 +-
 arch/csky/include/asm/thread_info.h           |  4 +-
 arch/csky/include/uapi/asm/ptrace.h           |  4 +-
 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/include/asm/addrspace.h        |  8 +-
 arch/loongarch/include/asm/alternative-asm.h  |  4 +-
 arch/loongarch/include/asm/alternative.h      |  4 +-
 arch/loongarch/include/asm/asm-extable.h      |  6 +-
 arch/loongarch/include/asm/asm.h              |  8 +-
 arch/loongarch/include/asm/cpu.h              |  4 +-
 arch/loongarch/include/asm/ftrace.h           |  4 +-
 arch/loongarch/include/asm/gpr-num.h          |  6 +-
 arch/loongarch/include/asm/irqflags.h         |  4 +-
 arch/loongarch/include/asm/jump_label.h       |  4 +-
 arch/loongarch/include/asm/kasan.h            |  2 +-
 arch/loongarch/include/asm/loongarch.h        | 16 ++--
 arch/loongarch/include/asm/orc_types.h        |  4 +-
 arch/loongarch/include/asm/page.h             |  4 +-
 arch/loongarch/include/asm/pgtable-bits.h     |  4 +-
 arch/loongarch/include/asm/pgtable.h          |  4 +-
 arch/loongarch/include/asm/prefetch.h         |  2 +-
 arch/loongarch/include/asm/thread_info.h      |  4 +-
 arch/loongarch/include/asm/types.h            |  2 +-
 arch/loongarch/include/asm/unwind_hints.h     |  4 +-
 arch/loongarch/include/asm/vdso/getrandom.h   |  4 +-
 .../loongarch/include/asm/vdso/gettimeofday.h |  4 +-
 arch/loongarch/include/asm/vdso/processor.h   |  4 +-
 arch/loongarch/include/asm/vdso/vdso.h        |  4 +-
 arch/loongarch/include/asm/vdso/vsyscall.h    |  4 +-
 arch/loongarch/vdso/Makefile                  |  2 +-
 arch/m68k/include/asm/adb_iop.h               |  4 +-
 arch/m68k/include/asm/bootinfo.h              |  4 +-
 arch/m68k/include/asm/entry.h                 |  4 +-
 arch/m68k/include/asm/kexec.h                 |  4 +-
 arch/m68k/include/asm/mac_baboon.h            |  4 +-
 arch/m68k/include/asm/mac_iop.h               |  4 +-
 arch/m68k/include/asm/mac_oss.h               |  4 +-
 arch/m68k/include/asm/mac_psc.h               |  4 +-
 arch/m68k/include/asm/mac_via.h               |  4 +-
 arch/m68k/include/asm/math-emu.h              |  6 +-
 arch/m68k/include/asm/mcf_pgtable.h           |  4 +-
 arch/m68k/include/asm/mcfmmu.h                |  2 +-
 arch/m68k/include/asm/motorola_pgtable.h      |  4 +-
 arch/m68k/include/asm/nettel.h                |  4 +-
 arch/m68k/include/asm/openprom.h              |  4 +-
 arch/m68k/include/asm/page.h                  |  4 +-
 arch/m68k/include/asm/page_mm.h               |  4 +-
 arch/m68k/include/asm/page_no.h               |  4 +-
 arch/m68k/include/asm/pgtable.h               |  2 +-
 arch/m68k/include/asm/pgtable_mm.h            |  8 +-
 arch/m68k/include/asm/ptrace.h                |  4 +-
 arch/m68k/include/asm/setup.h                 | 10 +-
 arch/m68k/include/asm/sun3_pgtable.h          |  8 +-
 arch/m68k/include/asm/sun3mmu.h               |  4 +-
 arch/m68k/include/asm/thread_info.h           |  6 +-
 arch/m68k/include/asm/traps.h                 |  6 +-
 arch/m68k/include/uapi/asm/bootinfo-vme.h     |  4 +-
 arch/m68k/include/uapi/asm/bootinfo.h         |  8 +-
 arch/m68k/include/uapi/asm/ptrace.h           |  4 +-
 arch/m68k/math-emu/fp_emu.h                   |  8 +-
 arch/microblaze/include/asm/asm-compat.h      |  2 +-
 arch/microblaze/include/asm/current.h         |  4 +-
 arch/microblaze/include/asm/entry.h           |  4 +-
 arch/microblaze/include/asm/exceptions.h      |  4 +-
 arch/microblaze/include/asm/fixmap.h          |  4 +-
 arch/microblaze/include/asm/ftrace.h          |  2 +-
 arch/microblaze/include/asm/kgdb.h            |  4 +-
 arch/microblaze/include/asm/mmu.h             |  4 +-
 arch/microblaze/include/asm/page.h            |  8 +-
 arch/microblaze/include/asm/pgtable.h         | 18 ++--
 arch/microblaze/include/asm/processor.h       |  8 +-
 arch/microblaze/include/asm/ptrace.h          |  4 +-
 arch/microblaze/include/asm/sections.h        |  4 +-
 arch/microblaze/include/asm/setup.h           |  4 +-
 arch/microblaze/include/asm/thread_info.h     |  4 +-
 arch/microblaze/include/asm/unistd.h          |  4 +-
 .../include/asm/xilinx_mb_manager.h           |  4 +-
 arch/microblaze/include/uapi/asm/ptrace.h     |  4 +-
 arch/mips/boot/compressed/Makefile            |  2 +-
 arch/mips/include/asm/addrspace.h             |  4 +-
 arch/mips/include/asm/asm-eva.h               |  6 +-
 arch/mips/include/asm/asm.h                   |  8 +-
 arch/mips/include/asm/bmips.h                 |  4 +-
 arch/mips/include/asm/cpu.h                   |  4 +-
 arch/mips/include/asm/dec/ecc.h               |  2 +-
 arch/mips/include/asm/dec/interrupts.h        |  4 +-
 arch/mips/include/asm/dec/kn01.h              |  2 +-
 arch/mips/include/asm/dec/kn02.h              |  2 +-
 arch/mips/include/asm/dec/kn02xa.h            |  2 +-
 arch/mips/include/asm/eva.h                   |  4 +-
 arch/mips/include/asm/ftrace.h                |  4 +-
 arch/mips/include/asm/hazards.h               |  4 +-
 arch/mips/include/asm/irqflags.h              |  4 +-
 arch/mips/include/asm/jazz.h                  | 16 ++--
 arch/mips/include/asm/jump_label.h            |  4 +-
 arch/mips/include/asm/linkage.h               |  2 +-
 arch/mips/include/asm/mach-generic/spaces.h   |  4 +-
 arch/mips/include/asm/mips-boards/bonito64.h  |  4 +-
 arch/mips/include/asm/mipsmtregs.h            |  6 +-
 arch/mips/include/asm/mipsregs.h              |  6 +-
 arch/mips/include/asm/msa.h                   |  4 +-
 arch/mips/include/asm/pci/bridge.h            |  4 +-
 arch/mips/include/asm/pm.h                    |  6 +-
 arch/mips/include/asm/prefetch.h              |  2 +-
 arch/mips/include/asm/regdef.h                |  4 +-
 arch/mips/include/asm/sibyte/board.h          |  4 +-
 arch/mips/include/asm/sibyte/sb1250.h         |  2 +-
 arch/mips/include/asm/sibyte/sb1250_defs.h    |  6 +-
 arch/mips/include/asm/smp-cps.h               |  6 +-
 arch/mips/include/asm/sn/addrs.h              | 18 ++--
 arch/mips/include/asm/sn/gda.h                |  4 +-
 arch/mips/include/asm/sn/kldir.h              |  4 +-
 arch/mips/include/asm/sn/klkernvars.h         |  4 +-
 arch/mips/include/asm/sn/launch.h             |  4 +-
 arch/mips/include/asm/sn/nmi.h                |  8 +-
 arch/mips/include/asm/sn/sn0/addrs.h          | 14 +--
 arch/mips/include/asm/sn/sn0/hub.h            |  2 +-
 arch/mips/include/asm/sn/sn0/hubio.h          | 36 ++++----
 arch/mips/include/asm/sn/sn0/hubmd.h          |  4 +-
 arch/mips/include/asm/sn/sn0/hubni.h          |  6 +-
 arch/mips/include/asm/sn/sn0/hubpi.h          |  4 +-
 arch/mips/include/asm/sn/types.h              |  2 +-
 arch/mips/include/asm/sync.h                  |  2 +-
 arch/mips/include/asm/thread_info.h           |  4 +-
 arch/mips/include/asm/unistd.h                |  4 +-
 arch/mips/include/asm/vdso/gettimeofday.h     |  4 +-
 arch/mips/include/asm/vdso/processor.h        |  4 +-
 arch/mips/include/asm/vdso/vdso.h             |  4 +-
 arch/mips/include/asm/vdso/vsyscall.h         |  4 +-
 arch/mips/include/asm/xtalk/xtalk.h           |  4 +-
 arch/mips/include/asm/xtalk/xwidget.h         |  4 +-
 arch/mips/vdso/Makefile                       |  2 +-
 arch/nios2/include/asm/entry.h                |  4 +-
 arch/nios2/include/asm/page.h                 |  4 +-
 arch/nios2/include/asm/processor.h            |  4 +-
 arch/nios2/include/asm/ptrace.h               |  4 +-
 arch/nios2/include/asm/registers.h            |  4 +-
 arch/nios2/include/asm/setup.h                |  4 +-
 arch/nios2/include/asm/thread_info.h          |  4 +-
 arch/nios2/include/asm/traps.h                |  2 +-
 arch/nios2/include/uapi/asm/ptrace.h          |  4 +-
 arch/openrisc/include/asm/mmu.h               |  2 +-
 arch/openrisc/include/asm/page.h              |  8 +-
 arch/openrisc/include/asm/pgtable.h           |  4 +-
 arch/openrisc/include/asm/processor.h         |  4 +-
 arch/openrisc/include/asm/ptrace.h            |  4 +-
 arch/openrisc/include/asm/setup.h             |  2 +-
 arch/openrisc/include/asm/thread_info.h       |  8 +-
 arch/openrisc/include/uapi/asm/ptrace.h       |  2 +-
 arch/parisc/include/asm/alternative.h         |  4 +-
 arch/parisc/include/asm/assembly.h            |  4 +-
 arch/parisc/include/asm/barrier.h             |  4 +-
 arch/parisc/include/asm/cache.h               |  4 +-
 arch/parisc/include/asm/current.h             |  4 +-
 arch/parisc/include/asm/dwarf.h               |  4 +-
 arch/parisc/include/asm/fixmap.h              |  4 +-
 arch/parisc/include/asm/ftrace.h              |  4 +-
 arch/parisc/include/asm/jump_label.h          |  4 +-
 arch/parisc/include/asm/kexec.h               |  4 +-
 arch/parisc/include/asm/kgdb.h                |  2 +-
 arch/parisc/include/asm/linkage.h             |  4 +-
 arch/parisc/include/asm/page.h                |  6 +-
 arch/parisc/include/asm/pdc.h                 |  4 +-
 arch/parisc/include/asm/pdcpat.h              |  4 +-
 arch/parisc/include/asm/pgtable.h             |  8 +-
 arch/parisc/include/asm/prefetch.h            |  4 +-
 arch/parisc/include/asm/processor.h           |  8 +-
 arch/parisc/include/asm/psw.h                 |  4 +-
 arch/parisc/include/asm/signal.h              |  4 +-
 arch/parisc/include/asm/smp.h                 |  4 +-
 arch/parisc/include/asm/spinlock_types.h      |  4 +-
 arch/parisc/include/asm/thread_info.h         |  4 +-
 arch/parisc/include/asm/traps.h               |  2 +-
 arch/parisc/include/asm/unistd.h              |  4 +-
 arch/parisc/include/asm/vdso.h                |  4 +-
 arch/parisc/include/uapi/asm/pdc.h            |  4 +-
 arch/parisc/include/uapi/asm/signal.h         |  4 +-
 arch/powerpc/boot/Makefile                    |  2 +-
 arch/powerpc/boot/page.h                      |  2 +-
 arch/powerpc/include/asm/asm-const.h          |  2 +-
 arch/powerpc/include/asm/barrier.h            |  2 +-
 arch/powerpc/include/asm/book3s/32/kup.h      |  4 +-
 arch/powerpc/include/asm/book3s/32/mmu-hash.h |  8 +-
 arch/powerpc/include/asm/book3s/32/pgtable.h  | 12 +--
 arch/powerpc/include/asm/book3s/64/hash-4k.h  |  4 +-
 arch/powerpc/include/asm/book3s/64/hash-64k.h |  4 +-
 arch/powerpc/include/asm/book3s/64/hash.h     |  4 +-
 arch/powerpc/include/asm/book3s/64/kup.h      |  6 +-
 arch/powerpc/include/asm/book3s/64/mmu-hash.h | 12 +--
 arch/powerpc/include/asm/book3s/64/mmu.h      |  8 +-
 .../include/asm/book3s/64/pgtable-64k.h       |  4 +-
 arch/powerpc/include/asm/book3s/64/pgtable.h  | 10 +-
 arch/powerpc/include/asm/book3s/64/radix.h    |  8 +-
 arch/powerpc/include/asm/book3s/64/slice.h    |  4 +-
 arch/powerpc/include/asm/bug.h                | 14 +--
 arch/powerpc/include/asm/cache.h              |  4 +-
 arch/powerpc/include/asm/cpu_has_feature.h    |  4 +-
 arch/powerpc/include/asm/cpuidle.h            |  2 +-
 arch/powerpc/include/asm/cputable.h           |  8 +-
 arch/powerpc/include/asm/cputhreads.h         |  4 +-
 arch/powerpc/include/asm/dcr-generic.h        |  4 +-
 arch/powerpc/include/asm/dcr-native.h         |  4 +-
 arch/powerpc/include/asm/dcr.h                |  4 +-
 arch/powerpc/include/asm/epapr_hcalls.h       |  4 +-
 arch/powerpc/include/asm/exception-64e.h      |  2 +-
 arch/powerpc/include/asm/exception-64s.h      |  6 +-
 arch/powerpc/include/asm/extable.h            |  2 +-
 arch/powerpc/include/asm/feature-fixups.h     |  6 +-
 arch/powerpc/include/asm/firmware.h           |  4 +-
 arch/powerpc/include/asm/fixmap.h             |  4 +-
 arch/powerpc/include/asm/ftrace.h             |  8 +-
 arch/powerpc/include/asm/head-64.h            |  4 +-
 arch/powerpc/include/asm/hvcall.h             |  4 +-
 arch/powerpc/include/asm/hw_irq.h             |  4 +-
 arch/powerpc/include/asm/interrupt.h          |  4 +-
 arch/powerpc/include/asm/irqflags.h           |  2 +-
 arch/powerpc/include/asm/jump_label.h         |  2 +-
 arch/powerpc/include/asm/kasan.h              |  4 +-
 arch/powerpc/include/asm/kdump.h              |  4 +-
 arch/powerpc/include/asm/kexec.h              |  4 +-
 arch/powerpc/include/asm/kgdb.h               |  4 +-
 arch/powerpc/include/asm/kup.h                |  8 +-
 arch/powerpc/include/asm/kvm_asm.h            |  2 +-
 arch/powerpc/include/asm/kvm_book3s_asm.h     |  6 +-
 arch/powerpc/include/asm/kvm_booke_hv_asm.h   |  4 +-
 arch/powerpc/include/asm/lv1call.h            |  4 +-
 arch/powerpc/include/asm/mmu.h                |  8 +-
 arch/powerpc/include/asm/mpc52xx.h            | 12 +--
 arch/powerpc/include/asm/nohash/32/kup-8xx.h  |  4 +-
 arch/powerpc/include/asm/nohash/32/mmu-44x.h  |  4 +-
 arch/powerpc/include/asm/nohash/32/mmu-8xx.h  |  4 +-
 arch/powerpc/include/asm/nohash/32/pgtable.h  | 12 +--
 arch/powerpc/include/asm/nohash/32/pte-8xx.h  |  2 +-
 .../include/asm/nohash/64/pgtable-4k.h        |  8 +-
 arch/powerpc/include/asm/nohash/64/pgtable.h  |  4 +-
 arch/powerpc/include/asm/nohash/kup-booke.h   |  4 +-
 arch/powerpc/include/asm/nohash/mmu-e500.h    |  4 +-
 arch/powerpc/include/asm/nohash/pgtable.h     |  6 +-
 arch/powerpc/include/asm/nohash/pte-e500.h    |  4 +-
 arch/powerpc/include/asm/opal-api.h           |  4 +-
 arch/powerpc/include/asm/opal.h               |  4 +-
 arch/powerpc/include/asm/page.h               | 14 +--
 arch/powerpc/include/asm/page_32.h            |  4 +-
 arch/powerpc/include/asm/page_64.h            |  4 +-
 arch/powerpc/include/asm/pgtable.h            |  8 +-
 arch/powerpc/include/asm/ppc_asm.h            |  4 +-
 arch/powerpc/include/asm/processor.h          |  8 +-
 arch/powerpc/include/asm/ptrace.h             |  6 +-
 arch/powerpc/include/asm/reg.h                |  6 +-
 arch/powerpc/include/asm/reg_booke.h          |  4 +-
 arch/powerpc/include/asm/reg_fsl_emb.h        |  4 +-
 arch/powerpc/include/asm/setup.h              |  4 +-
 arch/powerpc/include/asm/smp.h                |  4 +-
 arch/powerpc/include/asm/spu_csa.h            |  4 +-
 arch/powerpc/include/asm/synch.h              |  4 +-
 arch/powerpc/include/asm/thread_info.h        |  8 +-
 arch/powerpc/include/asm/tm.h                 |  4 +-
 arch/powerpc/include/asm/types.h              |  4 +-
 arch/powerpc/include/asm/unistd.h             |  4 +-
 arch/powerpc/include/asm/vdso.h               |  6 +-
 arch/powerpc/include/asm/vdso/getrandom.h     |  4 +-
 arch/powerpc/include/asm/vdso/gettimeofday.h  |  4 +-
 arch/powerpc/include/asm/vdso/processor.h     |  4 +-
 arch/powerpc/include/asm/vdso/vsyscall.h      |  4 +-
 arch/powerpc/include/asm/vdso_datapage.h      |  6 +-
 arch/powerpc/include/uapi/asm/opal-prd.h      |  4 +-
 arch/powerpc/include/uapi/asm/ptrace.h        | 12 +--
 arch/powerpc/include/uapi/asm/types.h         |  4 +-
 arch/powerpc/kernel/head_booke.h              |  4 +-
 arch/powerpc/net/bpf_jit.h                    |  2 +-
 arch/powerpc/platforms/cell/spufs/Makefile    |  2 +-
 arch/powerpc/platforms/powernv/subcore.h      |  4 +-
 arch/powerpc/xmon/xmon_bpts.h                 |  4 +-
 arch/riscv/include/asm/alternative-macros.h   | 12 +--
 arch/riscv/include/asm/alternative.h          |  2 +-
 arch/riscv/include/asm/asm-extable.h          |  6 +-
 arch/riscv/include/asm/asm.h                  | 10 +-
 arch/riscv/include/asm/assembler.h            |  2 +-
 arch/riscv/include/asm/barrier.h              |  4 +-
 arch/riscv/include/asm/cache.h                |  4 +-
 arch/riscv/include/asm/cpu_ops_sbi.h          |  2 +-
 arch/riscv/include/asm/csr.h                  |  4 +-
 arch/riscv/include/asm/current.h              |  4 +-
 arch/riscv/include/asm/errata_list.h          |  6 +-
 arch/riscv/include/asm/ftrace.h               |  6 +-
 arch/riscv/include/asm/gpr-num.h              |  6 +-
 arch/riscv/include/asm/image.h                |  4 +-
 arch/riscv/include/asm/insn-def.h             |  6 +-
 arch/riscv/include/asm/jump_label.h           |  4 +-
 arch/riscv/include/asm/kasan.h                |  2 +-
 arch/riscv/include/asm/kgdb.h                 |  4 +-
 arch/riscv/include/asm/mmu.h                  |  4 +-
 arch/riscv/include/asm/page.h                 |  4 +-
 arch/riscv/include/asm/pgtable.h              |  4 +-
 arch/riscv/include/asm/processor.h            |  4 +-
 arch/riscv/include/asm/ptrace.h               |  4 +-
 arch/riscv/include/asm/scs.h                  |  4 +-
 arch/riscv/include/asm/set_memory.h           |  4 +-
 arch/riscv/include/asm/thread_info.h          |  4 +-
 arch/riscv/include/asm/vdso.h                 |  4 +-
 arch/riscv/include/asm/vdso/gettimeofday.h    |  4 +-
 arch/riscv/include/asm/vdso/processor.h       |  4 +-
 arch/riscv/include/asm/vdso/vsyscall.h        |  4 +-
 arch/riscv/include/uapi/asm/kvm.h             |  2 +-
 arch/riscv/include/uapi/asm/ptrace.h          |  4 +-
 arch/riscv/include/uapi/asm/sigcontext.h      |  4 +-
 arch/s390/Makefile                            |  2 +-
 arch/s390/boot/boot.h                         |  4 +-
 arch/s390/include/asm/alternative.h           |  6 +-
 arch/s390/include/asm/asm-const.h             |  2 +-
 arch/s390/include/asm/cpu.h                   |  4 +-
 arch/s390/include/asm/cpu_mf-insn.h           |  4 +-
 arch/s390/include/asm/ctlreg.h                |  4 +-
 arch/s390/include/asm/dwarf.h                 |  4 +-
 arch/s390/include/asm/extmem.h                |  2 +-
 arch/s390/include/asm/fpu-insn-asm.h          |  4 +-
 arch/s390/include/asm/fpu-insn.h              |  4 +-
 arch/s390/include/asm/ftrace.h                |  4 +-
 arch/s390/include/asm/irq.h                   |  4 +-
 arch/s390/include/asm/jump_label.h            |  4 +-
 arch/s390/include/asm/lowcore.h               |  6 +-
 arch/s390/include/asm/mem_encrypt.h           |  4 +-
 arch/s390/include/asm/nmi.h                   |  4 +-
 arch/s390/include/asm/nospec-branch.h         |  4 +-
 arch/s390/include/asm/nospec-insn.h           |  4 +-
 arch/s390/include/asm/page.h                  |  4 +-
 arch/s390/include/asm/processor.h             |  4 +-
 arch/s390/include/asm/ptrace.h                |  4 +-
 arch/s390/include/asm/purgatory.h             |  4 +-
 arch/s390/include/asm/sclp.h                  |  4 +-
 arch/s390/include/asm/setup.h                 |  4 +-
 arch/s390/include/asm/sigp.h                  |  4 +-
 arch/s390/include/asm/thread_info.h           |  2 +-
 arch/s390/include/asm/tpi.h                   |  4 +-
 arch/s390/include/asm/types.h                 |  4 +-
 arch/s390/include/asm/vdso.h                  |  4 +-
 arch/s390/include/asm/vdso/getrandom.h        |  4 +-
 arch/s390/include/asm/vdso/vsyscall.h         |  4 +-
 arch/s390/include/uapi/asm/ptrace.h           |  5 +-
 arch/s390/include/uapi/asm/schid.h            |  4 +-
 arch/s390/include/uapi/asm/types.h            |  4 +-
 arch/s390/net/bpf_jit.h                       |  4 +-
 arch/sh/include/asm/cache.h                   |  4 +-
 arch/sh/include/asm/dwarf.h                   |  6 +-
 arch/sh/include/asm/fpu.h                     |  4 +-
 arch/sh/include/asm/ftrace.h                  |  8 +-
 arch/sh/include/asm/mmu.h                     |  4 +-
 arch/sh/include/asm/page.h                    |  8 +-
 arch/sh/include/asm/pgtable.h                 |  4 +-
 arch/sh/include/asm/pgtable_32.h              |  8 +-
 arch/sh/include/asm/processor.h               |  4 +-
 arch/sh/include/asm/smc37c93x.h               |  4 +-
 arch/sh/include/asm/suspend.h                 |  2 +-
 arch/sh/include/asm/thread_info.h             | 10 +-
 arch/sh/include/asm/tlb.h                     |  4 +-
 arch/sh/include/asm/types.h                   |  4 +-
 arch/sh/include/mach-common/mach/romimage.h   |  6 +-
 arch/sh/include/mach-ecovec24/mach/romimage.h |  6 +-
 arch/sh/include/mach-kfr2r09/mach/romimage.h  |  6 +-
 arch/sparc/include/asm/adi_64.h               |  4 +-
 arch/sparc/include/asm/auxio.h                |  4 +-
 arch/sparc/include/asm/auxio_32.h             |  4 +-
 arch/sparc/include/asm/auxio_64.h             |  4 +-
 arch/sparc/include/asm/cacheflush_64.h        |  4 +-
 arch/sparc/include/asm/cpudata.h              |  4 +-
 arch/sparc/include/asm/cpudata_64.h           |  4 +-
 arch/sparc/include/asm/delay_64.h             |  4 +-
 arch/sparc/include/asm/ftrace.h               |  2 +-
 arch/sparc/include/asm/hvtramp.h              |  2 +-
 arch/sparc/include/asm/hypervisor.h           | 92 +++++++++----------
 arch/sparc/include/asm/irqflags_32.h          |  4 +-
 arch/sparc/include/asm/irqflags_64.h          |  4 +-
 arch/sparc/include/asm/jump_label.h           |  4 +-
 arch/sparc/include/asm/kdebug_32.h            |  4 +-
 arch/sparc/include/asm/leon.h                 |  8 +-
 arch/sparc/include/asm/leon_amba.h            |  6 +-
 arch/sparc/include/asm/mman.h                 |  4 +-
 arch/sparc/include/asm/mmu_64.h               |  4 +-
 arch/sparc/include/asm/mmu_context_32.h       |  4 +-
 arch/sparc/include/asm/mmu_context_64.h       |  4 +-
 arch/sparc/include/asm/mxcc.h                 |  4 +-
 arch/sparc/include/asm/obio.h                 |  4 +-
 arch/sparc/include/asm/openprom.h             |  4 +-
 arch/sparc/include/asm/page_32.h              |  8 +-
 arch/sparc/include/asm/page_64.h              |  8 +-
 arch/sparc/include/asm/pcic.h                 |  2 +-
 arch/sparc/include/asm/pgtable_32.h           |  4 +-
 arch/sparc/include/asm/pgtable_64.h           |  8 +-
 arch/sparc/include/asm/pgtsrmmu.h             |  6 +-
 arch/sparc/include/asm/processor_64.h         | 10 +-
 arch/sparc/include/asm/psr.h                  |  4 +-
 arch/sparc/include/asm/ptrace.h               | 12 +--
 arch/sparc/include/asm/ross.h                 |  4 +-
 arch/sparc/include/asm/sbi.h                  |  4 +-
 arch/sparc/include/asm/sigcontext.h           |  4 +-
 arch/sparc/include/asm/signal.h               |  6 +-
 arch/sparc/include/asm/smp_32.h               |  8 +-
 arch/sparc/include/asm/smp_64.h               |  8 +-
 arch/sparc/include/asm/spinlock_32.h          |  4 +-
 arch/sparc/include/asm/spinlock_64.h          |  4 +-
 arch/sparc/include/asm/spitfire.h             |  4 +-
 arch/sparc/include/asm/starfire.h             |  2 +-
 arch/sparc/include/asm/thread_info_32.h       |  4 +-
 arch/sparc/include/asm/thread_info_64.h       | 12 +--
 arch/sparc/include/asm/trap_block.h           |  4 +-
 arch/sparc/include/asm/traps.h                |  4 +-
 arch/sparc/include/asm/tsb.h                  |  2 +-
 arch/sparc/include/asm/ttable.h               |  2 +-
 arch/sparc/include/asm/turbosparc.h           |  4 +-
 arch/sparc/include/asm/upa.h                  |  4 +-
 arch/sparc/include/asm/vaddrs.h               |  2 +-
 arch/sparc/include/asm/viking.h               |  4 +-
 arch/sparc/include/asm/visasm.h               |  2 +-
 arch/sparc/include/uapi/asm/ptrace.h          | 24 ++---
 arch/sparc/include/uapi/asm/signal.h          |  4 +-
 arch/sparc/include/uapi/asm/traps.h           |  4 +-
 arch/sparc/include/uapi/asm/utrap.h           |  4 +-
 arch/um/include/asm/cpufeature.h              |  4 +-
 arch/um/include/asm/current.h                 |  4 +-
 arch/um/include/asm/page.h                    |  4 +-
 arch/um/include/asm/ptrace-generic.h          |  2 +-
 arch/um/include/asm/thread_info.h             |  2 +-
 arch/um/include/shared/as-layout.h            |  2 +-
 arch/x86/boot/Makefile                        |  2 +-
 arch/x86/boot/boot.h                          |  4 +-
 arch/x86/boot/compressed/Makefile             |  2 +-
 arch/x86/entry/vdso/extable.h                 |  2 +-
 arch/x86/include/asm/alternative.h            |  6 +-
 arch/x86/include/asm/asm.h                    | 10 +-
 arch/x86/include/asm/boot.h                   |  2 +-
 arch/x86/include/asm/cpufeature.h             |  4 +-
 arch/x86/include/asm/cpumask.h                |  4 +-
 arch/x86/include/asm/current.h                |  4 +-
 arch/x86/include/asm/desc_defs.h              |  4 +-
 arch/x86/include/asm/dwarf2.h                 |  2 +-
 arch/x86/include/asm/fixmap.h                 |  4 +-
 arch/x86/include/asm/frame.h                  | 10 +-
 arch/x86/include/asm/fred.h                   |  4 +-
 arch/x86/include/asm/fsgsbase.h               |  4 +-
 arch/x86/include/asm/ftrace.h                 |  8 +-
 arch/x86/include/asm/hw_irq.h                 |  4 +-
 arch/x86/include/asm/ibt.h                    | 12 +--
 arch/x86/include/asm/idtentry.h               |  6 +-
 arch/x86/include/asm/inst.h                   |  2 +-
 arch/x86/include/asm/irqflags.h               | 10 +-
 arch/x86/include/asm/jump_label.h             |  4 +-
 arch/x86/include/asm/kasan.h                  |  2 +-
 arch/x86/include/asm/kexec.h                  |  4 +-
 arch/x86/include/asm/linkage.h                |  6 +-
 arch/x86/include/asm/mem_encrypt.h            |  4 +-
 arch/x86/include/asm/msr.h                    |  4 +-
 arch/x86/include/asm/nops.h                   |  2 +-
 arch/x86/include/asm/nospec-branch.h          |  6 +-
 arch/x86/include/asm/orc_types.h              |  4 +-
 arch/x86/include/asm/page.h                   |  4 +-
 arch/x86/include/asm/page_32.h                |  4 +-
 arch/x86/include/asm/page_32_types.h          |  4 +-
 arch/x86/include/asm/page_64.h                |  4 +-
 arch/x86/include/asm/page_64_types.h          |  2 +-
 arch/x86/include/asm/page_types.h             |  4 +-
 arch/x86/include/asm/paravirt.h               | 14 +--
 arch/x86/include/asm/paravirt_types.h         |  4 +-
 arch/x86/include/asm/percpu.h                 |  6 +-
 arch/x86/include/asm/pgtable-2level_types.h   |  4 +-
 arch/x86/include/asm/pgtable-3level_types.h   |  4 +-
 arch/x86/include/asm/pgtable-invert.h         |  4 +-
 arch/x86/include/asm/pgtable.h                | 12 +--
 arch/x86/include/asm/pgtable_32.h             |  4 +-
 arch/x86/include/asm/pgtable_32_areas.h       |  2 +-
 arch/x86/include/asm/pgtable_64.h             |  6 +-
 arch/x86/include/asm/pgtable_64_types.h       |  4 +-
 arch/x86/include/asm/pgtable_types.h          | 10 +-
 arch/x86/include/asm/prom.h                   |  4 +-
 arch/x86/include/asm/pti.h                    |  4 +-
 arch/x86/include/asm/ptrace.h                 |  4 +-
 arch/x86/include/asm/purgatory.h              |  4 +-
 arch/x86/include/asm/pvclock-abi.h            |  4 +-
 arch/x86/include/asm/realmode.h               |  4 +-
 arch/x86/include/asm/segment.h                |  8 +-
 arch/x86/include/asm/setup.h                  |  6 +-
 arch/x86/include/asm/setup_data.h             |  4 +-
 arch/x86/include/asm/shared/tdx.h             |  4 +-
 arch/x86/include/asm/shstk.h                  |  4 +-
 arch/x86/include/asm/signal.h                 |  8 +-
 arch/x86/include/asm/smap.h                   |  6 +-
 arch/x86/include/asm/smp.h                    |  4 +-
 arch/x86/include/asm/tdx.h                    |  4 +-
 arch/x86/include/asm/thread_info.h            | 12 +--
 arch/x86/include/asm/unwind_hints.h           |  4 +-
 arch/x86/include/asm/vdso/getrandom.h         |  4 +-
 arch/x86/include/asm/vdso/gettimeofday.h      |  4 +-
 arch/x86/include/asm/vdso/processor.h         |  4 +-
 arch/x86/include/asm/vdso/vsyscall.h          |  4 +-
 arch/x86/include/asm/xen/interface.h          | 10 +-
 arch/x86/include/asm/xen/interface_32.h       |  4 +-
 arch/x86/include/asm/xen/interface_64.h       |  4 +-
 arch/x86/include/uapi/asm/bootparam.h         |  4 +-
 arch/x86/include/uapi/asm/e820.h              |  4 +-
 arch/x86/include/uapi/asm/ldt.h               |  4 +-
 arch/x86/include/uapi/asm/msr.h               |  4 +-
 arch/x86/include/uapi/asm/ptrace-abi.h        |  6 +-
 arch/x86/include/uapi/asm/ptrace.h            |  4 +-
 arch/x86/include/uapi/asm/setup_data.h        |  4 +-
 arch/x86/include/uapi/asm/signal.h            |  8 +-
 arch/x86/math-emu/control_w.h                 |  2 +-
 arch/x86/math-emu/exception.h                 |  6 +-
 arch/x86/math-emu/fpu_emu.h                   |  6 +-
 arch/x86/math-emu/status_w.h                  |  6 +-
 arch/x86/realmode/rm/Makefile                 |  2 +-
 arch/x86/realmode/rm/realmode.h               |  4 +-
 arch/x86/realmode/rm/wakeup.h                 |  2 +-
 arch/xtensa/include/asm/bootparam.h           |  2 +-
 arch/xtensa/include/asm/cmpxchg.h             |  4 +-
 arch/xtensa/include/asm/coprocessor.h         |  8 +-
 arch/xtensa/include/asm/current.h             |  2 +-
 arch/xtensa/include/asm/ftrace.h              |  8 +-
 arch/xtensa/include/asm/initialize_mmu.h      |  4 +-
 arch/xtensa/include/asm/jump_label.h          |  4 +-
 arch/xtensa/include/asm/kasan.h               |  2 +-
 arch/xtensa/include/asm/kmem_layout.h         |  2 +-
 arch/xtensa/include/asm/page.h                |  4 +-
 arch/xtensa/include/asm/pgtable.h             |  8 +-
 arch/xtensa/include/asm/processor.h           |  4 +-
 arch/xtensa/include/asm/ptrace.h              |  6 +-
 arch/xtensa/include/asm/signal.h              |  4 +-
 arch/xtensa/include/asm/thread_info.h         |  8 +-
 arch/xtensa/include/asm/tlbflush.h            |  4 +-
 arch/xtensa/include/uapi/asm/ptrace.h         |  2 +-
 arch/xtensa/include/uapi/asm/signal.h         |  6 +-
 arch/xtensa/include/uapi/asm/types.h          |  4 +-
 arch/xtensa/kernel/Makefile                   |  2 +-
 drivers/char/hw_random/n2rng.h                |  4 +-
 drivers/memory/emif.h                         |  4 +-
 drivers/net/wan/Makefile                      |  2 +-
 drivers/soc/bcm/brcmstb/pm/pm.h               |  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/fixmap.h                  |  4 +-
 include/asm-generic/getorder.h                |  4 +-
 include/asm-generic/int-ll64.h                |  6 +-
 include/asm-generic/kprobes.h                 |  4 +-
 include/asm-generic/memory_model.h            |  4 +-
 include/asm-generic/mmu.h                     |  2 +-
 include/asm-generic/pgtable-nop4d.h           |  4 +-
 include/asm-generic/pgtable-nopmd.h           |  4 +-
 include/asm-generic/pgtable-nopud.h           |  4 +-
 include/asm-generic/rwonce.h                  |  4 +-
 include/asm-generic/signal.h                  |  4 +-
 include/asm-generic/vdso/vsyscall.h           |  4 +-
 include/linux/amba/serial.h                   |  4 +-
 include/linux/arm-smccc.h                     |  4 +-
 include/linux/bitmap.h                        |  4 +-
 include/linux/bits.h                          |  4 +-
 include/linux/cfi_types.h                     |  4 +-
 include/linux/compiler.h                      |  4 +-
 include/linux/compiler_types.h                |  4 +-
 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/irqchip/arm-gic-v3.h            |  2 +-
 include/linux/irqchip/arm-gic.h               |  4 +-
 include/linux/jump_label.h                    | 10 +-
 include/linux/kexec.h                         |  2 +-
 include/linux/linkage.h                       |  6 +-
 include/linux/mem_encrypt.h                   |  4 +-
 include/linux/mmzone.h                        |  4 +-
 include/linux/objtool.h                       | 10 +-
 include/linux/objtool_types.h                 |  4 +-
 include/linux/of_fdt.h                        |  4 +-
 include/linux/pe.h                            |  4 +-
 include/linux/percpu-defs.h                   |  4 +-
 include/linux/pfn.h                           |  2 +-
 include/linux/pgtable.h                       |  4 +-
 include/linux/platform_data/emif_plat.h       |  4 +-
 include/linux/serial_s3c.h                    |  4 +-
 include/linux/ti-emif-sram.h                  |  2 +-
 include/linux/types.h                         |  4 +-
 include/soc/imx/cpu.h                         |  2 +-
 include/soc/tegra/flowctrl.h                  |  4 +-
 include/soc/tegra/fuse.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/sched.h                    |  2 +-
 include/uapi/linux/types.h                    |  4 +-
 include/vdso/datapage.h                       |  4 +-
 include/vdso/helpers.h                        |  4 +-
 include/vdso/processor.h                      |  4 +-
 include/vdso/vsyscall.h                       |  4 +-
 include/xen/arm/interface.h                   |  2 +-
 include/xen/interface/xen-mca.h               |  4 +-
 include/xen/interface/xen.h                   |  8 +-
 scripts/Makefile.build                        |  2 +-
 scripts/dtc/libfdt/fdt.h                      |  4 +-
 scripts/gfp-translate                         |  2 +-
 tools/arch/arm64/include/asm/cputype.h        |  4 +-
 tools/arch/arm64/include/asm/esr.h            |  4 +-
 tools/arch/arm64/include/asm/gpr-num.h        |  6 +-
 tools/arch/arm64/include/asm/sysreg.h         | 10 +-
 tools/arch/arm64/include/uapi/asm/kvm.h       |  2 +-
 tools/arch/loongarch/include/asm/orc_types.h  |  4 +-
 tools/arch/riscv/include/asm/csr.h            |  6 +-
 tools/arch/riscv/include/asm/vdso/processor.h |  4 +-
 tools/arch/x86/include/asm/asm.h              |  8 +-
 tools/arch/x86/include/asm/nops.h             |  2 +-
 tools/arch/x86/include/asm/orc_types.h        |  4 +-
 tools/arch/x86/include/asm/pvclock-abi.h      |  4 +-
 tools/include/asm-generic/barrier.h           |  4 +-
 tools/include/asm/alternative.h               |  2 +-
 tools/include/linux/bits.h                    |  4 +-
 tools/include/linux/compiler.h                |  4 +-
 tools/include/linux/objtool_types.h           |  4 +-
 tools/include/uapi/linux/const.h              |  4 +-
 .../trace/beauty/include/uapi/linux/sched.h   |  2 +-
 .../selftests/kvm/lib/riscv/handlers.S        |  4 -
 .../selftests/powerpc/include/instructions.h  |  2 +-
 .../selftests/vDSO/vgetrandom-chacha.S        |  2 -
 803 files changed, 1831 insertions(+), 1837 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/41 uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

---
 Documentation/dev-tools/checkuapi.rst              | 2 +-
 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/sched.h                         | 2 +-
 include/uapi/linux/types.h                         | 4 ++--
 tools/include/uapi/linux/const.h                   | 4 ++--
 tools/perf/trace/beauty/include/uapi/linux/sched.h | 2 +-
 13 files changed, 22 insertions(+), 22 deletions(-)
Documentation/dev-tools/checkuapi.rst +1 -1
index 9072f21b50b0c..3c9a3a58c24da 100644
@@ -273,7 +273,7 @@ Consider this change::
     -typedef unsigned __bitwise __poll_t;
     +typedef unsigned short __bitwise __poll_t;
 
-     #endif /*  __ASSEMBLY__ */
+     #endif /*  __ASSEMBLER__ */
      #endif /* _UAPI_LINUX_TYPES_H */
     EOF
 
include/uapi/asm-generic/int-l64.h +2 -2
index ed8bcd99c34d7..f840806bbe7e9 100644
@@ -11,7 +11,7 @@
 
 #include <asm/bitsperlong.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
@@ -29,7 +29,7 @@ typedef unsigned int __u32;
 typedef __signed__ long __s64;
 typedef unsigned long __u64;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _UAPI_ASM_GENERIC_INT_L64_H */
include/uapi/asm-generic/int-ll64.h +2 -2
index 1ed06964257c3..4fc3e882bcff9 100644
@@ -11,7 +11,7 @@
 
 #include <asm/bitsperlong.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
@@ -34,7 +34,7 @@ typedef __signed__ long long __s64;
 typedef unsigned long long __u64;
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _UAPI_ASM_GENERIC_INT_LL64_H */
include/uapi/asm-generic/signal-defs.h +1 -1
index 7572f2f46ee89..4073143fa3dae 100644
@@ -78,7 +78,7 @@
 #define SIG_SETMASK        2	/* for setting the signal mask */
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef void __signalfn_t(int);
 typedef __signalfn_t __user *__sighandler_t;
 
include/uapi/asm-generic/signal.h +2 -2
index 0eb69dc8e5722..6b089d4b2965b 100644
@@ -57,7 +57,7 @@
 #define SIGSTKSZ	8192
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef struct {
 	unsigned long sig[_NSIG_WORDS];
 } sigset_t;
@@ -88,6 +88,6 @@ typedef struct sigaltstack {
 	__kernel_size_t ss_size;
 } stack_t;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI__ASM_GENERIC_SIGNAL_H */
include/uapi/linux/a.out.h +2 -2
index 5fafde3798e57..cbcc37674e64c 100644
@@ -10,7 +10,7 @@
 
 #endif /* __STRUCT_EXEC_OVERRIDE__ */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* these go in the N_MACHTYPE field */
 enum machine_type {
@@ -247,5 +247,5 @@ struct relocation_info
 };
 #endif /* no N_RELOCATION_INFO_DECLARED.  */
 
-#endif /*__ASSEMBLY__ */
+#endif /*__ASSEMBLER__ */
 #endif /* _UAPI__A_OUT_GNU_H__ */
include/uapi/linux/const.h +2 -2
index e16be0d37746e..8189610216211 100644
@@ -13,7 +13,7 @@
  * leave it unchanged in asm.
  */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _AC(X,Y)	X
 #define _AT(T,X)	X
 #else
@@ -28,7 +28,7 @@
 #define _BITUL(x)	(_UL(1) << (x))
 #define _BITULL(x)	(_ULL(1) << (x))
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 /*
  * Missing asm support
  *
include/uapi/linux/edd.h +2 -2
index 0fe3e02aec653..566f206964862 100644
@@ -53,7 +53,7 @@
 #define EDD_MBR_SIG_NR_BUF 0x1ea  /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF
 				     in boot_params - treat this as 1 byte  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define EDD_EXT_FIXED_DISK_ACCESS           (1 << 0)
 #define EDD_EXT_DEVICE_LOCKING_AND_EJECTING (1 << 1)
@@ -187,6 +187,6 @@ struct edd {
 	unsigned char edd_info_nr;
 };
 
-#endif				/*!__ASSEMBLY__ */
+#endif				/*!__ASSEMBLER__ */
 
 #endif /* _UAPI_LINUX_EDD_H */
include/uapi/linux/hdlc/ioctl.h +2 -2
index b06341acab5ec..0905383d72aa5 100644
@@ -35,7 +35,7 @@
 #define LMI_CCITT		3 /* ITU-T Annex A */
 #define LMI_CISCO		4 /* The "original" LMI, aka Gang of Four */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef struct {
 	unsigned int clock_rate; /* bits per second */
@@ -90,5 +90,5 @@ typedef struct {
 
 /* PPP doesn't need any info now - supply length = 0 to ioctl */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __HDLC_IOCTL_H__ */
include/uapi/linux/sched.h +1 -1
index 359a14cc76a40..30f0c11959011 100644
@@ -43,7 +43,7 @@
  */
 #define CLONE_NEWTIME	0x00000080	/* New time namespace */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct clone_args - arguments for the clone3 syscall
  * @flags:        Flags for the new process as listed above.
include/uapi/linux/types.h +2 -2
index 48b933938877d..00743f894e7e3 100644
@@ -4,7 +4,7 @@
 
 #include <asm/types.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifndef	__KERNEL__
 #ifndef __EXPORTED_HEADERS__
 #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
@@ -59,5 +59,5 @@ typedef __u32 __bitwise __wsum;
 
 typedef unsigned __bitwise __poll_t;
 
-#endif /*  __ASSEMBLY__ */
+#endif /*  __ASSEMBLER__ */
 #endif /* _UAPI_LINUX_TYPES_H */
tools/include/uapi/linux/const.h +2 -2
index e16be0d37746e..8189610216211 100644
@@ -13,7 +13,7 @@
  * leave it unchanged in asm.
  */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _AC(X,Y)	X
 #define _AT(T,X)	X
 #else
@@ -28,7 +28,7 @@
 #define _BITUL(x)	(_UL(1) << (x))
 #define _BITULL(x)	(_ULL(1) << (x))
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 /*
  * Missing asm support
  *
tools/perf/trace/beauty/include/uapi/linux/sched.h +1 -1
index 359a14cc76a40..30f0c11959011 100644
@@ -43,7 +43,7 @@
  */
 #define CLONE_NEWTIME	0x00000080	/* New time namespace */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct clone_args - arguments for the clone3 syscall
  * @flags:        Flags for the new process as listed above.
Signature · 1 line
2.48.1
#2 lore raw

PATCH 2/41 include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement), except for some manual tweaking in the files include/linux/irqchip/arm-gic.h and include/soc/tegra/flowctrl.h (which got the macro wrong in a comment).

---
 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/fixmap.h            |  4 ++--
 include/asm-generic/getorder.h          |  4 ++--
 include/asm-generic/int-ll64.h          |  6 +++---
 include/asm-generic/kprobes.h           |  4 ++--
 include/asm-generic/memory_model.h      |  4 ++--
 include/asm-generic/mmu.h               |  2 +-
 include/asm-generic/pgtable-nop4d.h     |  4 ++--
 include/asm-generic/pgtable-nopmd.h     |  4 ++--
 include/asm-generic/pgtable-nopud.h     |  4 ++--
 include/asm-generic/rwonce.h            |  4 ++--
 include/asm-generic/signal.h            |  4 ++--
 include/asm-generic/vdso/vsyscall.h     |  4 ++--
 include/linux/amba/serial.h             |  4 ++--
 include/linux/arm-smccc.h               |  4 ++--
 include/linux/bitmap.h                  |  4 ++--
 include/linux/bits.h                    |  4 ++--
 include/linux/cfi_types.h               |  4 ++--
 include/linux/compiler.h                |  4 ++--
 include/linux/compiler_types.h          |  4 ++--
 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/irqchip/arm-gic-v3.h      |  2 +-
 include/linux/irqchip/arm-gic.h         |  4 ++--
 include/linux/jump_label.h              | 10 +++++-----
 include/linux/kexec.h                   |  2 +-
 include/linux/linkage.h                 |  6 +++---
 include/linux/mem_encrypt.h             |  4 ++--
 include/linux/mmzone.h                  |  4 ++--
 include/linux/objtool.h                 | 10 +++++-----
 include/linux/objtool_types.h           |  4 ++--
 include/linux/of_fdt.h                  |  4 ++--
 include/linux/pe.h                      |  4 ++--
 include/linux/percpu-defs.h             |  4 ++--
 include/linux/pfn.h                     |  2 +-
 include/linux/pgtable.h                 |  4 ++--
 include/linux/platform_data/emif_plat.h |  4 ++--
 include/linux/serial_s3c.h              |  4 ++--
 include/linux/ti-emif-sram.h            |  2 +-
 include/linux/types.h                   |  4 ++--
 include/soc/imx/cpu.h                   |  2 +-
 include/soc/tegra/flowctrl.h            |  4 ++--
 include/soc/tegra/fuse.h                |  4 ++--
 include/vdso/datapage.h                 |  4 ++--
 include/vdso/helpers.h                  |  4 ++--
 include/vdso/processor.h                |  4 ++--
 include/vdso/vsyscall.h                 |  4 ++--
 include/xen/arm/interface.h             |  2 +-
 include/xen/interface/xen-mca.h         |  4 ++--
 include/xen/interface/xen.h             |  8 ++++----
 tools/include/asm-generic/barrier.h     |  4 ++--
 tools/include/asm/alternative.h         |  2 +-
 tools/include/linux/bits.h              |  4 ++--
 tools/include/linux/compiler.h          |  4 ++--
 tools/include/linux/objtool_types.h     |  4 ++--
 61 files changed, 121 insertions(+), 121 deletions(-)
include/asm-generic/barrier.h +2 -2
index d4f581c1e21da..e8038f7084a87 100644
@@ -11,7 +11,7 @@
 #ifndef __ASM_GENERIC_BARRIER_H
 #define __ASM_GENERIC_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/kcsan-checks.h>
@@ -302,5 +302,5 @@ do {									\
 # define smp_mb__after_switch_mm()	smp_mb()
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ASM_GENERIC_BARRIER_H */
include/asm-generic/bug.h +2 -2
index 387720933973b..e4577f449f066 100644
@@ -17,7 +17,7 @@
 #define BUG_GET_TAINT(bug)	((bug)->flags >> 8)
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/panic.h>
 #include <linux/printk.h>
 
@@ -224,6 +224,6 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
 # define WARN_ON_SMP(x)			({0;})
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
include/asm-generic/current.h +1 -1
index 9c2aeecbd05a6..8e7d8f019377f 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_GENERIC_CURRENT_H
 #define __ASM_GENERIC_CURRENT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/thread_info.h>
 
 #define get_current() (current_thread_info()->task)
include/asm-generic/error-injection.h +1 -1
index b05253f68eaa5..0a9ec33fa8f20 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_GENERIC_ERROR_INJECTION_H
 #define _ASM_GENERIC_ERROR_INJECTION_H
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#if defined(__KERNEL__) && !defined(__ASSEMBLER__)
 enum {
 	EI_ETYPE_NULL,		/* Return NULL if failure */
 	EI_ETYPE_ERRNO,		/* Return -ERRNO if failure */
include/asm-generic/fixmap.h +2 -2
index 29cab7947980a..3ff832ebcea50 100644
@@ -21,7 +21,7 @@
 #define __fix_to_virt(x)	(FIXADDR_TOP - ((x) << PAGE_SHIFT))
 #define __virt_to_fix(x)	((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * 'index to address' translation. If anyone tries to use the idx
  * directly without translation, we catch the bug with a NULL-deference
@@ -97,5 +97,5 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
 #define set_fixmap_io(idx, phys) \
 	__set_fixmap(idx, phys, FIXMAP_PAGE_IO)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_GENERIC_FIXMAP_H */
include/asm-generic/getorder.h +2 -2
index f2979e3a96b60..875ccae196832 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_GENERIC_GETORDER_H
 #define __ASM_GENERIC_GETORDER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/log2.h>
@@ -47,6 +47,6 @@ static __always_inline __attribute_const__ int get_order(unsigned long size)
 #endif
 }
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* __ASM_GENERIC_GETORDER_H */
include/asm-generic/int-ll64.h +3 -3
index a248545f1e18c..58974e8abbfae 100644
@@ -11,7 +11,7 @@
 #include <uapi/asm-generic/int-ll64.h>
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef __s8  s8;
 typedef __u8  u8;
@@ -31,7 +31,7 @@ typedef __u64 u64;
 #define S64_C(x) x ## LL
 #define U64_C(x) x ## ULL
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #define S8_C(x)  x
 #define U8_C(x)  x
@@ -42,6 +42,6 @@ typedef __u64 u64;
 #define S64_C(x) x
 #define U64_C(x) x
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_GENERIC_INT_LL64_H */
include/asm-generic/kprobes.h +2 -2
index 060eab094e5a2..7161a90d0aa6e 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_GENERIC_KPROBES_H
 #define _ASM_GENERIC_KPROBES_H
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#if defined(__KERNEL__) && !defined(__ASSEMBLER__)
 #ifdef CONFIG_KPROBES
 /*
  * Blacklist ganerating macro. Specify functions which is not probed
@@ -21,6 +21,6 @@ static unsigned long __used					\
 # define __kprobes
 # define nokprobe_inline	inline
 #endif
-#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
+#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */
 
 #endif /* _ASM_GENERIC_KPROBES_H */
include/asm-generic/memory_model.h +2 -2
index 6d1fb6162ac1a..ea3491575438b 100644
@@ -4,7 +4,7 @@
 
 #include <linux/pfn.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * supports 3 memory models.
@@ -77,6 +77,6 @@ static inline int pfn_valid(unsigned long pfn)
 #endif /* CONFIG_DEBUG_VIRTUAL */
 #define phys_to_page(phys)	pfn_to_page(PHYS_PFN(phys))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
include/asm-generic/mmu.h +1 -1
index 0618380375429..5f78971e3ac2c 100644
@@ -6,7 +6,7 @@
  * This is the mmu.h header for nommu implementations.
  * Architectures with an MMU need something more complex.
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef struct {
 	unsigned long		end_brk;
 
include/asm-generic/pgtable-nop4d.h +2 -2
index 03b7dae47dd43..89c21f84cffbe 100644
@@ -2,7 +2,7 @@
 #ifndef _PGTABLE_NOP4D_H
 #define _PGTABLE_NOP4D_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define __PAGETABLE_P4D_FOLDED 1
 
@@ -54,5 +54,5 @@ static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
 #undef  p4d_addr_end
 #define p4d_addr_end(addr, end)			(end)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _PGTABLE_NOP4D_H */
include/asm-generic/pgtable-nopmd.h +2 -2
index 8ffd64e7a24cb..36b6490ed1808 100644
@@ -2,7 +2,7 @@
 #ifndef _PGTABLE_NOPMD_H
 #define _PGTABLE_NOPMD_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm-generic/pgtable-nopud.h>
 
@@ -68,6 +68,6 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
 #undef  pmd_addr_end
 #define pmd_addr_end(addr, end)			(end)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _PGTABLE_NOPMD_H */
include/asm-generic/pgtable-nopud.h +2 -2
index eb70c6d7ceff2..356cbfbaab247 100644
@@ -2,7 +2,7 @@
 #ifndef _PGTABLE_NOPUD_H
 #define _PGTABLE_NOPUD_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm-generic/pgtable-nop4d.h>
 
@@ -62,5 +62,5 @@ static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
 #undef  pud_addr_end
 #define pud_addr_end(addr, end)			(end)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _PGTABLE_NOPUD_H */
include/asm-generic/rwonce.h +2 -2
index 8d0a6280e9824..e974843da4799 100644
@@ -20,7 +20,7 @@
 #ifndef __ASM_GENERIC_RWONCE_H
 #define __ASM_GENERIC_RWONCE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler_types.h>
 #include <linux/kasan-checks.h>
@@ -86,5 +86,5 @@ unsigned long read_word_at_a_time(const void *addr)
 	return *(unsigned long *)addr;
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif	/* __ASM_GENERIC_RWONCE_H */
include/asm-generic/signal.h +2 -2
index 663dd6d0795dc..392e59fd3d8b9 100644
@@ -4,10 +4,10 @@
 
 #include <uapi/asm-generic/signal.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/sigcontext.h>
 #undef __HAVE_ARCH_SIG_BITOPS
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _ASM_GENERIC_SIGNAL_H */
include/asm-generic/vdso/vsyscall.h +2 -2
index 01dafd604188f..b11e2ef0c41de 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_GENERIC_VSYSCALL_H
 #define __ASM_GENERIC_VSYSCALL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifndef __arch_get_k_vdso_data
 static __always_inline struct vdso_data *__arch_get_k_vdso_data(void)
@@ -23,6 +23,6 @@ static __always_inline void __arch_sync_vdso_data(struct vdso_data *vdata)
 }
 #endif /* __arch_sync_vdso_data */
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_GENERIC_VSYSCALL_H */
include/linux/amba/serial.h +2 -2
index 9120de05ead08..b9129c0d6304f 100644
@@ -10,7 +10,7 @@
 #ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H
 #define ASM_ARM_HARDWARE_SERIAL_AMBA_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/bitfield.h>
 #include <linux/bits.h>
 #endif
@@ -215,7 +215,7 @@
 #define UART01x_RSR_ANY		(UART01x_RSR_OE | UART01x_RSR_BE | UART01x_RSR_PE | UART01x_RSR_FE)
 #define UART01x_FR_MODEM_ANY	(UART01x_FR_DCD | UART01x_FR_DSR | UART01x_FR_CTS)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct amba_device; /* in uncompress this is included but amba/bus.h is not */
 struct amba_pl010_data {
 	void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl);
include/linux/arm-smccc.h +2 -2
index 67f6fdf2e7cd8..2037ee0b38c5c 100644
@@ -282,7 +282,7 @@
 #define SMCCC_RET_NOT_REQUIRED			-2
 #define SMCCC_RET_INVALID_PARAMETER		-3
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/linkage.h>
 #include <linux/types.h>
@@ -639,5 +639,5 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
 		method;							\
 	})
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 #endif /*__LINUX_ARM_SMCCC_H*/
include/linux/bitmap.h +2 -2
index 2026953e2c4ed..6aec78be523ee 100644
@@ -2,7 +2,7 @@
 #ifndef __LINUX_BITMAP_H
 #define __LINUX_BITMAP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/align.h>
 #include <linux/bitops.h>
@@ -829,6 +829,6 @@ void bitmap_write(unsigned long *map, unsigned long value,
 #define bitmap_set_value8(map, value, start)		\
 	bitmap_write(map, value, start, BITS_PER_BYTE)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __LINUX_BITMAP_H */
include/linux/bits.h +2 -2
index 61a75d3f294bf..a441f6db6814e 100644
@@ -18,7 +18,7 @@
  * position @h. For example
  * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
  */
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 #include <linux/build_bug.h>
 #include <linux/compiler.h>
 #define GENMASK_INPUT_CHECK(h, l) BUILD_BUG_ON_ZERO(const_true((l) > (h)))
@@ -35,7 +35,7 @@
 #define GENMASK_ULL(h, l) \
 	(GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 /*
  * Missing asm support
  *
include/linux/cfi_types.h +2 -2
index 6b87136757655..7de4100cea531 100644
@@ -5,7 +5,7 @@
 #ifndef _LINUX_CFI_TYPES_H
 #define _LINUX_CFI_TYPES_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #include <linux/linkage.h>
 
 #ifdef CONFIG_CFI_CLANG
@@ -41,5 +41,5 @@
 	SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _LINUX_CFI_TYPES_H */
include/linux/compiler.h +2 -2
index 1553857548241..59a47996b1427 100644
@@ -4,7 +4,7 @@
 
 #include <linux/compiler_types.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef __KERNEL__
 
@@ -221,7 +221,7 @@ static inline void *offset_to_ptr(const int *off)
 	return (void *)((unsigned long)off + *off);
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #ifdef CONFIG_64BIT
 #define ARCH_SEL(a,b) a
include/linux/compiler_types.h +2 -2
index 981cc3d7e3aa5..77635cd464567 100644
@@ -11,7 +11,7 @@
 #define __has_builtin(x) (0)
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Skipped when running bindgen due to a libclang issue;
@@ -388,7 +388,7 @@ struct ftrace_likely_data {
 
 #endif /* __KERNEL__ */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * The below symbols may be defined for one or more, but not ALL, of the above
include/linux/edd.h +2 -2
index 1c16fbcb81c06..32517f283f044 100644
@@ -23,7 +23,7 @@
 
 #include <uapi/linux/edd.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern struct edd edd;
-#endif				/*!__ASSEMBLY__ */
+#endif				/*!__ASSEMBLER__ */
 #endif				/* _LINUX_EDD_H */
include/linux/err.h +1 -1
index a4dacd745fcf4..4e822e7a86c98 100644
@@ -17,7 +17,7 @@
  */
 #define MAX_ERRNO	4095
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /**
  * IS_ERR_VALUE - Detect an error pointer.
include/linux/export.h +1 -1
index a8c23d945634b..a812e40b7bcdd 100644
@@ -45,7 +45,7 @@
 
 #define __EXPORT_SYMBOL(sym, license, ns)	__GENKSYMS_EXPORT_SYMBOL(sym)
 
-#elif defined(__ASSEMBLY__)
+#elif defined(__ASSEMBLER__)
 
 #define __EXPORT_SYMBOL(sym, license, ns) \
 	___EXPORT_SYMBOL(sym, license, ns)
include/linux/init.h +3 -3
index ee1309473bc62..b53e99b008a60 100644
@@ -108,7 +108,7 @@
 #define __REFDATA        .section       ".ref.data", "aw"
 #define __REFCONST       .section       ".ref.rodata", "a"
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Used for initialization calls..
  */
@@ -186,7 +186,7 @@ extern struct module __this_module;
   
 #ifndef MODULE
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * initcalls are now grouped by functionality into separate
@@ -380,7 +380,7 @@ extern const struct obs_kernel_param __setup_start[], __setup_end[];
 /* Relies on boot_command_line being set */
 void __init parse_early_param(void);
 void __init parse_early_options(char *cmdline);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #else /* MODULE */
 
include/linux/ioport.h +2 -2
index 5385349f0b8a6..8ab54f4c47cec 100644
@@ -9,7 +9,7 @@
 #ifndef _LINUX_IOPORT_H
 #define _LINUX_IOPORT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/bits.h>
 #include <linux/compiler.h>
 #include <linux/minmax.h>
@@ -421,5 +421,5 @@ static inline void irqresource_disabled(struct resource *res, u32 irq)
 
 extern struct address_space *iomem_get_mapping(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif	/* _LINUX_IOPORT_H */
include/linux/irqchip/arm-gic-v3.h +1 -1
index 70c0948f978eb..9628465516abc 100644
@@ -603,7 +603,7 @@
 
 #include <asm/arch_gicv3.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * We need a value to serve as a irq-type for LPIs. Choose one that will
include/linux/irqchip/arm-gic.h +2 -2
index 2223f95079ce8..4c36c60791e5f 100644
@@ -125,7 +125,7 @@
 #define GICV_PMR_PRIORITY_SHIFT		3
 #define GICV_PMR_PRIORITY_MASK		(0x1f << GICV_PMR_PRIORITY_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/irqdomain.h>
 
@@ -156,5 +156,5 @@ int gic_get_cpu_id(unsigned int cpu);
 void gic_migrate_target(unsigned int new_cpu_id);
 unsigned long gic_get_sgir_physaddr(void);
 
-#endif /* __ASSEMBLY */
+#endif /* __ASSEMBLER__ */
 #endif
include/linux/jump_label.h +5 -5
index fdb79dd1ebd8c..b4bb7854963c3 100644
@@ -71,7 +71,7 @@
  * Additional babbling in: Documentation/staging/static-keys.rst
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/compiler.h>
@@ -107,12 +107,12 @@ struct static_key {
 #endif	/* CONFIG_JUMP_LABEL */
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #ifdef CONFIG_JUMP_LABEL
 #include <asm/jump_label.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE
 
 struct jump_entry {
@@ -187,7 +187,7 @@ static inline int jump_entry_size(struct jump_entry *entry)
 #endif
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 enum jump_label_type {
 	JUMP_LABEL_NOP = 0,
@@ -538,6 +538,6 @@ extern bool ____wrong_branch_error(void);
 #define static_branch_enable_cpuslocked(x)	static_key_enable_cpuslocked(&(x)->key)
 #define static_branch_disable_cpuslocked(x)	static_key_disable_cpuslocked(&(x)->key)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif	/* _LINUX_JUMP_LABEL_H */
include/linux/kexec.h +1 -1
index f0e9f8eda7a3c..5cdd8c60ab188 100644
@@ -13,7 +13,7 @@
 #define IND_SOURCE       (1 << IND_SOURCE_BIT)
 #define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE)
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 
 #include <linux/vmcore_info.h>
 #include <linux/crash_reserve.h>
include/linux/linkage.h +3 -3
index 5c8865bb59d91..a0d3561b88393 100644
@@ -62,7 +62,7 @@
  * end up needing stack temporaries for).
  */
 /* Assembly files may be compiled with -traditional .. */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifndef asmlinkage_protect
 # define asmlinkage_protect(n, ret, args...)	do { } while (0)
 #endif
@@ -73,7 +73,7 @@
 #define __ALIGN_STR		__stringify(__ALIGN)
 #endif
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 /* SYM_T_FUNC -- type used by assembler to mark functions */
 #ifndef SYM_T_FUNC
@@ -355,6 +355,6 @@
 	SYM_DATA_END(name)
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _LINUX_LINKAGE_H */
include/linux/mem_encrypt.h +2 -2
index ae45263892611..9fc35962366b9 100644
@@ -10,7 +10,7 @@
 #ifndef __MEM_ENCRYPT_H__
 #define __MEM_ENCRYPT_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_ARCH_HAS_MEM_ENCRYPT
 
@@ -31,6 +31,6 @@
 #define __sme_clr(x)		(x)
 #endif
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* __MEM_ENCRYPT_H__ */
include/linux/mmzone.h +2 -2
index 9540b41894da6..a135cfbd6dffa 100644
@@ -2,7 +2,7 @@
 #ifndef _LINUX_MMZONE_H
 #define _LINUX_MMZONE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifndef __GENERATING_BOUNDS_H
 
 #include <linux/spinlock.h>
@@ -2121,5 +2121,5 @@ void sparse_init(void);
 #endif /* CONFIG_SPARSEMEM */
 
 #endif /* !__GENERATING_BOUNDS.H */
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* _LINUX_MMZONE_H */
include/linux/objtool.h +5 -5
index c722a921165ba..a45af87550326 100644
@@ -8,7 +8,7 @@
 
 #include <asm/asm.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define UNWIND_HINT(type, sp_reg, sp_offset, signal)	\
 	"987: \n\t"						\
@@ -63,7 +63,7 @@
 	"911:\n\t"						\
 	__ASM_ANNOTATE(911b, type)
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 /*
  * In asm, there are two kinds of code: normal C-type callable functions and
@@ -119,11 +119,11 @@
 	.popsection
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #else /* !CONFIG_OBJTOOL */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define UNWIND_HINT(type, sp_reg, sp_offset, signal) "\n\t"
 #define STACK_FRAME_NON_STANDARD(func)
@@ -141,7 +141,7 @@
 
 #endif /* CONFIG_OBJTOOL */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Annotate away the various 'relocation to !ENDBR` complaints; knowing that
  * these relocations will never be used for indirect calls.
include/linux/objtool_types.h +2 -2
index df5d9fa84dba3..3d7cbb4360d8e 100644
@@ -2,7 +2,7 @@
 #ifndef _LINUX_OBJTOOL_TYPES_H
 #define _LINUX_OBJTOOL_TYPES_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -18,7 +18,7 @@ struct unwind_hint {
 	u8		signal;
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * UNWIND_HINT_TYPE_UNDEFINED: A blind spot in ORC coverage which can result in
include/linux/of_fdt.h +2 -2
index b8d6c0c208760..59390fcd3c852 100644
@@ -16,7 +16,7 @@
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if defined(CONFIG_OF_FLATTREE)
 
@@ -94,5 +94,5 @@ static inline void unflatten_device_tree(void) {}
 static inline void unflatten_and_copy_device_tree(void) {}
 #endif /* CONFIG_OF_EARLY_FLATTREE */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _LINUX_OF_FDT_H */
include/linux/pe.h +2 -2
index fdf9c95709ba0..60864685dd5b3 100644
@@ -171,7 +171,7 @@
 #define IMAGE_DEBUG_TYPE_CODEVIEW	2
 #define IMAGE_DEBUG_TYPE_EX_DLLCHARACTERISTICS	20
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mz_hdr {
 	uint16_t magic;		/* MZ_MAGIC */
@@ -477,6 +477,6 @@ struct win_certificate {
 	uint16_t cert_type;
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __LINUX_PE_H */
include/linux/percpu-defs.h +2 -2
index 5b520fe86b609..cddac58ab18c2 100644
@@ -201,7 +201,7 @@
 /*
  * Accessors and operations.
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * __verify_pcpu_ptr() verifies @ptr is a percpu pointer without evaluating
@@ -512,5 +512,5 @@ do {									\
 #define this_cpu_inc_return(pcp)	this_cpu_add_return(pcp, 1)
 #define this_cpu_dec_return(pcp)	this_cpu_add_return(pcp, -1)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _LINUX_PERCPU_DEFS_H */
include/linux/pfn.h +1 -1
index 14bc053c53d8a..5dff19d30734c 100644
@@ -2,7 +2,7 @@
 #ifndef _LINUX_PFN_H_
 #define _LINUX_PFN_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 
 /*
include/linux/pgtable.h +2 -2
index 94d267d02372e..af998b2bddb1a 100644
@@ -8,7 +8,7 @@
 #define PMD_ORDER	(PMD_SHIFT - PAGE_SHIFT)
 #define PUD_ORDER	(PUD_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_MMU
 
 #include <linux/mm_types.h>
@@ -1809,7 +1809,7 @@ static inline bool arch_has_pfn_modify_check(void)
 /* Page-Table Modification Mask */
 typedef unsigned int pgtbl_mod_mask;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #if !defined(MAX_POSSIBLE_PHYSMEM_BITS) && !defined(CONFIG_64BIT)
 #ifdef CONFIG_PHYS_ADDR_T_64BIT
include/linux/platform_data/emif_plat.h +2 -2
index b93feef5d586f..ad7f706c124e3 100644
@@ -39,7 +39,7 @@
 #define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL	0x00000002
 #define EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART		0x00000004
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct ddr_device_info - All information about the DDR device except AC
  *		timing parameters
@@ -121,6 +121,6 @@ struct emif_platform_data {
 	u32 ip_rev;
 	u32 phy_type;
 };
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __LINUX_EMIF_H */
include/linux/serial_s3c.h +2 -2
index 102aa33d956c4..f54cb6e23f85e 100644
@@ -269,7 +269,7 @@
 #define APPLE_S5L_UTRSTAT_RXTO		BIT(9)
 #define APPLE_S5L_UTRSTAT_ALL_FLAGS	GENMASK(9, 3)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/serial_core.h>
 
@@ -294,7 +294,7 @@ struct s3c2410_uartcfg {
 	unsigned long	   ufcon;	 /* value of ufcon for port */
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ARM_REGS_SERIAL_H */
 
include/linux/ti-emif-sram.h +1 -1
index 441b2988e66a5..b256a9b4ef053 100644
@@ -10,7 +10,7 @@
 
 #include <linux/kbuild.h>
 #include <linux/types.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct emif_regs_amx3 {
 	u32 emif_sdcfg_val;
include/linux/types.h +2 -2
index 1c509ce8f7f61..b69e4cdd59b88 100644
@@ -5,7 +5,7 @@
 #define __EXPORTED_HEADERS__
 #include <uapi/linux/types.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define DECLARE_BITMAP(name,bits) \
 	unsigned long name[BITS_TO_LONGS(bits)]
@@ -248,5 +248,5 @@ typedef void (*swap_func_t)(void *a, void *b, int size);
 typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
 typedef int (*cmp_func_t)(const void *a, const void *b);
 
-#endif /*  __ASSEMBLY__ */
+#endif /*  __ASSEMBLER__ */
 #endif /* _LINUX_TYPES_H */
include/soc/imx/cpu.h +1 -1
index 0bf610acafd06..8c53150acd76e 100644
@@ -30,7 +30,7 @@
 #define MXC_CPU_VF600		0x600
 #define MXC_CPU_VF610		(MXC_CPU_VF600 | MXC_CPU_VFx10)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned int __mxc_cpu_type;
 #endif
 
include/soc/tegra/flowctrl.h +2 -2
index 1aacc5c7a9dba..2a60bd4934c32 100644
@@ -39,7 +39,7 @@
 #define TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP	(0xF << 4)
 #define TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP	(0xF << 8)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_SOC_TEGRA_FLOWCTRL
 u32 flowctrl_read_cpu_csr(unsigned int cpuid);
 void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value);
@@ -67,5 +67,5 @@ static inline void flowctrl_cpu_suspend_exit(unsigned int cpuid)
 {
 }
 #endif /* CONFIG_SOC_TEGRA_FLOWCTRL */
-#endif /* __ASSEMBLY */
+#endif /* __ASSEMBLER__ */
 #endif /* __SOC_TEGRA_FLOWCTRL_H__ */
include/soc/tegra/fuse.h +2 -2
index 8f421b9f7585c..c4f7a1b97c547 100644
@@ -24,7 +24,7 @@
 #define TEGRA30_FUSE_SATA_CALIB	0x124
 #define TEGRA_FUSE_USB_CALIB_EXT_0 0x250
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 enum tegra_revision {
 	TEGRA_REVISION_UNKNOWN = 0,
@@ -122,6 +122,6 @@ static inline int tegra194_miscreg_mask_serror(void)
 
 struct device *tegra_soc_device_register(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __SOC_TEGRA_FUSE_H__ */
include/vdso/datapage.h +2 -2
index d967baa0cd0c6..08e246c89ac88 100644
@@ -2,7 +2,7 @@
 #ifndef __VDSO_DATAPAGE_H
 #define __VDSO_DATAPAGE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <uapi/linux/time.h>
@@ -164,6 +164,6 @@ union vdso_data_store {
 #include <asm/vdso/gettimeofday.h>
 #endif /* ENABLE_COMPAT_VDSO */
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __VDSO_DATAPAGE_H */
include/vdso/helpers.h +2 -2
index 3ddb03bb05cbe..c879ab4ca4bd1 100644
@@ -2,7 +2,7 @@
 #ifndef __VDSO_HELPERS_H
 #define __VDSO_HELPERS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/barrier.h>
 #include <vdso/datapage.h>
@@ -52,6 +52,6 @@ static __always_inline void vdso_write_end(struct vdso_data *vd)
 	WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __VDSO_HELPERS_H */
include/vdso/processor.h +2 -2
index fbe8265ea3c49..cc781912a696e 100644
@@ -5,10 +5,10 @@
 #ifndef __VDSO_PROCESSOR_H
 #define __VDSO_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/vdso/processor.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __VDSO_PROCESSOR_H */
include/vdso/vsyscall.h +2 -2
index b0fdc9c6bf439..c5c2a2c078571 100644
@@ -2,13 +2,13 @@
 #ifndef __VDSO_VSYSCALL_H
 #define __VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/vdso/vsyscall.h>
 
 unsigned long vdso_update_begin(void);
 void vdso_update_end(unsigned long flags);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __VDSO_VSYSCALL_H */
include/xen/arm/interface.h +1 -1
index c3eada2642aa9..61360b89da405 100644
@@ -30,7 +30,7 @@
 
 #define __HYPERVISOR_platform_op_raw __HYPERVISOR_platform_op
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /* Explicitly size integers that represent pfns in the interface with
  * Xen so that we can have one ABI that works for 32 and 64 bit guests.
  * Note that this means that the xen_pfn_t type may be capable of
include/xen/interface/xen-mca.h +2 -2
index 464aa6b3a5f92..59d31660aec43 100644
@@ -50,7 +50,7 @@
 /* OUT: There was no machine check data to fetch. */
 #define XEN_MC_NODATA		0x2
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /* vIRQ injected to Dom0 */
 #define VIRQ_MCA VIRQ_ARCH_0
 
@@ -388,5 +388,5 @@ struct xen_mce_log {
 #define MCE_GET_LOG_LEN      _IOR('M', 2, int)
 #define MCE_GETCLEAR_FLAGS   _IOR('M', 3, int)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __XEN_PUBLIC_ARCH_X86_MCA_H__ */
include/xen/interface/xen.h +4 -4
index 0ca23eca2a9cc..40c9793e98805 100644
@@ -337,7 +337,7 @@
 #define MMUEXT_MARK_SUPER       19
 #define MMUEXT_UNMARK_SUPER     20
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct mmuext_op {
 	unsigned int cmd;
 	union {
@@ -415,7 +415,7 @@ DEFINE_GUEST_HANDLE_STRUCT(mmuext_op);
 
 #define MAX_VMASST_TYPE 5
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef uint16_t domid_t;
 
@@ -760,11 +760,11 @@ struct tmem_op {
 
 DEFINE_GUEST_HANDLE(u64);
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 /* In assembly code we cannot use C numeric constant suffixes. */
 #define mk_unsigned_long(x) x
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __XEN_PUBLIC_XEN_H__ */
tools/include/asm-generic/barrier.h +2 -2
index 6ef36e920ea8a..b61c3bde0447e 100644
@@ -13,7 +13,7 @@
 #ifndef __TOOLS_LINUX_ASM_GENERIC_BARRIER_H
 #define __TOOLS_LINUX_ASM_GENERIC_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 
@@ -36,5 +36,5 @@
 #define wmb()	mb()
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __TOOLS_LINUX_ASM_GENERIC_BARRIER_H */
tools/include/asm/alternative.h +1 -1
index 8e548ac8f740c..85db65074a714 100644
@@ -3,7 +3,7 @@
 #define _TOOLS_ASM_ALTERNATIVE_ASM_H
 
 #if defined(__s390x__)
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 .macro ALTERNATIVE oldinstr, newinstr, feature
 	\oldinstr
 .endm
tools/include/linux/bits.h +2 -2
index 60044b6088172..7ca8d43b30c11 100644
@@ -18,7 +18,7 @@
  * position @h. For example
  * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
  */
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 #include <linux/build_bug.h>
 #define GENMASK_INPUT_CHECK(h, l) \
 	(BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
@@ -36,7 +36,7 @@
 #define GENMASK_ULL(h, l) \
 	(GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 /*
  * Missing asm support
  *
tools/include/linux/compiler.h +2 -2
index 9c05a59f01842..3d35fe051065e 100644
@@ -2,7 +2,7 @@
 #ifndef _TOOLS_LINUX_COMPILER_H_
 #define _TOOLS_LINUX_COMPILER_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler_types.h>
 
@@ -222,6 +222,6 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
 	__asm__ ("" : "=r" (var) : "0" (var))
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _TOOLS_LINUX_COMPILER_H */
tools/include/linux/objtool_types.h +2 -2
index df5d9fa84dba3..3d7cbb4360d8e 100644
@@ -2,7 +2,7 @@
 #ifndef _LINUX_OBJTOOL_TYPES_H
 #define _LINUX_OBJTOOL_TYPES_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -18,7 +18,7 @@ struct unwind_hint {
 	u8		signal;
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * UNWIND_HINT_TYPE_UNDEFINED: A blind spot in ORC coverage which can result in
Signature · 1 line
2.48.1
#3 lore raw

PATCH 3/41 alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/alpha/include/asm/console.h     | 4 ++--
 arch/alpha/include/asm/page.h        | 4 ++--
 arch/alpha/include/asm/pal.h         | 4 ++--
 arch/alpha/include/asm/thread_info.h | 8 ++++----
 4 files changed, 10 insertions(+), 10 deletions(-)
arch/alpha/include/asm/console.h +2 -2
index 088b7b9eb15ae..1cabdb6064bbe 100644
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/console.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern long callback_puts(long unit, const char *s, long length);
 extern long callback_getc(long unit);
 extern long callback_open_console(void);
@@ -26,5 +26,5 @@ struct crb_struct;
 struct hwrpb_struct;
 extern int callback_init_done;
 extern void * callback_init(void *);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __AXP_CONSOLE_H */
arch/alpha/include/asm/page.h +2 -2
index 5ec4c77e432e0..d2c6667d73e9e 100644
@@ -6,7 +6,7 @@
 #include <asm/pal.h>
 #include <vdso/page.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define STRICT_MM_TYPECHECKS
 
@@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
 #define PAGE_OFFSET		0xfffffc0000000000
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
 #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
arch/alpha/include/asm/pal.h +2 -2
index db2b3b18b34c7..799a64c051984 100644
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/pal.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern void halt(void) __attribute__((noreturn));
 #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
@@ -183,5 +183,5 @@ qemu_get_vmtime(void)
 	return v0;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ALPHA_PAL_H */
arch/alpha/include/asm/thread_info.h +4 -4
index 4a4d00b37986e..98ccbca64984c 100644
@@ -4,14 +4,14 @@
 
 #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/processor.h>
 #include <asm/types.h>
 #include <asm/hwrpb.h>
 #include <asm/sysinfo.h>
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct thread_info {
 	struct pcb_struct	pcb;		/* palcode state */
 
@@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
 
 register unsigned long *current_stack_pointer __asm__ ("$30");
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* Thread information allocation.  */
 #define THREAD_SIZE_ORDER 1
@@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ ("$30");
 	put_user(res, (int __user *)(value));				\
 	})
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void __save_fpu(void);
 
 static inline void save_fpu(void)
Signature · 1 line
2.48.1
#4 lore raw

Re: [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers

Quoted 115 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/alpha/include/asm/console.h     | 4 ++--
  arch/alpha/include/asm/page.h        | 4 ++--
  arch/alpha/include/asm/pal.h         | 4 ++--
  arch/alpha/include/asm/thread_info.h | 8 ++++----
  4 files changed, 10 insertions(+), 10 deletions(-)
arch/alpha/include/asm/console.h +2 -2
index 088b7b9eb15ae..1cabdb6064bbe 100644
@@ -4,7 +4,7 @@
 
  #include <uapi/asm/console.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern long callback_puts(long unit, const char *s, long length);
  extern long callback_getc(long unit);
  extern long callback_open_console(void);
@@ -26,5 +26,5 @@ struct crb_struct;
  struct hwrpb_struct;
  extern int callback_init_done;
  extern void * callback_init(void *);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __AXP_CONSOLE_H */
arch/alpha/include/asm/page.h +2 -2
index 5ec4c77e432e0..d2c6667d73e9e 100644
@@ -6,7 +6,7 @@
  #include <asm/pal.h>
  #include <vdso/page.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define STRICT_MM_TYPECHECKS
 
@@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
  #define PAGE_OFFSET		0xfffffc0000000000
  #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
  #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
arch/alpha/include/asm/pal.h +2 -2
index db2b3b18b34c7..799a64c051984 100644
@@ -4,7 +4,7 @@
 
  #include <uapi/asm/pal.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  extern void halt(void) __attribute__((noreturn));
  #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
@@ -183,5 +183,5 @@ qemu_get_vmtime(void)
  	return v0;
  }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif /* __ALPHA_PAL_H */
arch/alpha/include/asm/thread_info.h +3 -3
index 4a4d00b37986e..98ccbca64984c 100644
@@ -4,14 +4,14 @@
 
  #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #include <asm/processor.h>
  #include <asm/types.h>
  #include <asm/hwrpb.h>
  #include <asm/sysinfo.h>
  #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  struct thread_info {
  	struct pcb_struct	pcb;		/* palcode state */
 
@@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
 
  register unsigned long *current_stack_pointer __asm__ ("$30");
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /* Thread information allocation.  */
  #define THREAD_SIZE_ORDER 1

arch/alpha/include/asm/thread_info.h register unsigned long *current_stack_pointer __asm__ ("$30"); · line 116

Quoted 8 lines
arch/alpha/include/asm/thread_info.h +1 -1
@@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ ("$30");
  	put_user(res, (int __user *)(value));				\
  	})
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern void __save_fpu(void);
 
  static inline void save_fpu(void)

Friendly ping!

Richard, Matt, could you maybe pick this up via your alpha tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

#5 lore raw

Re: [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers

Quoted 109 lines · Thomas Huth
Quoted 98 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/alpha/include/asm/console.h     | 4 ++-- arch/alpha/include/asm/page.h        | 4 ++-- arch/alpha/include/asm/pal.h         | 4 ++-- arch/alpha/include/asm/thread_info.h | 8 ++++----

  4 files changed, 10 insertions(+), 10 deletions(-)
arch/alpha/include/asm/console.h +2 -2
index 088b7b9eb15ae..1cabdb6064bbe 100644
@@ -4,7 +4,7 @@
   #include <uapi/asm/console.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   extern long callback_puts(long unit, const char *s, long length);
   extern long callback_getc(long unit);
   extern long callback_open_console(void);
@@ -26,5 +26,5 @@ struct crb_struct;
   struct hwrpb_struct;
   extern int callback_init_done;
   extern void * callback_init(void *);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   #endif /* __AXP_CONSOLE_H */
arch/alpha/include/asm/page.h +2 -2
index 5ec4c77e432e0..d2c6667d73e9e 100644
@@ -6,7 +6,7 @@
   #include <asm/pal.h>
   #include <vdso/page.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #define STRICT_MM_TYPECHECKS
@@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
   #define PAGE_OFFSET        0xfffffc0000000000
   #endif
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #define __pa(x)            ((unsigned long) (x) - PAGE_OFFSET)
   #define __va(x)            ((void *)((unsigned long) (x) + PAGE_OFFSET))
arch/alpha/include/asm/pal.h +2 -2
index db2b3b18b34c7..799a64c051984 100644
@@ -4,7 +4,7 @@
   #include <uapi/asm/pal.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   extern void halt(void) __attribute__((noreturn));
   #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
@@ -183,5 +183,5 @@ qemu_get_vmtime(void)
       return v0;
   }
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #endif /* __ALPHA_PAL_H */
arch/alpha/include/asm/thread_info.h +2 -2
index 4a4d00b37986e..98ccbca64984c 100644
@@ -4,14 +4,14 @@
   #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #include <asm/processor.h>
   #include <asm/types.h>
   #include <asm/hwrpb.h>
   #include <asm/sysinfo.h>
   #endif
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   struct thread_info {

      struct pcb_struct    pcb;        /* palcode state */

arch/alpha/include/asm/thread_info.h +1 -1
@@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info 
 __asm__("$8");
   register unsigned long *current_stack_pointer __asm__ ("$30");
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   /* Thread information allocation.  */
   #define THREAD_SIZE_ORDER 1

arch/alpha/include/asm/thread_info.h register unsigned long *current_stack_pointer __asm__ · line 115

Quoted 7 lines
arch/alpha/include/asm/thread_info.h +1 -1
@@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ 
 ("$30");
       put_user(res, (int __user *)(value));                \
       })
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   extern void __save_fpu(void);
   static inline void save_fpu(void)

Friendly ping!

Quoted 1 line

Richard, Matt, could you maybe pick this up via your alpha tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Ping^2! Any chance that you could pick this up for Linux v6.17 ?

Thanks,
Thomas

#6 lore raw

PATCH 4/41 arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

---
 arch/arc/include/uapi/asm/ptrace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arc/include/uapi/asm/ptrace.h +2 -2
index 2a6eff57f6dd8..3ae832db278cd 100644
@@ -14,7 +14,7 @@
 
 #define PTRACE_GET_THREAD_AREA	25
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Userspace ABI: Register state needed by
  *  -ptrace (gdbserver)
@@ -53,6 +53,6 @@ struct user_regs_arcv2 {
 	unsigned long r30, r58, r59;
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _UAPI__ASM_ARC_PTRACE_H */
Signature · 1 line
2.48.1
#7 lore raw

PATCH 5/41 arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/arc/include/asm/arcregs.h            | 2 +-
 arch/arc/include/asm/atomic.h             | 4 ++--
 arch/arc/include/asm/bitops.h             | 4 ++--
 arch/arc/include/asm/bug.h                | 4 ++--
 arch/arc/include/asm/cache.h              | 4 ++--
 arch/arc/include/asm/current.h            | 4 ++--
 arch/arc/include/asm/dsp-impl.h           | 2 +-
 arch/arc/include/asm/dsp.h                | 4 ++--
 arch/arc/include/asm/dwarf.h              | 4 ++--
 arch/arc/include/asm/entry.h              | 4 ++--
 arch/arc/include/asm/irqflags-arcv2.h     | 4 ++--
 arch/arc/include/asm/irqflags-compact.h   | 4 ++--
 arch/arc/include/asm/jump_label.h         | 4 ++--
 arch/arc/include/asm/linkage.h            | 6 +++---
 arch/arc/include/asm/mmu-arcv2.h          | 4 ++--
 arch/arc/include/asm/mmu.h                | 2 +-
 arch/arc/include/asm/page.h               | 4 ++--
 arch/arc/include/asm/pgtable-bits-arcv2.h | 4 ++--
 arch/arc/include/asm/pgtable-levels.h     | 4 ++--
 arch/arc/include/asm/pgtable.h            | 4 ++--
 arch/arc/include/asm/processor.h          | 4 ++--
 arch/arc/include/asm/ptrace.h             | 4 ++--
 arch/arc/include/asm/switch_to.h          | 2 +-
 arch/arc/include/asm/thread_info.h        | 4 ++--
 24 files changed, 45 insertions(+), 45 deletions(-)
arch/arc/include/asm/arcregs.h +1 -1
index 005d9e4d187a0..a31bbf5c8bbc8 100644
@@ -144,7 +144,7 @@
 #define ARC_AUX_AGU_MOD2	0x5E2
 #define ARC_AUX_AGU_MOD3	0x5E3
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <soc/arc/arc_aux.h>
 
arch/arc/include/asm/atomic.h +2 -2
index 592d7fffc223c..e615c42b93bab 100644
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_ATOMIC_H
 #define _ASM_ARC_ATOMIC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/compiler.h>
@@ -31,6 +31,6 @@
 #include <asm/atomic64-arcv2.h>
 #endif
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/bitops.h +2 -2
index f5a936496f060..5340c28713927 100644
@@ -10,7 +10,7 @@
 #error only <linux/bitops.h> can be included directly
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/compiler.h>
@@ -192,6 +192,6 @@ static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
 #include <asm-generic/bitops/le.h>
 #include <asm-generic/bitops/ext2-atomic-setbit.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/bug.h +2 -2
index 4c453ba96c519..171c16021f709 100644
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_BUG_H
 #define _ASM_ARC_BUG_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/ptrace.h>
 
@@ -29,6 +29,6 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
 
 #include <asm-generic/bug.h>
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/cache.h +2 -2
index f0f1fc5d62b66..040a97f4dd829 100644
@@ -23,7 +23,7 @@
  */
 #define ARC_UNCACHED_ADDR_SPACE	0xc0000000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/build_bug.h>
 
@@ -65,7 +65,7 @@
 extern int ioc_enable;
 extern unsigned long perip_base, perip_end;
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 /* Instruction cache related Auxiliary registers */
 #define ARC_REG_IC_BCR		0x77	/* Build Config reg */
arch/arc/include/asm/current.h +2 -2
index 06be89f6f2f05..03ffd005f3fa6 100644
@@ -9,7 +9,7 @@
 #ifndef _ASM_ARC_CURRENT_H
 #define _ASM_ARC_CURRENT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_ARC_CURR_IN_REG
 
@@ -20,6 +20,6 @@ register struct task_struct *curr_arc asm("gp");
 #include <asm-generic/current.h>
 #endif /* ! CONFIG_ARC_CURR_IN_REG */
 
-#endif /* ! __ASSEMBLY__ */
+#endif /* ! __ASSEMBLER__ */
 
 #endif /* _ASM_ARC_CURRENT_H */
arch/arc/include/asm/dsp-impl.h +1 -1
index cd5636dfeb6f4..fd5fdaad90c16 100644
@@ -11,7 +11,7 @@
 
 #define DSP_CTRL_DISABLED_ALL		0
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 /* clobbers r5 register */
 .macro DSP_EARLY_INIT
arch/arc/include/asm/dsp.h +2 -2
index f496dbc4640b2..eeaaf4e4eabd3 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARC_DSP_H
 #define __ASM_ARC_DSP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * DSP-related saved registers - need to be saved only when you are
@@ -24,6 +24,6 @@ struct dsp_callee_regs {
 #endif
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_ARC_DSP_H */
arch/arc/include/asm/dwarf.h +2 -2
index a0d5ebe1bc3f5..1524c5cf8b59e 100644
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_DWARF_H
 #define _ASM_ARC_DWARF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #ifdef ARC_DW2_UNWIND_AS_CFI
 
@@ -38,6 +38,6 @@
 
 #endif	/* !ARC_DW2_UNWIND_AS_CFI */
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* _ASM_ARC_DWARF_H */
arch/arc/include/asm/entry.h +2 -2
index 38c35722cebf0..f453af251a1a1 100644
@@ -13,7 +13,7 @@
 #include <asm/processor.h>	/* For VMALLOC_START */
 #include <asm/mmu.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #ifdef CONFIG_ISA_ARCOMPACT
 #include <asm/entry-compact.h>	/* ISA specific bits */
@@ -146,7 +146,7 @@
 
 #endif	/* CONFIG_ARC_CURR_IN_REG */
 
-#else	/* !__ASSEMBLY__ */
+#else	/* !__ASSEMBLER__ */
 
 extern void do_signal(struct pt_regs *);
 extern void do_notify_resume(struct pt_regs *);
arch/arc/include/asm/irqflags-arcv2.h +2 -2
index fb3c21f1a2383..30aea562f8aa6 100644
@@ -50,7 +50,7 @@
 #define ISA_INIT_STATUS_BITS	(STATUS_IE_MASK | __AD_ENB | \
 					(ARCV2_IRQ_DEF_PRIO << 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Save IRQ state and disable IRQs
@@ -170,6 +170,6 @@ static inline void arc_softirq_clear(int irq)
 	seti
 .endm
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/irqflags-compact.h +2 -2
index 936a2f21f315e..85c2f6bcde0c1 100644
@@ -40,7 +40,7 @@
 
 #define ISA_INIT_STATUS_BITS	STATUS_IE_MASK
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /******************************************************************
  * IRQ Control Macros
@@ -196,6 +196,6 @@ static inline int arch_irqs_disabled(void)
 	flag	\scratch
 .endm
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/jump_label.h +2 -2
index a339223d9e052..66ead75784d97 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_ARC_JUMP_LABEL_H
 #define _ASM_ARC_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/stringify.h>
 #include <linux/types.h>
@@ -68,5 +68,5 @@ struct jump_entry {
 	jump_label_t key;
 };
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif
arch/arc/include/asm/linkage.h +3 -3
index 8a3fb71e9cfad..ba3cb65b5eaa4 100644
@@ -12,7 +12,7 @@
 #define __ALIGN		.align 4
 #define __ALIGN_STR	__stringify(__ALIGN)
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 .macro ST2 e, o, off
 #ifdef CONFIG_ARC_HAS_LL64
@@ -61,7 +61,7 @@
 	CFI_ENDPROC ASM_NL	\
 	.size name, .-name
 
-#else	/* !__ASSEMBLY__ */
+#else	/* !__ASSEMBLER__ */
 
 #ifdef CONFIG_ARC_HAS_ICCM
 #define __arcfp_code __section(".text.arcfp")
@@ -75,6 +75,6 @@
 #define __arcfp_data __section(".data")
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/mmu-arcv2.h +2 -2
index 41412642f2796..5e5482026ac90 100644
@@ -69,7 +69,7 @@
 
 #define PTE_BITS_NON_RWX_IN_PD1	(PAGE_MASK_PHYS | _PAGE_CACHEABLE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mm_struct;
 extern int pae40_exist_but_not_enab(void);
@@ -100,6 +100,6 @@ static inline void mmu_setup_pgd(struct mm_struct *mm, void *pgd)
 	sr \reg, [ARC_REG_PID]
 .endm
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/mmu.h +1 -1
index 4ae2db59d494c..e3b35ceab582b 100644
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_MMU_H
 #define _ASM_ARC_MMU_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/threads.h>	/* NR_CPUS */
 
arch/arc/include/asm/page.h +2 -2
index def0dfb95b436..9720fe6b2c245 100644
@@ -19,7 +19,7 @@
 
 #endif /* CONFIG_ARC_HAS_PAE40 */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define clear_page(paddr)		memset((paddr), 0, PAGE_SIZE)
 #define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
@@ -136,6 +136,6 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
 #include <asm-generic/memory_model.h>   /* page_to_pfn, pfn_to_page */
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/pgtable-bits-arcv2.h +2 -2
index 8ebec1b21d246..a8fdb4fe1fbd6 100644
@@ -75,7 +75,7 @@
  *     This is to enable COW mechanism
  */
 	/* xwr */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define pte_write(pte)		(pte_val(pte) & _PAGE_WRITE)
 #define pte_dirty(pte)		(pte_val(pte) & _PAGE_DIRTY)
@@ -142,6 +142,6 @@ PTE_BIT_FUNC(swp_clear_exclusive, &= ~(_PAGE_SWP_EXCLUSIVE));
 #include <asm/hugepage.h>
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/pgtable-levels.h +2 -2
index 86e1482264630..e7680b74e2c68 100644
@@ -85,7 +85,7 @@
 
 #define PTRS_PER_PTE		BIT(PMD_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if CONFIG_PGTABLE_LEVELS > 3
 #include <asm-generic/pgtable-nop4d.h>
@@ -183,6 +183,6 @@
 #define pmd_leaf(x)		(pmd_val(x) & _PAGE_HW_SZ)
 #endif
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/pgtable.h +2 -2
index 4cf45a99fd792..bd580e2b62d7c 100644
@@ -19,7 +19,7 @@
  */
 #define	USER_PTRS_PER_PGD	(TASK_SIZE / PGDIR_SIZE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern char empty_zero_page[PAGE_SIZE];
 #define ZERO_PAGE(vaddr)	(virt_to_page(empty_zero_page))
@@ -29,6 +29,6 @@ extern pgd_t swapper_pg_dir[] __aligned(PAGE_SIZE);
 /* to cope with aliasing VIPT cache */
 #define HAVE_ARCH_UNMAPPED_AREA
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arc/include/asm/processor.h +2 -2
index d606658e2fe73..7f7901ac6643c 100644
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARC_PROCESSOR_H
 #define __ASM_ARC_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/ptrace.h>
 #include <asm/dsp.h>
@@ -66,7 +66,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc,
 
 extern unsigned int __get_wchan(struct task_struct *p);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Default System Memory Map on ARC
arch/arc/include/asm/ptrace.h +2 -2
index cf79df0b25705..f6c052af8f4d3 100644
@@ -10,7 +10,7 @@
 #include <uapi/asm/ptrace.h>
 #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef union {
 	struct {
@@ -172,6 +172,6 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 extern int syscall_trace_enter(struct pt_regs *);
 extern void syscall_trace_exit(struct pt_regs *);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_PTRACE_H */
arch/arc/include/asm/switch_to.h +1 -1
index 1f85de8288b17..5806106a65f90 100644
@@ -6,7 +6,7 @@
 #ifndef _ASM_ARC_SWITCH_TO_H
 #define _ASM_ARC_SWITCH_TO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/sched.h>
 #include <asm/dsp-impl.h>
arch/arc/include/asm/thread_info.h +2 -2
index 12daaf3a61eaf..255d2c7742190 100644
@@ -24,7 +24,7 @@
 #define THREAD_SIZE     (PAGE_SIZE << THREAD_SIZE_ORDER)
 #define THREAD_SHIFT	(PAGE_SHIFT << THREAD_SIZE_ORDER)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/thread_info.h>
 
@@ -62,7 +62,7 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
 	return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * thread information flags
Signature · 1 line
2.48.1
#8 lore raw

Re: [PATCH 05/41] arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers

Quoted 517 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/arc/include/asm/arcregs.h            | 2 +-
  arch/arc/include/asm/atomic.h             | 4 ++--
  arch/arc/include/asm/bitops.h             | 4 ++--
  arch/arc/include/asm/bug.h                | 4 ++--
  arch/arc/include/asm/cache.h              | 4 ++--
  arch/arc/include/asm/current.h            | 4 ++--
  arch/arc/include/asm/dsp-impl.h           | 2 +-
  arch/arc/include/asm/dsp.h                | 4 ++--
  arch/arc/include/asm/dwarf.h              | 4 ++--
  arch/arc/include/asm/entry.h              | 4 ++--
  arch/arc/include/asm/irqflags-arcv2.h     | 4 ++--
  arch/arc/include/asm/irqflags-compact.h   | 4 ++--
  arch/arc/include/asm/jump_label.h         | 4 ++--
  arch/arc/include/asm/linkage.h            | 6 +++---
  arch/arc/include/asm/mmu-arcv2.h          | 4 ++--
  arch/arc/include/asm/mmu.h                | 2 +-
  arch/arc/include/asm/page.h               | 4 ++--
  arch/arc/include/asm/pgtable-bits-arcv2.h | 4 ++--
  arch/arc/include/asm/pgtable-levels.h     | 4 ++--
  arch/arc/include/asm/pgtable.h            | 4 ++--
  arch/arc/include/asm/processor.h          | 4 ++--
  arch/arc/include/asm/ptrace.h             | 4 ++--
  arch/arc/include/asm/switch_to.h          | 2 +-
  arch/arc/include/asm/thread_info.h        | 4 ++--
  24 files changed, 45 insertions(+), 45 deletions(-)
arch/arc/include/asm/arcregs.h +1 -1
index 005d9e4d187a0..a31bbf5c8bbc8 100644
@@ -144,7 +144,7 @@
  #define ARC_AUX_AGU_MOD2	0x5E2
  #define ARC_AUX_AGU_MOD3	0x5E3
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <soc/arc/arc_aux.h>
 
arch/arc/include/asm/atomic.h +2 -2
index 592d7fffc223c..e615c42b93bab 100644
@@ -6,7 +6,7 @@
  #ifndef _ASM_ARC_ATOMIC_H
  #define _ASM_ARC_ATOMIC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/types.h>
  #include <linux/compiler.h>
@@ -31,6 +31,6 @@
  #include <asm/atomic64-arcv2.h>
  #endif
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/bitops.h +2 -2
index f5a936496f060..5340c28713927 100644
@@ -10,7 +10,7 @@
  #error only <linux/bitops.h> can be included directly
  #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/types.h>
  #include <linux/compiler.h>
@@ -192,6 +192,6 @@ static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
  #include <asm-generic/bitops/le.h>
  #include <asm-generic/bitops/ext2-atomic-setbit.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/bug.h +2 -2
index 4c453ba96c519..171c16021f709 100644
@@ -6,7 +6,7 @@
  #ifndef _ASM_ARC_BUG_H
  #define _ASM_ARC_BUG_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <asm/ptrace.h>
 
@@ -29,6 +29,6 @@ void die(const char *str, struct pt_regs *regs, unsigned long address);
 
  #include <asm-generic/bug.h>
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/cache.h +2 -2
index f0f1fc5d62b66..040a97f4dd829 100644
@@ -23,7 +23,7 @@
   */
  #define ARC_UNCACHED_ADDR_SPACE	0xc0000000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/build_bug.h>
 
@@ -65,7 +65,7 @@
  extern int ioc_enable;
  extern unsigned long perip_base, perip_end;
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
  /* Instruction cache related Auxiliary registers */
  #define ARC_REG_IC_BCR		0x77	/* Build Config reg */
arch/arc/include/asm/current.h +2 -2
index 06be89f6f2f05..03ffd005f3fa6 100644
@@ -9,7 +9,7 @@
  #ifndef _ASM_ARC_CURRENT_H
  #define _ASM_ARC_CURRENT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #ifdef CONFIG_ARC_CURR_IN_REG
 
@@ -20,6 +20,6 @@ register struct task_struct *curr_arc asm("gp");
  #include <asm-generic/current.h>
  #endif /* ! CONFIG_ARC_CURR_IN_REG */
 
-#endif /* ! __ASSEMBLY__ */
+#endif /* ! __ASSEMBLER__ */
 
  #endif /* _ASM_ARC_CURRENT_H */
arch/arc/include/asm/dsp-impl.h +1 -1
index cd5636dfeb6f4..fd5fdaad90c16 100644
@@ -11,7 +11,7 @@
 
  #define DSP_CTRL_DISABLED_ALL		0
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
  /* clobbers r5 register */
  .macro DSP_EARLY_INIT
arch/arc/include/asm/dsp.h +2 -2
index f496dbc4640b2..eeaaf4e4eabd3 100644
@@ -7,7 +7,7 @@
  #ifndef __ASM_ARC_DSP_H
  #define __ASM_ARC_DSP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /*
   * DSP-related saved registers - need to be saved only when you are
@@ -24,6 +24,6 @@ struct dsp_callee_regs {
  #endif
  };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #endif /* __ASM_ARC_DSP_H */
arch/arc/include/asm/dwarf.h +2 -2
index a0d5ebe1bc3f5..1524c5cf8b59e 100644
@@ -6,7 +6,7 @@
  #ifndef _ASM_ARC_DWARF_H
  #define _ASM_ARC_DWARF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
  #ifdef ARC_DW2_UNWIND_AS_CFI
 
@@ -38,6 +38,6 @@
 
  #endif	/* !ARC_DW2_UNWIND_AS_CFI */
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
  #endif	/* _ASM_ARC_DWARF_H */
arch/arc/include/asm/entry.h +2 -2
index 38c35722cebf0..f453af251a1a1 100644
@@ -13,7 +13,7 @@
  #include <asm/processor.h>	/* For VMALLOC_START */
  #include <asm/mmu.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
  #ifdef CONFIG_ISA_ARCOMPACT
  #include <asm/entry-compact.h>	/* ISA specific bits */
@@ -146,7 +146,7 @@
 
  #endif	/* CONFIG_ARC_CURR_IN_REG */
 
-#else	/* !__ASSEMBLY__ */
+#else	/* !__ASSEMBLER__ */
 
  extern void do_signal(struct pt_regs *);
  extern void do_notify_resume(struct pt_regs *);
arch/arc/include/asm/irqflags-arcv2.h +2 -2
index fb3c21f1a2383..30aea562f8aa6 100644
@@ -50,7 +50,7 @@
  #define ISA_INIT_STATUS_BITS	(STATUS_IE_MASK | __AD_ENB | \
  					(ARCV2_IRQ_DEF_PRIO << 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /*
   * Save IRQ state and disable IRQs
@@ -170,6 +170,6 @@ static inline void arc_softirq_clear(int irq)
  	seti
  .endm
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/irqflags-compact.h +2 -2
index 936a2f21f315e..85c2f6bcde0c1 100644
@@ -40,7 +40,7 @@
 
  #define ISA_INIT_STATUS_BITS	STATUS_IE_MASK
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /******************************************************************
   * IRQ Control Macros
@@ -196,6 +196,6 @@ static inline int arch_irqs_disabled(void)
  	flag	\scratch
  .endm
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/jump_label.h +2 -2
index a339223d9e052..66ead75784d97 100644
@@ -2,7 +2,7 @@
  #ifndef _ASM_ARC_JUMP_LABEL_H
  #define _ASM_ARC_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/stringify.h>
  #include <linux/types.h>
@@ -68,5 +68,5 @@ struct jump_entry {
  	jump_label_t key;
  };
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
  #endif
arch/arc/include/asm/linkage.h +3 -3
index 8a3fb71e9cfad..ba3cb65b5eaa4 100644
@@ -12,7 +12,7 @@
  #define __ALIGN		.align 4
  #define __ALIGN_STR	__stringify(__ALIGN)
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
  .macro ST2 e, o, off
  #ifdef CONFIG_ARC_HAS_LL64
@@ -61,7 +61,7 @@
  	CFI_ENDPROC ASM_NL	\
  	.size name, .-name
 
-#else	/* !__ASSEMBLY__ */
+#else	/* !__ASSEMBLER__ */
 
  #ifdef CONFIG_ARC_HAS_ICCM
  #define __arcfp_code __section(".text.arcfp")
@@ -75,6 +75,6 @@
  #define __arcfp_data __section(".data")
  #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/mmu-arcv2.h +2 -2
index 41412642f2796..5e5482026ac90 100644
@@ -69,7 +69,7 @@
 
  #define PTE_BITS_NON_RWX_IN_PD1	(PAGE_MASK_PHYS | _PAGE_CACHEABLE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  struct mm_struct;
  extern int pae40_exist_but_not_enab(void);
@@ -100,6 +100,6 @@ static inline void mmu_setup_pgd(struct mm_struct *mm, void *pgd)
  	sr \reg, [ARC_REG_PID]
  .endm
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/mmu.h +1 -1
index 4ae2db59d494c..e3b35ceab582b 100644
@@ -6,7 +6,7 @@
  #ifndef _ASM_ARC_MMU_H
  #define _ASM_ARC_MMU_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/threads.h>	/* NR_CPUS */
 
arch/arc/include/asm/page.h +2 -2
index def0dfb95b436..9720fe6b2c245 100644
@@ -19,7 +19,7 @@
 
  #endif /* CONFIG_ARC_HAS_PAE40 */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define clear_page(paddr)		memset((paddr), 0, PAGE_SIZE)
  #define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
@@ -136,6 +136,6 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
  #include <asm-generic/memory_model.h>   /* page_to_pfn, pfn_to_page */
  #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/pgtable-bits-arcv2.h +2 -2
index 8ebec1b21d246..a8fdb4fe1fbd6 100644
@@ -75,7 +75,7 @@
   *     This is to enable COW mechanism
   */
  	/* xwr */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define pte_write(pte)		(pte_val(pte) & _PAGE_WRITE)
  #define pte_dirty(pte)		(pte_val(pte) & _PAGE_DIRTY)
@@ -142,6 +142,6 @@ PTE_BIT_FUNC(swp_clear_exclusive, &= ~(_PAGE_SWP_EXCLUSIVE));
  #include <asm/hugepage.h>
  #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/pgtable-levels.h +2 -2
index 86e1482264630..e7680b74e2c68 100644
@@ -85,7 +85,7 @@
 
  #define PTRS_PER_PTE		BIT(PMD_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #if CONFIG_PGTABLE_LEVELS > 3
  #include <asm-generic/pgtable-nop4d.h>
@@ -183,6 +183,6 @@
  #define pmd_leaf(x)		(pmd_val(x) & _PAGE_HW_SZ)
  #endif
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/pgtable.h +2 -2
index 4cf45a99fd792..bd580e2b62d7c 100644
@@ -19,7 +19,7 @@
   */
  #define	USER_PTRS_PER_PGD	(TASK_SIZE / PGDIR_SIZE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  extern char empty_zero_page[PAGE_SIZE];
  #define ZERO_PAGE(vaddr)	(virt_to_page(empty_zero_page))
@@ -29,6 +29,6 @@ extern pgd_t swapper_pg_dir[] __aligned(PAGE_SIZE);
  /* to cope with aliasing VIPT cache */
  #define HAVE_ARCH_UNMAPPED_AREA
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif
arch/arc/include/asm/processor.h +2 -2
index d606658e2fe73..7f7901ac6643c 100644
@@ -11,7 +11,7 @@
  #ifndef __ASM_ARC_PROCESSOR_H
  #define __ASM_ARC_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <asm/ptrace.h>
  #include <asm/dsp.h>
@@ -66,7 +66,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc,
 
  extern unsigned int __get_wchan(struct task_struct *p);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  /*
   * Default System Memory Map on ARC
arch/arc/include/asm/ptrace.h +2 -2
index cf79df0b25705..f6c052af8f4d3 100644
@@ -10,7 +10,7 @@
  #include <uapi/asm/ptrace.h>
  #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  typedef union {
  	struct {
@@ -172,6 +172,6 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
  extern int syscall_trace_enter(struct pt_regs *);
  extern void syscall_trace_exit(struct pt_regs *);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #endif /* __ASM_PTRACE_H */
arch/arc/include/asm/switch_to.h +1 -1
index 1f85de8288b17..5806106a65f90 100644
@@ -6,7 +6,7 @@
  #ifndef _ASM_ARC_SWITCH_TO_H
  #define _ASM_ARC_SWITCH_TO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/sched.h>
  #include <asm/dsp-impl.h>
arch/arc/include/asm/thread_info.h +1 -1
index 12daaf3a61eaf..255d2c7742190 100644
@@ -24,7 +24,7 @@
  #define THREAD_SIZE     (PAGE_SIZE << THREAD_SIZE_ORDER)
  #define THREAD_SHIFT	(PAGE_SHIFT << THREAD_SIZE_ORDER)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/thread_info.h>
 

arch/arc/include/asm/thread_info.h static inline __attribute_const__ struct thread_info *current_thread_info(void) · line 68

Quoted 8 lines
arch/arc/include/asm/thread_info.h +1 -1
@@ -62,7 +62,7 @@ static inline __attribute_const__ struct thread_info *current_thread_info(void)
  	return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
  }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  /*
   * thread information flags

Friendly ping!

Vineet, could you maybe pick this (and the previous patch) up via your arc tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

maintainer
#9 lore raw

Re: [PATCH 05/41] arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers

Quoted 16 lines · Thomas Huth
Quoted 15 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---

[snip...]

Quoted 5 lines
Quoted 5 lines

Friendly ping!

Vineet, could you maybe pick this (and the previous patch) up via your arc tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Sorry, this fell thru cracks. I will queue this up for 6.16 fixes, once rc1 is out and we can start pushing new code for landing into linux-next again.

Thx,
-Vineet

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

#10 lore raw

PATCH 6/41 arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

---
 arch/arm/include/uapi/asm/ptrace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/uapi/asm/ptrace.h +2 -2
index 8896c23ccba78..fb829c96dc2ae 100644
@@ -119,7 +119,7 @@
 #define PT_DATA_ADDR		0x10004
 #define PT_TEXT_END_ADDR	0x10008
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * This struct defines the way the registers are stored on the
@@ -158,6 +158,6 @@ struct pt_regs {
 #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ )
 
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI__ASM_ARM_PTRACE_H */
Signature · 1 line
2.48.1
#11 lore raw

PATCH 7/41 arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/arm/include/asm/arch_gicv3.h                |  4 ++--
 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/jump_label.h                |  4 ++--
 arch/arm/include/asm/kexec.h                     |  4 ++--
 arch/arm/include/asm/kgdb.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                   | 10 +++++-----
 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/vdso/vsyscall.h             |  4 ++--
 arch/arm/include/asm/vfp.h                       |  2 +-
 arch/arm/include/asm/virt.h                      |  4 ++--
 arch/arm/mach-at91/pm.h                          |  2 +-
 arch/arm/mach-exynos/smc.h                       |  4 ++--
 arch/arm/mach-footbridge/include/mach/hardware.h |  2 +-
 arch/arm/mach-imx/hardware.h                     |  2 +-
 arch/arm/mach-imx/mxc.h                          |  2 +-
 arch/arm/mach-omap2/control.h                    |  8 ++++----
 arch/arm/mach-omap2/soc.h                        |  4 ++--
 arch/arm/mach-omap2/sram.h                       |  4 ++--
 arch/arm/mach-pxa/irqs.h                         |  2 +-
 arch/arm/mach-pxa/pxa-regs.h                     |  2 +-
 arch/arm/mach-s3c/map-base.h                     |  2 +-
 arch/arm/mach-sa1100/include/mach/bitfield.h     |  2 +-
 arch/arm/mach-sa1100/include/mach/hardware.h     |  2 +-
 arch/arm/mach-tegra/reset.h                      |  2 +-
 arch/arm/mach-tegra/sleep.h                      |  2 +-
 arch/arm/tools/gen-mach-types                    |  2 +-
 drivers/memory/emif.h                            |  4 ++--
 68 files changed, 127 insertions(+), 127 deletions(-)
arch/arm/include/asm/arch_gicv3.h +2 -2
index 311e83038bdb3..847590df75511 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARCH_GICV3_H
 #define __ASM_ARCH_GICV3_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/io.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
@@ -257,5 +257,5 @@ static inline bool gic_has_relaxed_pmr_sync(void)
 	return false;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* !__ASM_ARCH_GICV3_H */
arch/arm/include/asm/assembler.h +1 -1
index d33c1e24e00b3..0f1f3b907825e 100644
@@ -13,7 +13,7 @@
 #ifndef __ASM_ASSEMBLER_H__
 #define __ASM_ASSEMBLER_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #error "Only include this from assembly code"
 #endif
 
arch/arm/include/asm/barrier.h +2 -2
index 83ae97c049d9b..af3516cfa8dcd 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_BARRIER_H
 #define __ASM_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
 
@@ -99,5 +99,5 @@ static inline unsigned long array_index_mask_nospec(unsigned long idx,
 
 #include <asm-generic/barrier.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ASM_BARRIER_H */
arch/arm/include/asm/cache.h +1 -1
index ecbc100d22a56..38a38a53badc9 100644
@@ -26,7 +26,7 @@
 
 #define __read_mostly __section(".data..read_mostly")
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_ARCH_HAS_CACHE_LINE_SIZE
 int cache_line_size(void);
 #endif
arch/arm/include/asm/cp15.h +2 -2
index a54230e656479..603a33c4bf572 100644
@@ -40,7 +40,7 @@
 #define CR_AFE	(1 << 29)	/* Access flag enable			*/
 #define CR_TE	(1 << 30)	/* Thumb exception enable		*/
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if __LINUX_ARM_ARCH__ >= 4
 #define vectors_high()	(get_cr() & CR_V)
@@ -117,6 +117,6 @@ static inline unsigned long get_cr(void)
 
 #endif /* ifdef CONFIG_CPU_CP15 / else */
 
-#endif /* ifndef __ASSEMBLY__ */
+#endif /* ifndef __ASSEMBLER__ */
 
 #endif
arch/arm/include/asm/cputype.h +2 -2
index 0163c3e78a67f..4b2832e14c3e1 100644
@@ -109,7 +109,7 @@
 /* Qualcomm implemented cores */
 #define ARM_CPU_PART_SCORPION		0x510002d0
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/stringify.h>
 #include <linux/kernel.h>
@@ -343,6 +343,6 @@ static inline int __attribute_const__ cpuid_feature_extract_field(u32 features,
 #define cpuid_feature_extract(reg, field) \
 	cpuid_feature_extract_field(read_cpuid_ext(reg), field)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arm/include/asm/current.h +2 -2
index 5225cb1c803b1..12968d3cdc269 100644
@@ -7,7 +7,7 @@
 #ifndef _ASM_ARM_CURRENT_H
 #define _ASM_ARM_CURRENT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/insn.h>
 
 struct task_struct;
@@ -60,6 +60,6 @@ static __always_inline __attribute_const__ struct task_struct *get_current(void)
 
 #define current get_current()
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_ARM_CURRENT_H */
arch/arm/include/asm/delay.h +2 -2
index 1d069e558d8de..6fffc2547f9df 100644
@@ -41,7 +41,7 @@
 #define UDELAY_MULT	UL(2147 * HZ + 483648 * HZ / 1000000)
 #define UDELAY_SHIFT	31
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct delay_timer {
 	unsigned long (*read_current_timer)(void);
@@ -94,7 +94,7 @@ extern void __loop_const_udelay(unsigned long);
 #define ARCH_HAS_READ_CURRENT_TIMER
 extern void register_current_timer_delay(const struct delay_timer *timer);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* defined(_ARM_DELAY_H) */
 
arch/arm/include/asm/domain.h +4 -4
index d48859fdf32c5..66a06feb16c67 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_PROC_DOMAIN_H
 #define __ASM_PROC_DOMAIN_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/thread_info.h>
 #include <asm/barrier.h>
 #endif
@@ -79,7 +79,7 @@
 #define DACR_UACCESS_ENABLE	\
 	(__DACR_DEFAULT | domain_val(DOMAIN_USER, DOMAIN_CLIENT))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_CPU_CP15_MMU
 static __always_inline unsigned int get_domain(void)
@@ -124,7 +124,7 @@ static __always_inline void set_domain(unsigned int val)
 #define TUSERCOND(instr, cond)	#instr #cond
 #endif
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 /*
  * Generate the T (user) versions of the LDR/STR and related
@@ -136,6 +136,6 @@ static __always_inline void set_domain(unsigned int val)
 #define TUSER(instr)	instr
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* !__ASM_PROC_DOMAIN_H */
arch/arm/include/asm/fpstate.h +1 -1
index e29d9c7a52388..2b4469e151851 100644
@@ -9,7 +9,7 @@
 #define __ASM_ARM_FPSTATE_H
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * VFP storage area has:
arch/arm/include/asm/ftrace.h +3 -3
index 5be3ddc96a503..9675ede04f09c 100644
@@ -12,7 +12,7 @@
 #define MCOUNT_ADDR		((unsigned long)(__gnu_mcount_nc))
 #define MCOUNT_INSN_SIZE	4 /* sizeof mcount call */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void __gnu_mcount_nc(void);
 
 #ifdef CONFIG_DYNAMIC_FTRACE
@@ -33,7 +33,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
 
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
 /*
@@ -79,6 +79,6 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self,
 			   unsigned long frame_pointer,
 			   unsigned long stack_pointer);
 
-#endif /* ifndef __ASSEMBLY__ */
+#endif /* ifndef __ASSEMBLER__ */
 
 #endif /* _ASM_ARM_FTRACE */
arch/arm/include/asm/hardware/cache-b15-rac.h +1 -1
index 3d43ec06fd359..b96365bfb2a87 100644
@@ -1,7 +1,7 @@
 #ifndef __ASM_ARM_HARDWARE_CACHE_B15_RAC_H
 #define __ASM_ARM_HARDWARE_CACHE_B15_RAC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 void b15_flush_kern_cache_all(void);
 
arch/arm/include/asm/hardware/cache-l2x0.h +2 -2
index 5a7ee70f561c9..2c9568768ad73 100644
@@ -147,7 +147,7 @@
 
 #define L2X0_WAY_SIZE_SHIFT		3
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask);
 #if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF)
 extern int l2x0_of_init(u32 aux_val, u32 aux_mask);
@@ -187,6 +187,6 @@ struct l2x0_regs {
 
 extern struct l2x0_regs l2x0_saved_regs;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arm/include/asm/hardware/dec21285.h +1 -1
index 894f2a635cbbd..bf722733bbb6f 100644
@@ -15,7 +15,7 @@
 #define DC21285_PCI_IO			0x7c000000
 #define DC21285_PCI_MEM			0x80000000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <mach/hardware.h>
 #define DC21285_IO(x)		((volatile unsigned long *)(ARMCSR_BASE+(x)))
 #else
arch/arm/include/asm/hardware/ioc.h +1 -1
index 6edd27fcd0483..bd4f66591026b 100644
@@ -10,7 +10,7 @@
 #ifndef __ASMARM_HARDWARE_IOC_H
 #define __ASMARM_HARDWARE_IOC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * We use __raw_base variants here so that we give the compiler the
arch/arm/include/asm/hardware/iomd.h +2 -2
index 53006ba5350f0..9b8a289f4db63 100644
@@ -11,7 +11,7 @@
 #define __ASMARM_HARDWARE_IOMD_H
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * We use __raw_base variants here so that we give the compiler the
@@ -167,7 +167,7 @@
 #define VDMA_START	IOMD_VIDSTART
 #define VDMA_END	IOMD_VIDEND
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned int vram_half_sam;
 #define video_set_dma(start,end,offset)				\
 do {								\
arch/arm/include/asm/hardware/memc.h +1 -1
index 1d4ebe0a9678f..8b1865cb564ec 100644
@@ -10,7 +10,7 @@
 #define VDMA_START	1
 #define VDMA_END	2
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void memc_write(unsigned int reg, unsigned long val);
 
 #define video_set_dma(start,end,offset)				\
arch/arm/include/asm/hwcap.h +1 -1
index e31d9f1b8549b..d5b5ebaad011b 100644
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/hwcap.h>
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 /*
  * This yields a mask that user programs can use to figure out what
  * instruction set this cpu supports.
arch/arm/include/asm/irq.h +1 -1
index 26c1d2ced4ce1..7c8f826071162 100644
@@ -22,7 +22,7 @@
 #define NO_IRQ	((unsigned int)(-1))
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct irqaction;
 struct pt_regs;
 
arch/arm/include/asm/jump_label.h +2 -2
index a35aba7f548cc..11024b7f1ef4a 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_ARM_JUMP_LABEL_H
 #define _ASM_ARM_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <asm/unified.h>
@@ -49,5 +49,5 @@ struct jump_entry {
 	jump_label_t key;
 };
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif
arch/arm/include/asm/kexec.h +2 -2
index a8287e7ab9d41..8488f4b611402 100644
@@ -16,7 +16,7 @@
 #define KEXEC_ARM_ATAGS_OFFSET  0x1000
 #define KEXEC_ARM_ZIMAGE_OFFSET 0x8000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define ARCH_HAS_KIMAGE_ARCH
 struct kimage_arch {
@@ -78,6 +78,6 @@ static inline struct page *boot_pfn_to_page(unsigned long boot_pfn)
 }
 #define boot_pfn_to_page boot_pfn_to_page
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ARM_KEXEC_H */
arch/arm/include/asm/kgdb.h +2 -2
index 8de1100d10674..1b7c65935976f 100644
@@ -39,7 +39,7 @@
 #define KGDB_COMPILED_BREAK	0xe7ffdeff
 #define CACHE_FLUSH_IS_SAFE	1
 
-#ifndef	__ASSEMBLY__
+#ifndef	__ASSEMBLER__
 
 static inline void arch_kgdb_breakpoint(void)
 {
@@ -49,7 +49,7 @@ static inline void arch_kgdb_breakpoint(void)
 extern void kgdb_handle_bus_error(void);
 extern int kgdb_fault_expected;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * From Kevin Hilman:
arch/arm/include/asm/mach/arch.h +1 -1
index 2b18a258204d7..ce0137aee0845 100644
@@ -7,7 +7,7 @@
 
 #include <linux/types.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/reboot.h>
 
 struct tag;
arch/arm/include/asm/mcpm.h +2 -2
index 755c97de348c3..743f68f89337e 100644
@@ -24,7 +24,7 @@
 #define MAX_NR_CLUSTERS		2
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <asm/cacheflush.h>
@@ -307,7 +307,7 @@ struct sync_struct {
 #include <asm/asm-offsets.h>
 #define __CACHE_WRITEBACK_GRANULE CACHE_WRITEBACK_GRANULE
 
-#endif /* ! __ASSEMBLY__ */
+#endif /* ! __ASSEMBLER__ */
 
 /* Definitions for mcpm_sync_struct */
 #define CPU_DOWN		0x11
arch/arm/include/asm/memory.h +2 -2
index 7c2fa7dcec6d4..308418f236e42 100644
@@ -98,7 +98,7 @@
 
 #else /* CONFIG_MMU */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned long setup_vectors_base(void);
 extern unsigned long vectors_base;
 #define VECTORS_BASE		vectors_base
@@ -155,7 +155,7 @@ extern unsigned long vectors_base;
  */
 #define PLAT_PHYS_OFFSET	UL(CONFIG_PHYS_OFFSET)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Physical start and end address of the kernel sections. These addresses are
arch/arm/include/asm/mpu.h +2 -2
index 5e088c83d3d8e..6058788a85730 100644
@@ -91,7 +91,7 @@
 #define PMSAv7_DATA_SIDE	0
 #define PMSAv7_INSTR_SIDE	1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mpu_rgn {
 	/* Assume same attributes for d/i-side  */
@@ -128,6 +128,6 @@ static inline void pmsav7_setup(void) {};
 static inline void pmsav8_setup(void) {};
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arm/include/asm/opcodes.h +6 -6
index 38e3eabff5c3f..c2e3ed5157cf3 100644
@@ -6,7 +6,7 @@
 #ifndef __ASM_ARM_OPCODES_H
 #define __ASM_ARM_OPCODES_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/linkage.h>
 extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
 #endif
@@ -71,7 +71,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
  * involving inline assembler.  For .S files, the normal __opcode_*() macros
  * should do the right thing.
  */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #define ___opcode_swab32(x) ___asm_opcode_swab32(x)
 #define ___opcode_swab16(x) ___asm_opcode_swab16(x)
@@ -80,7 +80,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
 #define ___opcode_identity32(x) ___asm_opcode_identity32(x)
 #define ___opcode_identity16(x) ___asm_opcode_identity16(x)
 
-#else /* ! __ASSEMBLY__ */
+#else /* ! __ASSEMBLER__ */
 
 #include <linux/types.h>
 #include <linux/swab.h>
@@ -92,7 +92,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
 #define ___opcode_identity32(x) ((u32)(x))
 #define ___opcode_identity16(x) ((u16)(x))
 
-#endif /* ! __ASSEMBLY__ */
+#endif /* ! __ASSEMBLER__ */
 
 
 #ifdef CONFIG_CPU_ENDIAN_BE8
@@ -111,7 +111,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
 #define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x)
 #define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x)
 #ifdef CONFIG_CPU_ENDIAN_BE32
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * On BE32 systems, using 32-bit accesses to store Thumb instructions will not
  * work in all cases, due to alignment constraints.  For now, a correct
@@ -219,7 +219,7 @@ extern __u32 __opcode_to_mem_thumb32(__u32);
 #endif
 
 /* Helpers for the helpers.  Don't use these directly. */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define ___inst_arm(x) .long x
 #define ___inst_thumb16(x) .short x
 #define ___inst_thumb32(first, second) .short first, second
arch/arm/include/asm/page.h +2 -2
index ef11b721230e2..79bdff0c34ab1 100644
@@ -9,7 +9,7 @@
 
 #include <vdso/page.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifndef CONFIG_MMU
 
@@ -180,7 +180,7 @@ extern int pfn_valid(unsigned long);
 #define pfn_valid pfn_valid
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #include <asm/memory.h>
 
arch/arm/include/asm/pgtable-2level.h +2 -2
index 6b5392e20f411..5edc1f3bdb090 100644
@@ -175,7 +175,7 @@
 #define L_PTE_MT_VECTORS	(_AT(pteval_t, 0x0f) << 2)	/* 1111 */
 #define L_PTE_MT_MASK		(_AT(pteval_t, 0x0f) << 2)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * The "pud_xxx()" functions here are trivial when the pmd is folded into
@@ -242,6 +242,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
  */
 #define pmd_hugewillfault(pmd)	(0)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_PGTABLE_2LEVEL_H */
arch/arm/include/asm/pgtable-3level.h +2 -2
index fa5939eb9864e..102fbfef5f092 100644
@@ -109,7 +109,7 @@
  */
 #define L_PGD_SWAPPER		(_AT(pgdval_t, 1) << 55)	/* swapper_pg_dir entry */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define pud_none(pud)		(!pud_val(pud))
 #define pud_bad(pud)		(!(pud_val(pud) & PUD_TABLE_BIT))
@@ -246,6 +246,6 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
 	flush_pmd_entry(pmdp);
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_PGTABLE_3LEVEL_H */
arch/arm/include/asm/pgtable-nommu.h +2 -2
index 61480d096054d..a8bca82198381 100644
@@ -8,7 +8,7 @@
 #ifndef _ASMARM_PGTABLE_NOMMU_H
 #define _ASMARM_PGTABLE_NOMMU_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/slab.h>
 #include <asm/processor.h>
@@ -84,6 +84,6 @@ extern unsigned int kobjsize(const void *objp);
 #define v6_user_fns	(0)
 #define xscale_mc_user_fns (0)
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLER__*/
 
 #endif /* _ASMARM_PGTABLE_H */
arch/arm/include/asm/pgtable.h +5 -5
index be91e376df79e..c14daa2d00012 100644
@@ -10,7 +10,7 @@
 #include <linux/const.h>
 #include <asm/proc-fns.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * ZERO_PAGE is a global shared page that is always zero: used
  * for zero-mapped memory areas etc..
@@ -53,7 +53,7 @@ extern struct page *empty_zero_page;
 
 #define LIBRARY_TEXT_START	0x0c000000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void __pte_error(const char *file, int line, pte_t);
 extern void __pmd_error(const char *file, int line, pmd_t);
 extern void __pgd_error(const char *file, int line, pgd_t);
@@ -136,7 +136,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
 	__pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED | L_PTE_XN)
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * The table below defines the page protection levels that we insert into our
@@ -147,7 +147,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
  *  3) write implies read permissions
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 
@@ -331,7 +331,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
 #define HAVE_ARCH_UNMAPPED_AREA
 #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* CONFIG_MMU */
 
arch/arm/include/asm/probes.h +2 -2
index ebbd9ec95d21c..0d5067e7f51a9 100644
@@ -11,7 +11,7 @@
 #ifndef _ASM_PROBES_H
 #define _ASM_PROBES_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef u32 probes_opcode_t;
 
@@ -37,7 +37,7 @@ struct arch_probes_insn {
 	bool				kprobe_direct_exec;
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * We assume one instruction can consume at most 64 bytes stack, which is
arch/arm/include/asm/proc-fns.h +2 -2
index b4986a23d8528..fd72f5fac6602 100644
@@ -13,7 +13,7 @@
 #include <asm/glue-proc.h>
 #include <asm/page.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mm_struct;
 
@@ -196,6 +196,6 @@ static inline void cpu_set_ttbcr(unsigned int ttbcr)
 
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __KERNEL__ */
 #endif /* __ASM_PROCFNS_H */
arch/arm/include/asm/ptrace.h +2 -2
index 6eb311fb2da06..de3378a8845ec 100644
@@ -9,7 +9,7 @@
 
 #include <uapi/asm/ptrace.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/bitfield.h>
 #include <linux/types.h>
 
@@ -198,5 +198,5 @@ static inline unsigned long it_advance(unsigned long cpsr)
 int syscall_trace_enter(struct pt_regs *regs);
 void syscall_trace_exit(struct pt_regs *regs);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif
arch/arm/include/asm/system_info.h +2 -2
index ef7fdb588b5fe..3a872ec5d4e2e 100644
@@ -14,7 +14,7 @@
 #define CPU_ARCH_ARMv7		9
 #define CPU_ARCH_ARMv7M		10
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* information about the system we're running on */
 extern unsigned int system_rev;
@@ -25,6 +25,6 @@ extern unsigned int mem_fclk_21285;
 
 extern int __pure cpu_architecture(void);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_ARM_SYSTEM_INFO_H */
arch/arm/include/asm/system_misc.h +2 -2
index 98b37340376bc..8f9f7e833c013 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_ARM_SYSTEM_MISC_H
 #define __ASM_ARM_SYSTEM_MISC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/linkage.h>
@@ -37,6 +37,6 @@ static inline void harden_branch_predictor(void)
 
 extern unsigned int user_debug;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_ARM_SYSTEM_MISC_H */
arch/arm/include/asm/thread_info.h +1 -1
index 943ffcf069d29..186fd662b1c62 100644
@@ -33,7 +33,7 @@
 
 #define OVERFLOW_STACK_SIZE	SZ_4K
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct task_struct;
 
arch/arm/include/asm/thread_notify.h +1 -1
index 1c1542e2ed634..eac8fc4837651 100644
@@ -9,7 +9,7 @@
 
 #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/notifier.h>
 #include <asm/thread_info.h>
arch/arm/include/asm/tlbflush.h +5 -5
index 38c6e4a2a0b60..3eb0b3fa6cc9c 100644
@@ -7,7 +7,7 @@
 #ifndef _ASMARM_TLBFLUSH_H
 #define _ASMARM_TLBFLUSH_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 # include <linux/mm_types.h>
 #endif
 
@@ -200,7 +200,7 @@
 #error Unknown TLB model
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/sched.h>
 
@@ -641,7 +641,7 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf,
 
 #elif defined(CONFIG_SMP)	/* !CONFIG_MMU */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 static inline void local_flush_tlb_all(void)									{ }
 static inline void local_flush_tlb_mm(struct mm_struct *mm)							{ }
 static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)			{ }
@@ -657,11 +657,11 @@ extern void flush_tlb_kernel_page(unsigned long kaddr);
 extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
 extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
 extern void flush_bp_all(void);
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_ARM_ERRATA_798181
 extern void erratum_a15_798181_init(void);
 #else
arch/arm/include/asm/tls.h +2 -2
index 3dcd0f71a0dae..9b09775e20931 100644
@@ -5,7 +5,7 @@
 #include <linux/compiler.h>
 #include <asm/thread_info.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #include <asm/asm-offsets.h>
 	.macro switch_tls_none, base, tp, tpuser, tmp1, tmp2
 	.endm
@@ -68,7 +68,7 @@ ALT_UP_B(.L0_\@)
 #define switch_tls	switch_tls_software
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static inline void set_tls(unsigned long val)
 {
arch/arm/include/asm/unified.h +3 -3
index ce9689118dbb9..2cdeafb6afb63 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_UNIFIED_H
 #define __ASM_UNIFIED_H
 
-#if defined(__ASSEMBLY__)
+#if defined(__ASSEMBLER__)
 	.syntax unified
 #else
 __asm__(".syntax unified");
@@ -29,7 +29,7 @@ __asm__(".syntax unified");
 
 #define ARM(x...)
 #define THUMB(x...)	x
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define W(instr)	instr.w
 #else
 #define WASM(instr)	#instr ".w"
@@ -42,7 +42,7 @@ __asm__(".syntax unified");
 
 #define ARM(x...)	x
 #define THUMB(x...)
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define W(instr)	instr
 #else
 #define WASM(instr)	#instr
arch/arm/include/asm/unwind.h +2 -2
index d60b09a5acfc3..071c89b1b4099 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_UNWIND_H
 #define __ASM_UNWIND_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* Unwind reason code according the the ARM EABI documents */
 enum unwind_reason_code {
@@ -44,7 +44,7 @@ void __aeabi_unwind_cpp_pr0(void);
 void __aeabi_unwind_cpp_pr1(void);
 void __aeabi_unwind_cpp_pr2(void);
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 #ifdef CONFIG_ARM_UNWIND
 #define UNWIND(code...)		code
arch/arm/include/asm/v7m.h +2 -2
index 4512f7e1918f0..b334f8009a505 100644
@@ -89,10 +89,10 @@
 #define	V7M_SCB_DCCISW		0x274	/* D-cache clean and invalidate by set-way */
 #define	V7M_SCB_BPIALL		0x278	/* D-cache clean and invalidate by set-way */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 enum reboot_mode;
 
 void armv7m_restart(enum reboot_mode mode, const char *cmd);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
arch/arm/include/asm/vdso.h +2 -2
index 5b85889f82eeb..e7ae5e606fab7 100644
@@ -4,7 +4,7 @@
 
 #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mm_struct;
 
@@ -24,7 +24,7 @@ static inline void arm_install_vdso(struct mm_struct *mm, unsigned long addr)
 
 #endif /* CONFIG_VDSO */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __KERNEL__ */
 
arch/arm/include/asm/vdso/cp15.h +2 -2
index bed16fa1865e9..f5dea30743765 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_CP15_H
 #define __ASM_VDSO_CP15_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_CPU_CP15
 
@@ -33,6 +33,6 @@
 
 #endif /* CONFIG_CPU_CP15 */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_CP15_H */
arch/arm/include/asm/vdso/gettimeofday.h +2 -2
index 592d3d015ca72..25471296313a7 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_GETTIMEOFDAY_H
 #define __ASM_VDSO_GETTIMEOFDAY_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/barrier.h>
 #include <asm/errno.h>
@@ -140,6 +140,6 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
 	return _vdso_data;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/arm/include/asm/vdso/processor.h +2 -2
index 45efb3ff511c9..b24304f248b71 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_PROCESSOR_H
 #define __ASM_VDSO_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)
 #define cpu_relax()						\
@@ -17,6 +17,6 @@
 #define cpu_relax()			barrier()
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_PROCESSOR_H */
arch/arm/include/asm/vdso/vsyscall.h +2 -2
index 705414710dcdb..dce604ccdcca7 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_VDSO_VSYSCALL_H
 #define __ASM_VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <vdso/datapage.h>
 #include <asm/cacheflush.h>
@@ -27,6 +27,6 @@ void __arm_sync_vdso_data(struct vdso_data *vdata)
 /* The asm-generic header needs to be included after the definitions above */
 #include <asm-generic/vdso/vsyscall.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
arch/arm/include/asm/vfp.h +1 -1
index 85ccc422d4d0b..94171e09bda0b 100644
@@ -90,7 +90,7 @@
 #define VFPOPDESC_UNUSED_MASK	(0xFF << VFPOPDESC_UNUSED_BIT)
 #define VFPOPDESC_OPDESC_MASK	(~(VFPOPDESC_LENGTH_MASK | VFPOPDESC_UNUSED_MASK))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 void vfp_disable(void);
 #endif
 
arch/arm/include/asm/virt.h +2 -2
index dd9697b2bde80..719a08fa6a29b 100644
@@ -15,7 +15,7 @@
  */
 #define BOOT_CPU_MODE_MISMATCH	PSR_N_BIT
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/cacheflush.h>
 
 #ifdef CONFIG_ARM_VIRT_EXT
@@ -74,7 +74,7 @@ static inline bool is_kernel_in_hyp_mode(void)
 #define HVC_SET_VECTORS 0
 #define HVC_SOFT_RESTART 1
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #define HVC_STUB_ERR	0xbadca11
 
arch/arm/mach-at91/pm.h +1 -1
index 53bdc9000e447..d5a25cc90f26e 100644
@@ -25,7 +25,7 @@
 #define AT91_PM_ULP1		0x03
 #define	AT91_PM_BACKUP		0x04
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct at91_pm_data {
 	void __iomem *pmc;
 	void __iomem *ramc[2];
arch/arm/mach-exynos/smc.h +2 -2
index 5c30feb8f07d9..5c7730f6259fc 100644
@@ -32,11 +32,11 @@
 #define SMC_REG_CLASS_SFR_W	(0x1 << 30)
 #define SMC_REG_ID_SFR_W(addr)	(SMC_REG_CLASS_SFR_W | ((addr) >> 2))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern void exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* op type for SMC_CMD_SAVE and SMC_CMD_SHUTDOWN */
 #define OP_TYPE_CORE		0x0
arch/arm/mach-footbridge/include/mach/hardware.h +1 -1
index 985ad3a956712..5391848d8c8cc 100644
@@ -79,7 +79,7 @@
 #define CPLD_UNMUTE		2
 #define CPLD_FLASH_WR_ENABLE	1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern raw_spinlock_t nw_gpio_lock;
 extern void nw_gpio_modify_op(unsigned int mask, unsigned int set);
 extern void nw_gpio_modify_io(unsigned int mask, unsigned int in);
arch/arm/mach-imx/hardware.h +1 -1
index 0760fff39a0b3..71f09648c7778 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARCH_MXC_HARDWARE_H__
 #define __ASM_ARCH_MXC_HARDWARE_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/io.h>
 #include <soc/imx/revision.h>
 #endif
arch/arm/mach-imx/mxc.h +1 -1
index fe2d0f5abfcc2..1d13e3959159e 100644
@@ -16,7 +16,7 @@
 
 #define IMX_DDR_TYPE_LPDDR2		1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_SOC_IMX6SL
 static inline bool cpu_is_imx6sl(void)
arch/arm/mach-omap2/control.h +4 -4
index 7e7440533bf90..e4f4b16958084 100644
@@ -18,7 +18,7 @@
 
 #include "am33xx.h"
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define OMAP242X_CTRL_REGADDR(reg)					\
 		OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
 #define OMAP243X_CTRL_REGADDR(reg)					\
@@ -36,7 +36,7 @@
 		OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
 #define AM33XX_CTRL_REGADDR(reg)					\
 		AM33XX_L4_WK_IO_ADDRESS(AM33XX_SCM_BASE + (reg))
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for
@@ -503,7 +503,7 @@
 #define		FEAT_NEON_NONE		1
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_ARCH_OMAP2PLUS
 extern u8 omap_ctrl_readb(u16 offset);
 extern u16 omap_ctrl_readw(u16 offset);
@@ -534,7 +534,7 @@ int omap_control_init(void);
 #define omap_ctrl_writel(x, y)		WARN_ON(1)
 #define omap4_ctrl_pad_writel(x, y)	WARN_ON(1)
 #endif
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */
 
arch/arm/mach-omap2/soc.h +2 -2
index 9e3dbb743e5c4..b3949559edadf 100644
@@ -19,7 +19,7 @@
 #include "am33xx.h"
 #include "omap54xx.h"
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bitops.h>
 #include <linux/of.h>
@@ -501,4 +501,4 @@ level(__##fn);
 #define cpu_is_ti816x()		soc_is_ti816x()
 #define cpu_is_ti81xx()		soc_is_ti81xx()
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
arch/arm/mach-omap2/sram.h +2 -2
index 030cabc39821d..a1d72e014e62b 100644
@@ -3,7 +3,7 @@
  * Interface for functions that need to be run in internal SRAM
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
 				u32 base_cs, u32 force_unlock);
@@ -48,7 +48,7 @@ extern void omap_push_sram_idle(void);
 static inline void omap_push_sram_idle(void) {}
 #endif /* CONFIG_PM */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * OMAP2+: define the SRAM PA addresses.
arch/arm/mach-pxa/irqs.h +1 -1
index 22bf536a462d0..07d7aa3a65065 100644
@@ -94,7 +94,7 @@
 
 #define PXA_NR_IRQS		(IRQ_BOARD_START)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct irq_data;
 struct pt_regs;
 
arch/arm/mach-pxa/pxa-regs.h +1 -1
index ba5120c06b8a5..b56c8899042c4 100644
@@ -31,7 +31,7 @@
 #define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))
 #define io_p2v(x) IOMEM(0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 # define __REG(x)	(*((volatile u32 __iomem *)io_p2v(x)))
 
 /* With indexed regs we don't want to feed the index through io_p2v()
arch/arm/mach-s3c/map-base.h +1 -1
index 463a995b399bc..beb58e6f12e16 100644
@@ -20,7 +20,7 @@
 
 #define S3C_ADDR_BASE	0xF6000000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define S3C_ADDR(x)	((void __iomem __force *)S3C_ADDR_BASE + (x))
 #else
 #define S3C_ADDR(x)	(S3C_ADDR_BASE + (x))
arch/arm/mach-sa1100/include/mach/bitfield.h +1 -1
index f1f0e3387d9c6..e786bf730b31c 100644
@@ -15,7 +15,7 @@
 #ifndef __BITFIELD_H
 #define __BITFIELD_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define UData(Data)	((unsigned long) (Data))
 #else
 #define UData(Data)	(Data)
arch/arm/mach-sa1100/include/mach/hardware.h +1 -1
index 6f2dbdc286632..350e2665ca495 100644
@@ -39,7 +39,7 @@
 
 #define __MREG(x)	IOMEM(io_p2v(x))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 # define __REG(x)	(*((volatile unsigned long __iomem *)io_p2v(x)))
 # define __PREG(x)	(io_v2p((unsigned long)&(x)))
arch/arm/mach-tegra/reset.h +1 -1
index 51265592cb1ae..92a89713d5e57 100644
@@ -21,7 +21,7 @@
 
 #define RESET_DATA(x)	((TEGRA_RESET_##x)*4)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include "irammap.h"
 
arch/arm/mach-tegra/sleep.h +1 -1
index 4718a3cb45a16..e332d261c1dbd 100644
@@ -38,7 +38,7 @@
 #define TEGRA_FLUSH_CACHE_LOUIS	0
 #define TEGRA_FLUSH_CACHE_ALL	1
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 /* waits until the microsecond counter (base) is > rn */
 .macro wait_until, rn, base, tmp
 	add	\rn, \rn, #1
arch/arm/tools/gen-mach-types +1 -1
index cbe1c33bb8710..6ad8f055ba6b5 100644
@@ -29,7 +29,7 @@ END	{
 	  printf(" */\n\n");
 	  printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
 	  printf("#define __ASM_ARM_MACH_TYPE_H\n\n");
-	  printf("#ifndef __ASSEMBLY__\n");
+	  printf("#ifndef __ASSEMBLER__\n");
 	  printf("/* The type of machine we're running on */\n");
 	  printf("extern unsigned int __machine_arch_type;\n");
 	  printf("#endif\n\n");
drivers/memory/emif.h +2 -2
index 55aeb36a5bf24..5dfb09adb0960 100644
@@ -558,7 +558,7 @@
 #define EMIF_SRAM_AM33_REG_LAYOUT			0x00000000
 #define EMIF_SRAM_AM43_REG_LAYOUT			0x00000001
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Structure containing shadow of important registers in EMIF
  * The calculation function fills in this structure to be later used for
@@ -603,5 +603,5 @@ void ti_emif_enter_sr(void);
 void ti_emif_exit_sr(void);
 void ti_emif_abort_sr(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __EMIF_H */
Signature · 1 line
2.48.1
#12 lore raw

PATCH 8/41 arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/include/uapi/asm/kvm.h        | 2 +-
 arch/arm64/include/uapi/asm/ptrace.h     | 4 ++--
 arch/arm64/include/uapi/asm/sigcontext.h | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/include/uapi/asm/kvm.h +1 -1
index 568bf858f3198..f1ee246f7b14e 100644
@@ -31,7 +31,7 @@
 #define KVM_SPSR_FIQ	4
 #define KVM_NR_SPSR	5
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/psci.h>
 #include <linux/types.h>
 #include <asm/ptrace.h>
arch/arm64/include/uapi/asm/ptrace.h +2 -2
index 0f39ba4f3efd4..6fed93fb2536f 100644
@@ -80,7 +80,7 @@
 #define PTRACE_PEEKMTETAGS	  33
 #define PTRACE_POKEMTETAGS	  34
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * User structures for general purpose, floating point and debug registers.
@@ -332,6 +332,6 @@ struct user_gcs {
 	__u64 gcspr_el0;
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI__ASM_PTRACE_H */
arch/arm64/include/uapi/asm/sigcontext.h +2 -2
index d42f7a92238b9..e29bf3e2d0ccd 100644
@@ -17,7 +17,7 @@
 #ifndef _UAPI__ASM_SIGCONTEXT_H
 #define _UAPI__ASM_SIGCONTEXT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -192,7 +192,7 @@ struct gcs_context {
 	__u64 reserved;
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #include <asm/sve_context.h>
 
Signature · 1 line
2.48.1
maintainer
#13 lore raw

Re: [PATCH 08/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Quoted 6 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/include/uapi/asm/kvm.h        | 2 +-
 arch/arm64/include/uapi/asm/ptrace.h     | 4 ++--
 arch/arm64/include/uapi/asm/sigcontext.h | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Is there a risk of breaking userspace with this? I wonder if it would be more conservative to do something like:

#if !defined(__ASSEMBLY__) && !defined(__ASSEMBLER__)

so that if somebody is doing '#define __ASSEMBLY__' then they get the same behaviour as today.

Or maybe we don't care?

Will

maintainer
#14 lore raw

Re: [PATCH 08/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Quoted 19 lines · Will Deacon
Quoted 6 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/include/uapi/asm/kvm.h        | 2 +-
 arch/arm64/include/uapi/asm/ptrace.h     | 4 ++--
 arch/arm64/include/uapi/asm/sigcontext.h | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Is there a risk of breaking userspace with this? I wonder if it would be more conservative to do something like:

Quoted 6 lines

#if !defined(__ASSEMBLY__) && !defined(__ASSEMBLER__)

so that if somebody is doing '#define __ASSEMBLY__' then they get the same behaviour as today.

Or maybe we don't care?

I think the main risk we would have is user applications relying on the __ASSEMBLER__ checks in new kernel headers and not defining __ASSEMBLY__. This would result in the application not building against old kernel headers that only check against __ASSEMBLY__.

Checking for both in the kernel headers does not solve this problem, and I think we can still decide that we don't care:
in the worst case, an application using the headers from assembly will have to get fixed later when it needs to be built against old headers.

I checked that old gcc versions pass __ASSEMBLY__ at least as far back as gcc-2.95, and it should be completely safe to assume that no older gcc versions would be used on kernel headers, and they probably would choke on c99 features like 'long long'. I would also assume that any other compiler that may be used to include kernel headers has to have enough gcc compatibility to define all the common macros.

Arnd

maintainer
#15 lore raw

Re: [PATCH 08/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Quoted 25 lines · Arnd Bergmann
Quoted 24 lines · Will Deacon
Quoted 6 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/include/uapi/asm/kvm.h        | 2 +-
 arch/arm64/include/uapi/asm/ptrace.h     | 4 ++--
 arch/arm64/include/uapi/asm/sigcontext.h | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Is there a risk of breaking userspace with this? I wonder if it would be more conservative to do something like:

#if !defined(__ASSEMBLY__) && !defined(__ASSEMBLER__)

so that if somebody is doing '#define __ASSEMBLY__' then they get the same behaviour as today.

Quoted 6 lines
Quoted 1 line

Or maybe we don't care?

I think the main risk we would have is user applications relying on the __ASSEMBLER__ checks in new kernel headers and not defining __ASSEMBLY__. This would result in the application not building against old kernel headers that only check against __ASSEMBLY__.

Hmm. I hadn't thought about the case of old headers :/

A quick Debian codesearch shows that glibc might #define __ASSEMBLY__ for some arch-specific headers:

https://codesearch.debian.net/search?q=%23define+__ASSEMBLY__&literal=1

which is what I was more worried about.

Quoted 5 lines

Checking for both in the kernel headers does not solve this problem, and I think we can still decide that we don't care:
in the worst case, an application using the headers from assembly will have to get fixed later when it needs to be built against old headers.

Old headers might also just be missing definitions that the application wants, so I suppose there's always the potential for some manual effort in that case.

Will

#16 lore raw

Re: [PATCH 08/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Quoted 33 lines · Will Deacon
Quoted 25 lines · Arnd Bergmann
Quoted 24 lines · Will Deacon
Quoted 6 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/include/uapi/asm/kvm.h        | 2 +-
  arch/arm64/include/uapi/asm/ptrace.h     | 4 ++--
  arch/arm64/include/uapi/asm/sigcontext.h | 4 ++--
  3 files changed, 5 insertions(+), 5 deletions(-)

Is there a risk of breaking userspace with this? I wonder if it would be more conservative to do something like:

#if !defined(__ASSEMBLY__) && !defined(__ASSEMBLER__)

so that if somebody is doing '#define __ASSEMBLY__' then they get the same behaviour as today.

Quoted 6 lines
Quoted 1 line

Or maybe we don't care?

I think the main risk we would have is user applications relying on the __ASSEMBLER__ checks in new kernel headers and not defining __ASSEMBLY__. This would result in the application not building against old kernel headers that only check against __ASSEMBLY__.

Quoted 8 lines

Hmm. I hadn't thought about the case of old headers :/

A quick Debian codesearch shows that glibc might #define __ASSEMBLY__ for some arch-specific headers:

https://codesearch.debian.net/search?q=%23define+__ASSEMBLY__&literal=1

which is what I was more worried about.

Since both, GCC and Clang, define __ASSEMBLER__ since a long time (Arnd checked GCC 2.95, and I checked that at least Clang 7.0 still has it), I think the only problem might be other compiler toolchains that might not set __ASSEMBLER__ automatically. I just checked Tiny-C 0.9.27, and that also sets __ASSEMBLER__ already. And according to https://github.com/IanHarvey/pcc/blob/master/cc/cc/cc.1#L405 it is also set in PCC.

I haven't spotted it in LCC though (which seems to be an old C89 compiler if I got it right). So if we are worried about such exotic old compilers, it's maybe better to check both, __ASSEMBLY__ and __ASSEMBLER__ in the uapi files? Or would it be ok to force those few people to set __ASSEMBLER__ manually in their Makefiles (just like they had to do before with __ASSEMBLY__) in case they want to compile assembler code with such exotic compilers and new kernel headers?

Thomas

#17 lore raw

Re: [PATCH 08/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Will Deacon
Quoted 33 lines · Will Deacon
Quoted 25 lines · Arnd Bergmann
Quoted 24 lines · Will Deacon
Quoted 6 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
  arch/arm64/include/uapi/asm/kvm.h        | 2 +-
  arch/arm64/include/uapi/asm/ptrace.h     | 4 ++--
  arch/arm64/include/uapi/asm/sigcontext.h | 4 ++--
  3 files changed, 5 insertions(+), 5 deletions(-)

Is there a risk of breaking userspace with this? I wonder if it would be more conservative to do something like:

#if !defined(__ASSEMBLY__) && !defined(__ASSEMBLER__)

so that if somebody is doing '#define __ASSEMBLY__' then they get the same behaviour as today.

Quoted 6 lines
Quoted 1 line

Or maybe we don't care?

I think the main risk we would have is user applications relying on the __ASSEMBLER__ checks in new kernel headers and not defining __ASSEMBLY__. This would result in the application not building against old kernel headers that only check against __ASSEMBLY__.

Quoted 8 lines

Hmm. I hadn't thought about the case of old headers :/

A quick Debian codesearch shows that glibc might #define __ASSEMBLY__ for some arch-specific headers:

https://codesearch.debian.net/search?q=%23define+__ASSEMBLY__&literal=1

which is what I was more worried about.

Hi!

FWIW, the x86 patches have been merged since kernel v6.15, and as far as I know, there haven't been any complaints about the change there yet. Thus I assume the changes should be ok.

So I rebased the arm64 patch now, too, and resend them separately as a v2:

https://lore.kernel.org/lkml/[email protected]/

Thomas

#18 lore raw

PATCH 9/41 arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a mostly mechanical patch (done with a simple "sed -i" statement), except for the following files where comments with mis-spelled macros were tweaked manually:

arch/arm64/include/asm/stacktrace/frame.h
arch/arm64/include/asm/kvm_ptrauth.h
arch/arm64/include/asm/debug-monitors.h
arch/arm64/include/asm/esr.h
arch/arm64/include/asm/scs.h
arch/arm64/include/asm/memory.h

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/include/asm/alternative-macros.h       |  8 ++++----
 arch/arm64/include/asm/alternative.h              |  4 ++--
 arch/arm64/include/asm/arch_gicv3.h               |  4 ++--
 arch/arm64/include/asm/asm-extable.h              |  6 +++---
 arch/arm64/include/asm/assembler.h                |  2 +-
 arch/arm64/include/asm/barrier.h                  |  4 ++--
 arch/arm64/include/asm/cache.h                    |  4 ++--
 arch/arm64/include/asm/cpucaps.h                  |  4 ++--
 arch/arm64/include/asm/cpufeature.h               |  4 ++--
 arch/arm64/include/asm/cputype.h                  |  4 ++--
 arch/arm64/include/asm/current.h                  |  4 ++--
 arch/arm64/include/asm/debug-monitors.h           |  4 ++--
 arch/arm64/include/asm/el2_setup.h                |  2 +-
 arch/arm64/include/asm/elf.h                      |  4 ++--
 arch/arm64/include/asm/esr.h                      |  4 ++--
 arch/arm64/include/asm/fixmap.h                   |  4 ++--
 arch/arm64/include/asm/fpsimd.h                   |  2 +-
 arch/arm64/include/asm/ftrace.h                   |  6 +++---
 arch/arm64/include/asm/gpr-num.h                  |  6 +++---
 arch/arm64/include/asm/hwcap.h                    |  2 +-
 arch/arm64/include/asm/image.h                    |  4 ++--
 arch/arm64/include/asm/insn.h                     |  4 ++--
 arch/arm64/include/asm/jump_label.h               |  4 ++--
 arch/arm64/include/asm/kasan.h                    |  2 +-
 arch/arm64/include/asm/kexec.h                    |  4 ++--
 arch/arm64/include/asm/kgdb.h                     |  4 ++--
 arch/arm64/include/asm/kvm_asm.h                  |  4 ++--
 arch/arm64/include/asm/kvm_mmu.h                  |  4 ++--
 arch/arm64/include/asm/kvm_mte.h                  |  4 ++--
 arch/arm64/include/asm/kvm_ptrauth.h              |  6 +++---
 arch/arm64/include/asm/linkage.h                  |  2 +-
 arch/arm64/include/asm/memory.h                   |  4 ++--
 arch/arm64/include/asm/mmu.h                      |  4 ++--
 arch/arm64/include/asm/mmu_context.h              |  4 ++--
 arch/arm64/include/asm/mte-kasan.h                |  4 ++--
 arch/arm64/include/asm/mte.h                      |  4 ++--
 arch/arm64/include/asm/page.h                     |  4 ++--
 arch/arm64/include/asm/pgtable-prot.h             |  4 ++--
 arch/arm64/include/asm/pgtable.h                  |  4 ++--
 arch/arm64/include/asm/proc-fns.h                 |  4 ++--
 arch/arm64/include/asm/processor.h                |  4 ++--
 arch/arm64/include/asm/ptrace.h                   |  4 ++--
 arch/arm64/include/asm/rsi_smc.h                  |  4 ++--
 arch/arm64/include/asm/rwonce.h                   |  4 ++--
 arch/arm64/include/asm/scs.h                      |  4 ++--
 arch/arm64/include/asm/sdei.h                     |  4 ++--
 arch/arm64/include/asm/smp.h                      |  4 ++--
 arch/arm64/include/asm/spectre.h                  |  4 ++--
 arch/arm64/include/asm/stacktrace/frame.h         |  4 ++--
 arch/arm64/include/asm/sysreg.h                   | 10 +++++-----
 arch/arm64/include/asm/system_misc.h              |  4 ++--
 arch/arm64/include/asm/thread_info.h              |  2 +-
 arch/arm64/include/asm/tlbflush.h                 |  2 +-
 arch/arm64/include/asm/vdso.h                     |  4 ++--
 arch/arm64/include/asm/vdso/compat_barrier.h      |  4 ++--
 arch/arm64/include/asm/vdso/compat_gettimeofday.h |  4 ++--
 arch/arm64/include/asm/vdso/getrandom.h           |  4 ++--
 arch/arm64/include/asm/vdso/gettimeofday.h        |  4 ++--
 arch/arm64/include/asm/vdso/processor.h           |  4 ++--
 arch/arm64/include/asm/vdso/vsyscall.h            |  4 ++--
 arch/arm64/include/asm/virt.h                     |  4 ++--
 tools/arch/arm64/include/asm/cputype.h            |  4 ++--
 tools/arch/arm64/include/asm/esr.h                |  4 ++--
 tools/arch/arm64/include/asm/gpr-num.h            |  6 +++---
 tools/arch/arm64/include/asm/sysreg.h             | 10 +++++-----
 tools/arch/arm64/include/uapi/asm/kvm.h           |  2 +-
 66 files changed, 136 insertions(+), 136 deletions(-)
arch/arm64/include/asm/alternative-macros.h +4 -4
index c8c77f9e36d60..8624166248528 100644
@@ -19,7 +19,7 @@
 #error "cpucaps have overflown ARM64_CB_BIT"
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/stringify.h>
 
@@ -207,7 +207,7 @@ alternative_endif
 #define _ALTERNATIVE_CFG(insn1, insn2, cap, cfg, ...)	\
 	alternative_insn insn1, insn2, cap, IS_ENABLED(cfg)
 
-#endif  /*  __ASSEMBLY__  */
+#endif  /*  __ASSEMBLER__  */
 
 /*
  * Usage: asm(ALTERNATIVE(oldinstr, newinstr, cpucap));
@@ -219,7 +219,7 @@ alternative_endif
 #define ALTERNATIVE(oldinstr, newinstr, ...)   \
 	_ALTERNATIVE_CFG(oldinstr, newinstr, __VA_ARGS__, 1)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -263,6 +263,6 @@ alternative_has_cap_unlikely(const unsigned long cpucap)
 	return true;
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ALTERNATIVE_MACROS_H */
arch/arm64/include/asm/alternative.h +2 -2
index 00d97b8a757f4..607a21e7dd9ce 100644
@@ -4,7 +4,7 @@
 
 #include <asm/alternative-macros.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/init.h>
 #include <linux/types.h>
@@ -34,5 +34,5 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
 void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
 		       __le32 *updptr, int nr_inst);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_ALTERNATIVE_H */
arch/arm64/include/asm/arch_gicv3.h +2 -2
index 9e96f024b2f19..d20b03931a8d1 100644
@@ -9,7 +9,7 @@
 
 #include <asm/sysreg.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/irqchip/arm-gic-common.h>
 #include <linux/stringify.h>
@@ -188,5 +188,5 @@ static inline bool gic_has_relaxed_pmr_sync(void)
 	return cpus_have_cap(ARM64_HAS_GIC_PRIO_RELAXED_SYNC);
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_ARCH_GICV3_H */
arch/arm64/include/asm/asm-extable.h +3 -3
index b8a5861dc7b77..98f3936352977 100644
@@ -23,7 +23,7 @@
 #define EX_DATA_REG_ADDR_SHIFT	5
 #define EX_DATA_REG_ADDR	GENMASK(9, 5)
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #define __ASM_EXTABLE_RAW(insn, fixup, type, data)	\
 	.pushsection	__ex_table, "a";		\
@@ -69,7 +69,7 @@
 	.endif
 	.endm
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #include <linux/stringify.h>
 
@@ -124,6 +124,6 @@
 			    EX_DATA_REG(ADDR, addr)				\
 			  ")")
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ASM_EXTABLE_H */
arch/arm64/include/asm/assembler.h +1 -1
index ad63457a05c5b..cb644585049dd 100644
@@ -5,7 +5,7 @@
  * Copyright (C) 1996-2000 Russell King
  * Copyright (C) 2012 ARM Ltd.
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #error "Only include this from assembly code"
 #endif
 
arch/arm64/include/asm/barrier.h +2 -2
index 1ca947d5c9396..0b188ae7b62de 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_BARRIER_H
 #define __ASM_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/kasan-checks.h>
 
@@ -218,6 +218,6 @@ do {									\
 
 #include <asm-generic/barrier.h>
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* __ASM_BARRIER_H */
arch/arm64/include/asm/cache.h +2 -2
index 06a4670bdb0b9..a48050248c52a 100644
@@ -35,7 +35,7 @@
 #define ARCH_DMA_MINALIGN	(128)
 #define ARCH_KMALLOC_MINALIGN	(8)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bitops.h>
 #include <linux/kasan-enabled.h>
@@ -118,6 +118,6 @@ static inline u32 __attribute_const__ read_cpuid_effective_cachetype(void)
 	return ctr;
 }
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif
arch/arm64/include/asm/cpucaps.h +2 -2
index 0b5ca6e0eb093..440ed52887e84 100644
@@ -5,7 +5,7 @@
 
 #include <asm/cpucap-defs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 /*
  * Check whether a cpucap is possible at compiletime.
@@ -75,6 +75,6 @@ cpucap_is_possible(const unsigned int cap)
 
 	return true;
 }
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_CPUCAPS_H */
arch/arm64/include/asm/cpufeature.h +2 -2
index e0e4478f5fb52..63df34f189d03 100644
@@ -19,7 +19,7 @@
 #define ARM64_SW_FEATURE_OVERRIDE_HVHE		4
 #define ARM64_SW_FEATURE_OVERRIDE_RODATA_OFF	8
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bug.h>
 #include <linux/jump_label.h>
@@ -1066,6 +1066,6 @@ static inline bool cpu_has_lpa2(void)
 #endif
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arm64/include/asm/cputype.h +2 -2
index 6f3f4142e214f..f9d5f025d8315 100644
@@ -225,7 +225,7 @@
 #define MIDR_FUJITSU_ERRATUM_010001_MASK	(~MIDR_CPU_VAR_REV(1, 0))
 #define TCR_CLEAR_FUJITSU_ERRATUM_010001	(TCR_NFD1 | TCR_NFD0)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/sysreg.h>
 
@@ -310,6 +310,6 @@ static inline u32 __attribute_const__ read_cpuid_cachetype(void)
 {
 	return read_cpuid(CTR_EL0);
 }
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arm64/include/asm/current.h +2 -2
index 54ceae0874c7e..c92912eaf1868 100644
@@ -4,7 +4,7 @@
 
 #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct task_struct;
 
@@ -23,7 +23,7 @@ static __always_inline struct task_struct *get_current(void)
 
 #define current get_current()
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_CURRENT_H */
 
arch/arm64/include/asm/debug-monitors.h +2 -2
index 8f6ba31b86582..28d250be1b8d1 100644
@@ -54,7 +54,7 @@
 #define AARCH32_BREAK_THUMB2_LO	0xf7f0
 #define AARCH32_BREAK_THUMB2_HI	0xa000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct task_struct;
 
 #define DBG_ARCH_ID_RESERVED	0	/* In case of ptrace ABI updates. */
@@ -120,5 +120,5 @@ int aarch32_break_handler(struct pt_regs *regs);
 
 void debug_traps_init(void);
 
-#endif	/* __ASSEMBLY */
+#endif	/* __ASSEMBLER__ */
 #endif	/* __ASM_DEBUG_MONITORS_H */
arch/arm64/include/asm/el2_setup.h +1 -1
index 555c613fd2324..ec90861bc8612 100644
@@ -7,7 +7,7 @@
 #ifndef __ARM_KVM_INIT_H__
 #define __ARM_KVM_INIT_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #error Assembly-only header
 #endif
 
arch/arm64/include/asm/elf.h +2 -2
index 3f93f4eef9530..d2779d604c7be 100644
@@ -133,7 +133,7 @@
 #define ELF_ET_DYN_BASE		(2 * DEFAULT_MAP_WINDOW_64 / 3)
 #endif /* CONFIG_ARM64_FORCE_52BIT */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <uapi/linux/elf.h>
 #include <linux/bug.h>
@@ -293,6 +293,6 @@ static inline int arch_check_elf(void *ehdr, bool has_interp,
 	return 0;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
arch/arm64/include/asm/esr.h +2 -2
index d1b1a33f9a8b0..7ded03ec90813 100644
@@ -412,7 +412,7 @@
 #define ESR_ELx_IT_GCSPOPCX		6
 #define ESR_ELx_IT_GCSPOPX		7
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/types.h>
 
 static inline unsigned long esr_brk_comment(unsigned long esr)
@@ -477,6 +477,6 @@ static inline bool esr_iss_is_eretab(unsigned long esr)
 }
 
 const char *esr_get_class_string(unsigned long esr);
-#endif /* __ASSEMBLY */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ESR_H */
arch/arm64/include/asm/fixmap.h +2 -2
index 87e307804b99c..d6c85783fed37 100644
@@ -15,7 +15,7 @@
 #ifndef _ASM_ARM64_FIXMAP_H
 #define _ASM_ARM64_FIXMAP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/kernel.h>
 #include <linux/math.h>
 #include <linux/sizes.h>
@@ -111,5 +111,5 @@ extern void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t pr
 
 #include <asm-generic/fixmap.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* _ASM_ARM64_FIXMAP_H */
arch/arm64/include/asm/fpsimd.h +1 -1
index f2a84efc36185..5a092accf97d7 100644
@@ -11,7 +11,7 @@
 #include <asm/sigcontext.h>
 #include <asm/sysreg.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bitmap.h>
 #include <linux/build_bug.h>
arch/arm64/include/asm/ftrace.h +3 -3
index bfe3ce9df1978..42f04f91f74dd 100644
@@ -37,7 +37,7 @@
  */
 #define ARCH_FTRACE_SHIFT_STACK_TRACER 1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/compat.h>
 
 extern void _mcount(unsigned long);
@@ -216,9 +216,9 @@ static inline bool arch_syscall_match_sym_name(const char *sym,
 	 */
 	return !strcmp(sym + 8, name);
 }
-#endif /* ifndef __ASSEMBLY__ */
+#endif /* ifndef __ASSEMBLER__ */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 
 void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
arch/arm64/include/asm/gpr-num.h +3 -3
index 05da4a7c5788f..a114e4f8209b0 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_GPR_NUM_H
 #define __ASM_GPR_NUM_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.irp	num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
 	.equ	.L__gpr_num_x\num, \num
@@ -11,7 +11,7 @@
 	.equ	.L__gpr_num_xzr, 31
 	.equ	.L__gpr_num_wzr, 31
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #define __DEFINE_ASM_GPR_NUMS					\
 "	.irp	num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n" \
@@ -21,6 +21,6 @@
 "	.equ	.L__gpr_num_xzr, 31\n"				\
 "	.equ	.L__gpr_num_wzr, 31\n"
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_GPR_NUM_H */
arch/arm64/include/asm/hwcap.h +1 -1
index 1c3f9617d54fe..b10da333b95e2 100644
@@ -46,7 +46,7 @@
 #define COMPAT_HWCAP2_SB	(1 << 5)
 #define COMPAT_HWCAP2_SSBS	(1 << 6)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/log2.h>
 
 /*
arch/arm64/include/asm/image.h +2 -2
index c09cf942dc92e..9ba85173f8576 100644
@@ -20,7 +20,7 @@
 #define ARM64_IMAGE_FLAG_PAGE_SIZE_64K		3
 #define ARM64_IMAGE_FLAG_PHYS_BASE		1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define arm64_image_flag_field(flags, field) \
 				(((flags) >> field##_SHIFT) & field##_MASK)
@@ -54,6 +54,6 @@ struct arm64_image_header {
 	__le32 res5;
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_IMAGE_H */
arch/arm64/include/asm/insn.h +2 -2
index e390c432f546e..765cc37609ab8 100644
@@ -12,7 +12,7 @@
 
 #include <asm/insn-def.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 enum aarch64_insn_hint_cr_op {
 	AARCH64_INSN_HINT_NOP	= 0x0 << 5,
@@ -721,6 +721,6 @@ u32 aarch32_insn_mcr_extract_crm(u32 insn);
 typedef bool (pstate_check_t)(unsigned long);
 extern pstate_check_t * const aarch32_opcode_cond_checks[16];
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif	/* __ASM_INSN_H */
arch/arm64/include/asm/jump_label.h +2 -2
index 424ed421cd979..0cb211d3607d3 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_JUMP_LABEL_H
 #define __ASM_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <asm/insn.h>
@@ -58,5 +58,5 @@ static __always_inline bool arch_static_branch_jump(struct static_key * const ke
 	return true;
 }
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif	/* __ASM_JUMP_LABEL_H */
arch/arm64/include/asm/kasan.h +1 -1
index e1b57c13f8a41..b167e9d3da910 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_KASAN_H
 #define __ASM_KASAN_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/linkage.h>
 #include <asm/memory.h>
arch/arm64/include/asm/kexec.h +2 -2
index 4d9cc7a76d9ca..892e5bebda957 100644
@@ -25,7 +25,7 @@
 
 #define KEXEC_ARCH KEXEC_ARCH_AARCH64
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /**
  * crash_setup_regs() - save registers for the panic kernel
@@ -130,6 +130,6 @@ extern int load_other_segments(struct kimage *image,
 		char *cmdline);
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/arm64/include/asm/kgdb.h +2 -2
index 21fc85e9d2bed..201d43fee673c 100644
@@ -14,7 +14,7 @@
 #include <linux/ptrace.h>
 #include <asm/debug-monitors.h>
 
-#ifndef	__ASSEMBLY__
+#ifndef	__ASSEMBLER__
 
 static inline void arch_kgdb_breakpoint(void)
 {
@@ -24,7 +24,7 @@ static inline void arch_kgdb_breakpoint(void)
 extern void kgdb_handle_bus_error(void);
 extern int kgdb_fault_expected;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * gdb remote procotol (well most versions of it) expects the following
arch/arm64/include/asm/kvm_asm.h +2 -2
index bec227f9500a0..2ea508492ef00 100644
@@ -46,7 +46,7 @@
 
 #define __KVM_HOST_SMCCC_FUNC___kvm_hyp_init			0
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/mm.h>
 
@@ -301,7 +301,7 @@ void kvm_compute_final_ctr_el0(struct alt_instr *alt,
 void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr_virt,
 	u64 elr_phys, u64 par, uintptr_t vcpu, u64 far, u64 hpfar);
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 .macro get_host_ctxt reg, tmp
 	adr_this_cpu \reg, kvm_host_data, \tmp
arch/arm64/include/asm/kvm_mmu.h +2 -2
index b98ac6aa631f4..e0f4735933e5a 100644
@@ -49,7 +49,7 @@
  * mappings, and none of this applies in that case.
  */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/alternative.h>
 
@@ -377,5 +377,5 @@ void kvm_s2_ptdump_create_debugfs(struct kvm *kvm);
 static inline void kvm_s2_ptdump_create_debugfs(struct kvm *kvm) {}
 #endif /* CONFIG_PTDUMP_STAGE2_DEBUGFS */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ARM64_KVM_MMU_H__ */
arch/arm64/include/asm/kvm_mte.h +2 -2
index de002636eb1fb..3171963ad25ce 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_KVM_MTE_H
 #define __ASM_KVM_MTE_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/sysreg.h>
 
@@ -62,5 +62,5 @@ alternative_else_nop_endif
 .endm
 
 #endif /* CONFIG_ARM64_MTE */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_KVM_MTE_H */
arch/arm64/include/asm/kvm_ptrauth.h +3 -3
index 6199c9f7ec6ed..e50987b32483b 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_KVM_PTRAUTH_H
 #define __ASM_KVM_PTRAUTH_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/sysreg.h>
 
@@ -100,7 +100,7 @@ alternative_else_nop_endif
 .endm
 #endif /* CONFIG_ARM64_PTR_AUTH */
 
-#else  /* !__ASSEMBLY */
+#else  /* !__ASSEMBLER__ */
 
 #define __ptrauth_save_key(ctxt, key)					\
 	do {								\
@@ -120,5 +120,5 @@ alternative_else_nop_endif
 		__ptrauth_save_key(ctxt, APGA);				\
 	} while(0)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_KVM_PTRAUTH_H */
arch/arm64/include/asm/linkage.h +1 -1
index d3acd9c875091..40bd17add5397 100644
@@ -1,7 +1,7 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #include <asm/assembler.h>
 #endif
 
arch/arm64/include/asm/memory.h +2 -2
index 717829df294ea..4db4f1737d9d2 100644
@@ -211,7 +211,7 @@
  */
 #define TRAMP_SWAPPER_OFFSET	(2 * PAGE_SIZE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bitops.h>
 #include <linux/compiler.h>
@@ -425,7 +425,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
 })
 
 void dump_mem_limit(void);
-#endif /* !ASSEMBLY */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Given that the GIC architecture permits ITS implementations that can only be
arch/arm64/include/asm/mmu.h +2 -2
index 662471cfc5369..20e26b855ebcf 100644
@@ -12,7 +12,7 @@
 #define USER_ASID_FLAG	(UL(1) << USER_ASID_BIT)
 #define TTBR_ASID_MASK	(UL(0xffff) << 48)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/refcount.h>
 #include <asm/cpufeature.h>
@@ -109,5 +109,5 @@ static inline bool kaslr_requires_kpti(void)
 	return true;
 }
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 #endif
arch/arm64/include/asm/mmu_context.h +2 -2
index 0dbe3b29049b7..b4b361a4ec62c 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_MMU_CONTEXT_H
 #define __ASM_MMU_CONTEXT_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/sched.h>
@@ -330,6 +330,6 @@ static inline void deactivate_mm(struct task_struct *tsk,
 
 #include <asm-generic/mmu_context.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* !__ASM_MMU_CONTEXT_H */
arch/arm64/include/asm/mte-kasan.h +2 -2
index 2e98028c19658..f9d69fe0516e9 100644
@@ -9,7 +9,7 @@
 #include <asm/cputype.h>
 #include <asm/mte-def.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -253,6 +253,6 @@ static inline void mte_enable_kernel_asymm(void)
 
 #endif /* CONFIG_ARM64_MTE */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_MTE_KASAN_H  */
arch/arm64/include/asm/mte.h +2 -2
index 6567df8ec8ca8..d9ee5c25010e8 100644
@@ -8,7 +8,7 @@
 #include <asm/compiler.h>
 #include <asm/mte-def.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bitfield.h>
 #include <linux/kasan-enabled.h>
@@ -282,5 +282,5 @@ static inline void mte_check_tfsr_exit(void)
 }
 #endif /* CONFIG_KASAN_HW_TAGS */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_MTE_H  */
arch/arm64/include/asm/page.h +2 -2
index 2312e6ee595fd..0370a1534abc0 100644
@@ -10,7 +10,7 @@
 
 #include <asm/page-def.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/personality.h> /* for READ_IMPLIES_EXEC */
 #include <linux/types.h> /* for gfp_t */
@@ -45,7 +45,7 @@ int pfn_is_map_memory(unsigned long pfn);
 
 #include <asm/memory.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define VM_DATA_DEFAULT_FLAGS	(VM_DATA_FLAGS_TSK_EXEC | VM_MTE_ALLOWED)
 
arch/arm64/include/asm/pgtable-prot.h +2 -2
index a95f1f77bb39a..399c215ed3c5f 100644
@@ -63,7 +63,7 @@
 #define _PAGE_READONLY_EXEC	(_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN)
 #define _PAGE_EXECONLY		(_PAGE_DEFAULT | PTE_RDONLY | PTE_NG | PTE_PXN)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/cpufeature.h>
 #include <asm/pgtable-types.h>
@@ -128,7 +128,7 @@ static inline bool __pure lpa2_is_enabled(void)
 #define PAGE_READONLY_EXEC	__pgprot(_PAGE_READONLY_EXEC)
 #define PAGE_EXECONLY		__pgprot(_PAGE_EXECONLY)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #define pte_pi_index(pte) ( \
 	((pte & BIT(PTE_PI_IDX_3)) >> (PTE_PI_IDX_3 - 3)) | \
arch/arm64/include/asm/pgtable.h +2 -2
index 0b2a2ad1b9e83..b1810bdaf05a8 100644
@@ -30,7 +30,7 @@
 
 #define vmemmap			((struct page *)VMEMMAP_START - (memstart_addr >> PAGE_SHIFT))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/cmpxchg.h>
 #include <asm/fixmap.h>
@@ -1825,6 +1825,6 @@ static inline void clear_young_dirty_ptes(struct vm_area_struct *vma,
 
 #endif /* CONFIG_ARM64_CONTPTE */
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_PGTABLE_H */
arch/arm64/include/asm/proc-fns.h +2 -2
index 0d5d1f0525eb3..ab78a78821a2d 100644
@@ -9,7 +9,7 @@
 #ifndef __ASM_PROCFNS_H
 #define __ASM_PROCFNS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/page.h>
 
@@ -21,5 +21,5 @@ extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr);
 
 #include <asm/memory.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_PROCFNS_H */
arch/arm64/include/asm/processor.h +2 -2
index 1bf1a3b16e886..049a8bbdfd130 100644
@@ -23,7 +23,7 @@
 #define MTE_CTRL_TCF_ASYNC		(1UL << 17)
 #define MTE_CTRL_TCF_ASYMM		(1UL << 18)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/build_bug.h>
 #include <linux/cache.h>
@@ -435,5 +435,5 @@ int set_tsc_mode(unsigned int val);
 #define GET_TSC_CTL(adr)        get_tsc_mode((adr))
 #define SET_TSC_CTL(val)        set_tsc_mode((val))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_PROCESSOR_H */
arch/arm64/include/asm/ptrace.h +2 -2
index 47ff8654c5ec1..d4242221b99e7 100644
@@ -94,7 +94,7 @@
  */
 #define NO_SYSCALL (-1)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/bug.h>
 #include <linux/types.h>
 
@@ -364,5 +364,5 @@ static inline void procedure_link_pointer_set(struct pt_regs *regs,
 
 extern unsigned long profile_pc(struct pt_regs *regs);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif
arch/arm64/include/asm/rsi_smc.h +2 -2
index 6cb070eca9e9b..e19253f96c940 100644
@@ -122,7 +122,7 @@
  */
 #define SMC_RSI_ATTESTATION_TOKEN_CONTINUE	SMC_RSI_FID(0x195)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct realm_config {
 	union {
@@ -142,7 +142,7 @@ struct realm_config {
 	 */
 } __aligned(0x1000);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * Read configuration for the current Realm.
arch/arm64/include/asm/rwonce.h +2 -2
index 56f7b1d4d54b9..9760dda9c236d 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_RWONCE_H
 #define __ASM_RWONCE_H
 
-#if defined(CONFIG_LTO) && !defined(__ASSEMBLY__)
+#if defined(CONFIG_LTO) && !defined(__ASSEMBLER__)
 
 #include <linux/compiler_types.h>
 #include <asm/alternative-macros.h>
@@ -66,7 +66,7 @@
 })
 
 #endif	/* !BUILD_VDSO */
-#endif	/* CONFIG_LTO && !__ASSEMBLY__ */
+#endif	/* CONFIG_LTO && !__ASSEMBLER__ */
 
 #include <asm-generic/rwonce.h>
 
arch/arm64/include/asm/scs.h +2 -2
index a76f9b387a269..d31b128f683f6 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_SCS_H
 #define _ASM_SCS_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/asm-offsets.h>
 #include <asm/sysreg.h>
@@ -55,6 +55,6 @@ enum {
 
 int __pi_scs_patch(const u8 eh_frame[], int size);
 
-#endif /* __ASSEMBLY __ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_SCS_H */
arch/arm64/include/asm/sdei.h +2 -2
index 484cb6972e99a..b2248bd3cb58f 100644
@@ -9,7 +9,7 @@
 
 #define SDEI_STACK_SIZE		IRQ_STACK_SIZE
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/linkage.h>
 #include <linux/preempt.h>
@@ -49,5 +49,5 @@ unsigned long do_sdei_event(struct pt_regs *regs,
 unsigned long sdei_arch_get_entry_point(int conduit);
 #define sdei_arch_get_entry_point(x)	sdei_arch_get_entry_point(x)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif	/* __ASM_SDEI_H */
arch/arm64/include/asm/smp.h +2 -2
index 2510eec026f7e..85fbe02b3b9f8 100644
@@ -23,7 +23,7 @@
 #define CPU_STUCK_REASON_52_BIT_VA	(UL(1) << CPU_STUCK_REASON_SHIFT)
 #define CPU_STUCK_REASON_NO_GRAN	(UL(2) << CPU_STUCK_REASON_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/threads.h>
 #include <linux/cpumask.h>
@@ -133,6 +133,6 @@ bool cpus_are_stuck_in_kernel(void);
 extern void crash_smp_send_stop(void);
 extern bool smp_crash_stop_failed(void);
 
-#endif /* ifndef __ASSEMBLY__ */
+#endif /* ifndef __ASSEMBLER__ */
 
 #endif /* ifndef __ASM_SMP_H */
arch/arm64/include/asm/spectre.h +2 -2
index 0c4d9045c31f4..85941e4742a27 100644
@@ -12,7 +12,7 @@
 #define BP_HARDEN_EL2_SLOTS 4
 #define __BP_HARDEN_HYP_VECS_SZ	((BP_HARDEN_EL2_SLOTS - 1) * SZ_2K)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/smp.h>
 #include <asm/percpu.h>
 
@@ -116,5 +116,5 @@ void spectre_bhb_patch_wa3(struct alt_instr *alt,
 void spectre_bhb_patch_clearbhb(struct alt_instr *alt,
 				__le32 *origptr, __le32 *updptr, int nr_inst);
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 #endif	/* __ASM_SPECTRE_H */
arch/arm64/include/asm/stacktrace/frame.h +2 -2
index 0ee0f6ba0fd86..796797b8db7e5 100644
@@ -25,7 +25,7 @@
 #define FRAME_META_TYPE_FINAL		1
 #define FRAME_META_TYPE_PT_REGS		2
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /* 
  * A standard AAPCS64 frame record.
  */
@@ -43,6 +43,6 @@ struct frame_record_meta {
 	struct frame_record record;
 	u64 type;
 };
-#endif /* __ASSEMBLY */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_STACKTRACE_FRAME_H */
arch/arm64/include/asm/sysreg.h +5 -5
index 05ea5223d2d55..ac659b6f90d02 100644
@@ -51,7 +51,7 @@
 
 #ifndef CONFIG_BROKEN_GAS_INST
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 // The space separator is omitted so that __emit_inst(x) can be parsed as
 // either an assembler directive or an assembler macro argument.
 #define __emit_inst(x)			.inst(x)
@@ -70,11 +70,11 @@
 					 (((x) >> 24) & 0x000000ff))
 #endif	/* CONFIG_CPU_BIG_ENDIAN */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define __emit_inst(x)			.long __INSTR_BSWAP(x)
-#else  /* __ASSEMBLY__ */
+#else  /* __ASSEMBLER__ */
 #define __emit_inst(x)			".long " __stringify(__INSTR_BSWAP(x)) "\n\t"
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* CONFIG_BROKEN_GAS_INST */
 
@@ -1106,7 +1106,7 @@
 /* Defined for compatibility only, do not add new users. */
 #define ARM64_FEATURE_MASK(x)	(x##_MASK)
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.macro	mrs_s, rt, sreg
 	 __emit_inst(0xd5200000|(\sreg)|(.L__gpr_num_\rt))
arch/arm64/include/asm/system_misc.h +2 -2
index c343442567625..a557160c96365 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_SYSTEM_MISC_H
 #define __ASM_SYSTEM_MISC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/linkage.h>
@@ -32,6 +32,6 @@ void hook_debug_fault_code(int nr, int (*fn)(unsigned long, unsigned long,
 struct mm_struct;
 extern void __show_regs(struct pt_regs *);
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* __ASM_SYSTEM_MISC_H */
arch/arm64/include/asm/thread_info.h +1 -1
index 1114c1c3300a1..60d764610b145 100644
@@ -10,7 +10,7 @@
 
 #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct task_struct;
 
arch/arm64/include/asm/tlbflush.h +1 -1
index bc94e036a26b9..cf40c428aba19 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_TLBFLUSH_H
 #define __ASM_TLBFLUSH_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/bitfield.h>
 #include <linux/mm_types.h>
arch/arm64/include/asm/vdso.h +2 -2
index 3e3c3fdb18427..2e56188d3f54a 100644
@@ -7,7 +7,7 @@
 
 #define __VVAR_PAGES    2
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <generated/vdso-offsets.h>
 
@@ -19,6 +19,6 @@
 extern char vdso_start[], vdso_end[];
 extern char vdso32_start[], vdso32_end[];
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_H */
arch/arm64/include/asm/vdso/compat_barrier.h +2 -2
index 3ac35f4a667cf..68a50fc1d830a 100644
@@ -5,7 +5,7 @@
 #ifndef __COMPAT_BARRIER_H
 #define __COMPAT_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Warning: This code is meant to be used with
  * ENABLE_COMPAT_VDSO only.
@@ -32,6 +32,6 @@
 #define smp_rmb()	aarch32_smp_rmb()
 #define smp_wmb()	aarch32_smp_wmb()
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __COMPAT_BARRIER_H */
arch/arm64/include/asm/vdso/compat_gettimeofday.h +2 -2
index 778c1202bbbf9..626ea7f5a54a9 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_GETTIMEOFDAY_H
 #define __ASM_VDSO_GETTIMEOFDAY_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/barrier.h>
 #include <asm/unistd_compat_32.h>
@@ -173,6 +173,6 @@ static inline bool vdso_clocksource_ok(const struct vdso_data *vd)
 }
 #define vdso_clocksource_ok	vdso_clocksource_ok
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/arm64/include/asm/vdso/getrandom.h +2 -2
index 342f807e20444..197267a3d6b3c 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_VDSO_GETRANDOM_H
 #define __ASM_VDSO_GETRANDOM_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/unistd.h>
 #include <asm/vdso/vsyscall.h>
@@ -45,6 +45,6 @@ static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(void
 	return &_vdso_rng_data;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETRANDOM_H */
arch/arm64/include/asm/vdso/gettimeofday.h +2 -2
index 764d13e2916c5..fa6f33e45673a 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_GETTIMEOFDAY_H
 #define __ASM_VDSO_GETTIMEOFDAY_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/alternative.h>
 #include <asm/barrier.h>
@@ -113,6 +113,6 @@ const struct vdso_data *__arch_get_timens_vdso_data(const struct vdso_data *vd)
 }
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/arm64/include/asm/vdso/processor.h +2 -2
index ff830b766ad2d..7abb0cc81cd6e 100644
@@ -5,13 +5,13 @@
 #ifndef __ASM_VDSO_PROCESSOR_H
 #define __ASM_VDSO_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static inline void cpu_relax(void)
 {
 	asm volatile("yield" ::: "memory");
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_PROCESSOR_H */
arch/arm64/include/asm/vdso/vsyscall.h +2 -2
index eea51946d45a2..9e37df010e498 100644
@@ -4,7 +4,7 @@
 
 #define __VDSO_RND_DATA_OFFSET  480
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <vdso/datapage.h>
 
@@ -46,6 +46,6 @@ void __arm64_update_vsyscall(struct vdso_data *vdata)
 /* The asm-generic header needs to be included after the definitions above */
 #include <asm-generic/vdso/vsyscall.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
arch/arm64/include/asm/virt.h +2 -2
index ebf4a9f943ed9..ac72813a50fe2 100644
@@ -56,7 +56,7 @@
  */
 #define BOOT_CPU_FLAG_E2H	BIT_ULL(32)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/ptrace.h>
 #include <asm/sections.h>
@@ -160,6 +160,6 @@ static inline bool is_hyp_nvhe(void)
 	return is_hyp_mode_available() && !is_kernel_in_hyp_mode();
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* ! __ASM__VIRT_H */
tools/arch/arm64/include/asm/cputype.h +2 -2
index 488f8e7513495..5e960f959f486 100644
@@ -223,7 +223,7 @@
 #define MIDR_FUJITSU_ERRATUM_010001_MASK	(~MIDR_CPU_VAR_REV(1, 0))
 #define TCR_CLEAR_FUJITSU_ERRATUM_010001	(TCR_NFD1 | TCR_NFD0)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/sysreg.h>
 
@@ -308,6 +308,6 @@ static inline u32 __attribute_const__ read_cpuid_cachetype(void)
 {
 	return read_cpuid(CTR_EL0);
 }
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
tools/arch/arm64/include/asm/esr.h +2 -2
index bd592ca815711..bbfbd1497a2f8 100644
@@ -385,7 +385,7 @@
 #define ESR_ELx_MOPS_ISS_SRCREG(esr)	(((esr) & (UL(0x1f) << 5)) >> 5)
 #define ESR_ELx_MOPS_ISS_SIZEREG(esr)	(((esr) & (UL(0x1f) << 0)) >> 0)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/types.h>
 
 static inline unsigned long esr_brk_comment(unsigned long esr)
@@ -450,6 +450,6 @@ static inline bool esr_iss_is_eretab(unsigned long esr)
 }
 
 const char *esr_get_class_string(unsigned long esr);
-#endif /* __ASSEMBLY */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ESR_H */
tools/arch/arm64/include/asm/gpr-num.h +3 -3
index 05da4a7c5788f..a114e4f8209b0 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_GPR_NUM_H
 #define __ASM_GPR_NUM_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.irp	num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
 	.equ	.L__gpr_num_x\num, \num
@@ -11,7 +11,7 @@
 	.equ	.L__gpr_num_xzr, 31
 	.equ	.L__gpr_num_wzr, 31
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #define __DEFINE_ASM_GPR_NUMS					\
 "	.irp	num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n" \
@@ -21,6 +21,6 @@
 "	.equ	.L__gpr_num_xzr, 31\n"				\
 "	.equ	.L__gpr_num_wzr, 31\n"
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_GPR_NUM_H */
tools/arch/arm64/include/asm/sysreg.h +5 -5
index 150416682e2cb..d380d4fa0c271 100644
@@ -51,7 +51,7 @@
 
 #ifndef CONFIG_BROKEN_GAS_INST
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 // The space separator is omitted so that __emit_inst(x) can be parsed as
 // either an assembler directive or an assembler macro argument.
 #define __emit_inst(x)			.inst(x)
@@ -70,11 +70,11 @@
 					 (((x) >> 24) & 0x000000ff))
 #endif	/* CONFIG_CPU_BIG_ENDIAN */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define __emit_inst(x)			.long __INSTR_BSWAP(x)
-#else  /* __ASSEMBLY__ */
+#else  /* __ASSEMBLER__ */
 #define __emit_inst(x)			".long " __stringify(__INSTR_BSWAP(x)) "\n\t"
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* CONFIG_BROKEN_GAS_INST */
 
@@ -1082,7 +1082,7 @@
 /* Defined for compatibility only, do not add new users. */
 #define ARM64_FEATURE_MASK(x)	(x##_MASK)
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.macro	mrs_s, rt, sreg
 	 __emit_inst(0xd5200000|(\sreg)|(.L__gpr_num_\rt))
tools/arch/arm64/include/uapi/asm/kvm.h +1 -1
index 66736ff04011e..952eac708a828 100644
@@ -31,7 +31,7 @@
 #define KVM_SPSR_FIQ	4
 #define KVM_NR_SPSR	5
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/psci.h>
 #include <linux/types.h>
 #include <asm/ptrace.h>
Signature · 1 line
2.48.1
#19 lore raw

PATCH 10/41 csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi header

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

---
 arch/csky/include/uapi/asm/ptrace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/csky/include/uapi/asm/ptrace.h +2 -2
index 3be9c14334a6e..90a5c36e4345d 100644
@@ -3,7 +3,7 @@
 #ifndef _CSKY_PTRACE_H
 #define _CSKY_PTRACE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct pt_regs {
 	unsigned long	tls;
@@ -47,5 +47,5 @@ struct user_fp {
 	unsigned long	reserved;
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _CSKY_PTRACE_H */
Signature · 1 line
2.48.1
#20 lore raw

PATCH 11/41 csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
 arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
 arch/csky/include/asm/barrier.h     | 4 ++--
 arch/csky/include/asm/cache.h       | 2 +-
 arch/csky/include/asm/ftrace.h      | 4 ++--
 arch/csky/include/asm/jump_label.h  | 4 ++--
 arch/csky/include/asm/page.h        | 4 ++--
 arch/csky/include/asm/ptrace.h      | 4 ++--
 arch/csky/include/asm/string.h      | 2 +-
 arch/csky/include/asm/thread_info.h | 4 ++--
 10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_REGDEF_H
 #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define syscallid	r1
 #else
 #define syscallid	"r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_REGDEF_H
 #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define syscallid	r7
 #else
 #define syscallid	"r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_BARRIER_H
 #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define nop()	asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
 #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
 #define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
 #define MCOUNT_ADDR	((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
 			   unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_CSKY_JUMP_LABEL_H
 #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
 				      enum jump_label_type type);
 #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif	/* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
 #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
 #include <asm-generic/memory_model.h>
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
 #include <linux/types.h>
 #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define PS_S	0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
 asmlinkage int syscall_trace_enter(struct pt_regs *regs);
 asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
 #ifndef _CSKY_STRING_MM_H_
 #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #include <linux/compiler.h>
 #include <abi/string.h>
arch/csky/include/asm/thread_info.h +2 -2
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
 #ifndef _ASM_CSKY_THREAD_INFO_H
 #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/types.h>
 #include <asm/page.h>
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
 	return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define TIF_SIGPENDING		0	/* signal pending */
 #define TIF_NOTIFY_RESUME	1       /* callback before returning to user */
Signature · 1 line
2.48.1
#21 lore raw

Re: [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 193 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
  arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
  arch/csky/include/asm/barrier.h     | 4 ++--
  arch/csky/include/asm/cache.h       | 2 +-
  arch/csky/include/asm/ftrace.h      | 4 ++--
  arch/csky/include/asm/jump_label.h  | 4 ++--
  arch/csky/include/asm/page.h        | 4 ++--
  arch/csky/include/asm/ptrace.h      | 4 ++--
  arch/csky/include/asm/string.h      | 2 +-
  arch/csky/include/asm/thread_info.h | 4 ++--
  10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_REGDEF_H
  #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
  #define syscallid	r1
  #else
  #define syscallid	"r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_REGDEF_H
  #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
  #define syscallid	r7
  #else
  #define syscallid	"r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_BARRIER_H
  #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define nop()	asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
  #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
  #define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
  #define MCOUNT_ADDR	((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
  void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
  			   unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_JUMP_LABEL_H
  #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
  				      enum jump_label_type type);
  #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
  #endif	/* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
  #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
  #include <asm-generic/memory_model.h>
  #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
  #include <linux/types.h>
  #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define PS_S	0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
  asmlinkage int syscall_trace_enter(struct pt_regs *regs);
  asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
  #ifndef _CSKY_STRING_MM_H_
  #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #include <linux/types.h>
  #include <linux/compiler.h>
  #include <abi/string.h>
arch/csky/include/asm/thread_info.h +1 -1
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
  #ifndef _ASM_CSKY_THREAD_INFO_H
  #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <asm/types.h>
  #include <asm/page.h>

arch/csky/include/asm/thread_info.h static inline struct thread_info *current_thread_info(void) · line 57

Quoted 8 lines
arch/csky/include/asm/thread_info.h +1 -1
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
  	return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
  }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #define TIF_SIGPENDING		0	/* signal pending */
  #define TIF_NOTIFY_RESUME	1       /* callback before returning to user */

Friendly ping!

Guo Ren, could you maybe pick this (and the previous patch) up via your csky tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

maintainer
#22 lore raw

Re: [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 206 lines · Thomas Huth
Quoted 193 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
  arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
  arch/csky/include/asm/barrier.h     | 4 ++--
  arch/csky/include/asm/cache.h       | 2 +-
  arch/csky/include/asm/ftrace.h      | 4 ++--
  arch/csky/include/asm/jump_label.h  | 4 ++--
  arch/csky/include/asm/page.h        | 4 ++--
  arch/csky/include/asm/ptrace.h      | 4 ++--
  arch/csky/include/asm/string.h      | 2 +-
  arch/csky/include/asm/thread_info.h | 4 ++--
  10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_REGDEF_H
  #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
  #define syscallid   r1
  #else
  #define syscallid   "r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_REGDEF_H
  #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
  #define syscallid   r7
  #else
  #define syscallid   "r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_BARRIER_H
  #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define nop()       asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
  #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
  #define ARCH_DMA_MINALIGN   L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
  #define MCOUNT_ADDR ((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
  void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
                         unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
  #ifndef __ASM_CSKY_JUMP_LABEL_H
  #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
                                    enum jump_label_type type);
  #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
  #endif      /* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
  #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
  #include <asm-generic/memory_model.h>
  #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
  #include <linux/types.h>
  #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define PS_S        0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
  asmlinkage int syscall_trace_enter(struct pt_regs *regs);
  asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
  #ifndef _CSKY_STRING_MM_H_
  #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #include <linux/types.h>
  #include <linux/compiler.h>
  #include <abi/string.h>
arch/csky/include/asm/thread_info.h +1 -1
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
  #ifndef _ASM_CSKY_THREAD_INFO_H
  #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <asm/types.h>
  #include <asm/page.h>

arch/csky/include/asm/thread_info.h static inline struct thread_info *current_thread_info(void) · line 57

Quoted 8 lines
arch/csky/include/asm/thread_info.h +1 -1
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
      return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
  }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #define TIF_SIGPENDING              0       /* signal pending */
  #define TIF_NOTIFY_RESUME   1       /* callback before returning to user */

Friendly ping!

Quoted 7 lines

Guo Ren, could you maybe pick this (and the previous patch) up via your csky tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

How about riscv?

Signature · 2 lines
Best Regards
 Guo Ren
#23 lore raw

Re: [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 207 lines · Guo Ren
Quoted 206 lines · Thomas Huth
Quoted 193 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
   arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
   arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
   arch/csky/include/asm/barrier.h     | 4 ++--
   arch/csky/include/asm/cache.h       | 2 +-
   arch/csky/include/asm/ftrace.h      | 4 ++--
   arch/csky/include/asm/jump_label.h  | 4 ++--
   arch/csky/include/asm/page.h        | 4 ++--
   arch/csky/include/asm/ptrace.h      | 4 ++--
   arch/csky/include/asm/string.h      | 2 +-
   arch/csky/include/asm/thread_info.h | 4 ++--
   10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_REGDEF_H
   #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
   #define syscallid   r1
   #else
   #define syscallid   "r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_REGDEF_H
   #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
   #define syscallid   r7
   #else
   #define syscallid   "r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_BARRIER_H
   #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #define nop()       asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
   #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
   #define ARCH_DMA_MINALIGN   L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
   #define MCOUNT_ADDR ((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
   void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
                          unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_JUMP_LABEL_H
   #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
                                     enum jump_label_type type);
   #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
   #endif      /* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
   #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
   #include <asm-generic/memory_model.h>
   #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
   #include <linux/types.h>
   #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #define PS_S        0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
   asmlinkage int syscall_trace_enter(struct pt_regs *regs);
   asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
   #ifndef _CSKY_STRING_MM_H_
   #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #include <linux/types.h>
   #include <linux/compiler.h>
   #include <abi/string.h>
arch/csky/include/asm/thread_info.h +1 -1
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
   #ifndef _ASM_CSKY_THREAD_INFO_H
   #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #include <asm/types.h>
   #include <asm/page.h>

arch/csky/include/asm/thread_info.h static inline struct thread_info *current_thread_info(void) · line 57

Quoted 8 lines
arch/csky/include/asm/thread_info.h +1 -1
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
       return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
   }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
   #define TIF_SIGPENDING              0       /* signal pending */
   #define TIF_NOTIFY_RESUME   1       /* callback before returning to user */

Friendly ping!

Quoted 8 lines
Quoted 7 lines

Guo Ren, could you maybe pick this (and the previous patch) up via your csky tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

How about riscv?

The riscv patch (https://lore.kernel.org/all/[email protected]/) needs a rebase since it does not apply cleanly anymore. I'll try to do that in the next couple of days.

Thomas

maintainer
#24 lore raw

Re: [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 216 lines · Thomas Huth
Quoted 214 lines · Guo Ren
Quoted 213 lines · Thomas Huth
Quoted 193 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
   arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
   arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
   arch/csky/include/asm/barrier.h     | 4 ++--
   arch/csky/include/asm/cache.h       | 2 +-
   arch/csky/include/asm/ftrace.h      | 4 ++--
   arch/csky/include/asm/jump_label.h  | 4 ++--
   arch/csky/include/asm/page.h        | 4 ++--
   arch/csky/include/asm/ptrace.h      | 4 ++--
   arch/csky/include/asm/string.h      | 2 +-
   arch/csky/include/asm/thread_info.h | 4 ++--
   10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_REGDEF_H
   #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
   #define syscallid   r1
   #else
   #define syscallid   "r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_REGDEF_H
   #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
   #define syscallid   r7
   #else
   #define syscallid   "r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_BARRIER_H
   #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #define nop()       asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
   #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
   #define ARCH_DMA_MINALIGN   L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
   #define MCOUNT_ADDR ((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
   void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
                          unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
   #ifndef __ASM_CSKY_JUMP_LABEL_H
   #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
                                     enum jump_label_type type);
   #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
   #endif      /* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
   #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
   #include <asm-generic/memory_model.h>
   #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
   #include <linux/types.h>
   #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #define PS_S        0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
   asmlinkage int syscall_trace_enter(struct pt_regs *regs);
   asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
   #ifndef _CSKY_STRING_MM_H_
   #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #include <linux/types.h>
   #include <linux/compiler.h>
   #include <abi/string.h>
arch/csky/include/asm/thread_info.h +1 -1
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
   #ifndef _ASM_CSKY_THREAD_INFO_H
   #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
   #include <asm/types.h>
   #include <asm/page.h>

arch/csky/include/asm/thread_info.h static inline struct thread_info *current_thread_info(void) · line 57

Quoted 8 lines
arch/csky/include/asm/thread_info.h +1 -1
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
       return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
   }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
   #define TIF_SIGPENDING              0       /* signal pending */
   #define TIF_NOTIFY_RESUME   1       /* callback before returning to user */

Friendly ping!

Guo Ren, could you maybe pick this (and the previous patch) up via your csky tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

Quoted 6 lines
Quoted 1 line

How about riscv?

The riscv patch
(https://lore.kernel.org/all/[email protected]/)
needs a rebase since it does not apply cleanly anymore. I'll try to do that in the next couple of days.

Thanks for the info, I would take the patch after the other architecture is approved. It's not a rush job.

Quoted 3 lines

Thomas

Signature · 2 lines
Best Regards
 Guo Ren
#25 lore raw

Re: [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 217 lines · Guo Ren
Quoted 216 lines · Thomas Huth
Quoted 214 lines · Guo Ren
Quoted 213 lines · Thomas Huth
Quoted 193 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
    arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
    arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
    arch/csky/include/asm/barrier.h     | 4 ++--
    arch/csky/include/asm/cache.h       | 2 +-
    arch/csky/include/asm/ftrace.h      | 4 ++--
    arch/csky/include/asm/jump_label.h  | 4 ++--
    arch/csky/include/asm/page.h        | 4 ++--
    arch/csky/include/asm/ptrace.h      | 4 ++--
    arch/csky/include/asm/string.h      | 2 +-
    arch/csky/include/asm/thread_info.h | 4 ++--
    10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_REGDEF_H
    #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
    #define syscallid   r1
    #else
    #define syscallid   "r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_REGDEF_H
    #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
    #define syscallid   r7
    #else
    #define syscallid   "r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_BARRIER_H
    #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #define nop()       asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
    #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
    #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
    #define ARCH_DMA_MINALIGN   L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
    #define MCOUNT_ADDR ((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
    void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
                           unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
    #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_JUMP_LABEL_H
    #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
                                      enum jump_label_type type);
    #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
    #endif      /* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
    #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
    #include <asm-generic/memory_model.h>
    #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
    #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
    #include <linux/types.h>
    #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #define PS_S        0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
    asmlinkage int syscall_trace_enter(struct pt_regs *regs);
    asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
    #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
    #ifndef _CSKY_STRING_MM_H_
    #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
    #include <linux/types.h>
    #include <linux/compiler.h>
    #include <abi/string.h>
arch/csky/include/asm/thread_info.h +1 -1
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
    #ifndef _ASM_CSKY_THREAD_INFO_H
    #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #include <asm/types.h>
    #include <asm/page.h>

arch/csky/include/asm/thread_info.h static inline struct thread_info *current_thread_info(void) · line 57

Quoted 8 lines
arch/csky/include/asm/thread_info.h +1 -1
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
        return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
    }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
    #define TIF_SIGPENDING              0       /* signal pending */
    #define TIF_NOTIFY_RESUME   1       /* callback before returning to user */

Friendly ping!

Guo Ren, could you maybe pick this (and the previous patch) up via your csky tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

How about riscv?

The riscv patch
(https://lore.kernel.org/all/[email protected]/)
needs a rebase since it does not apply cleanly anymore. I'll try to do that in the next couple of days.

Thanks for the info, I would take the patch after the other architecture is approved. It's not a rush job.

The riscv patch has now been merged. Could you please pick up the csky patch now?

Thanks,
Thomas

maintainer
#26 lore raw

Re: [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 225 lines · Thomas Huth
Quoted 223 lines · Guo Ren
Quoted 222 lines · Thomas Huth
Quoted 207 lines · Guo Ren
Quoted 206 lines · Thomas Huth
Quoted 193 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
    arch/csky/abiv1/inc/abi/regdef.h    | 2 +-
    arch/csky/abiv2/inc/abi/regdef.h    | 2 +-
    arch/csky/include/asm/barrier.h     | 4 ++--
    arch/csky/include/asm/cache.h       | 2 +-
    arch/csky/include/asm/ftrace.h      | 4 ++--
    arch/csky/include/asm/jump_label.h  | 4 ++--
    arch/csky/include/asm/page.h        | 4 ++--
    arch/csky/include/asm/ptrace.h      | 4 ++--
    arch/csky/include/asm/string.h      | 2 +-
    arch/csky/include/asm/thread_info.h | 4 ++--
    10 files changed, 16 insertions(+), 16 deletions(-)
arch/csky/abiv1/inc/abi/regdef.h +1 -1
index 7b386fd670702..c75ecf2cafd7c 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_REGDEF_H
    #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
    #define syscallid   r1
    #else
    #define syscallid   "r1"
arch/csky/abiv2/inc/abi/regdef.h +1 -1
index 0933addbc27b7..fc08d56ccdbe1 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_REGDEF_H
    #define __ASM_CSKY_REGDEF_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
    #define syscallid   r7
    #else
    #define syscallid   "r7"
arch/csky/include/asm/barrier.h +2 -2
index 15de58b10aece..c33fdcfe3770c 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_BARRIER_H
    #define __ASM_CSKY_BARRIER_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #define nop()       asm volatile ("nop\n":::"memory")
 
@@ -84,5 +84,5 @@
 
    #include <asm-generic/barrier.h>
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
    #endif /* __ASM_CSKY_BARRIER_H */
arch/csky/include/asm/cache.h +1 -1
index 4b5c09bf1d25e..d575482e0fcec 100644
@@ -10,7 +10,7 @@
 
    #define ARCH_DMA_MINALIGN   L1_CACHE_BYTES
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    void dcache_wb_line(unsigned long start);
 
arch/csky/include/asm/ftrace.h +2 -2
index 00f9f7647e3f3..21532f2180587 100644
@@ -11,7 +11,7 @@
 
    #define MCOUNT_ADDR ((unsigned long)_mcount)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    extern void _mcount(unsigned long);
 
@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
    void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
                           unsigned long frame_pointer);
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
    #endif /* __ASM_CSKY_FTRACE_H */
arch/csky/include/asm/jump_label.h +2 -2
index ef2e37a10a0fe..603b0caa80249 100644
@@ -3,7 +3,7 @@
    #ifndef __ASM_CSKY_JUMP_LABEL_H
    #define __ASM_CSKY_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #include <linux/types.h>
 
@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
                                      enum jump_label_type type);
    #define arch_jump_label_transform_static arch_jump_label_transform_static
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
    #endif      /* __ASM_CSKY_JUMP_LABEL_H */
arch/csky/include/asm/page.h +2 -2
index 4911d0892b71d..76774dbce8697 100644
@@ -26,7 +26,7 @@
 
    #define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #include <linux/pfn.h>
 
@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
    #include <asm-generic/memory_model.h>
    #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
    #endif /* __ASM_CSKY_PAGE_H */
arch/csky/include/asm/ptrace.h +2 -2
index 0634b7895d81d..5f01839e11843 100644
@@ -8,7 +8,7 @@
    #include <linux/types.h>
    #include <linux/compiler.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #define PS_S        0x80000000 /* Supervisor Mode */
 
@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
 
    asmlinkage int syscall_trace_enter(struct pt_regs *regs);
    asmlinkage void syscall_trace_exit(struct pt_regs *regs);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
    #endif /* __ASM_CSKY_PTRACE_H */
arch/csky/include/asm/string.h +1 -1
index a0d81e9d6b8f6..82e99f52b547c 100644
@@ -3,7 +3,7 @@
    #ifndef _CSKY_STRING_MM_H_
    #define _CSKY_STRING_MM_H_
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
    #include <linux/types.h>
    #include <linux/compiler.h>
    #include <abi/string.h>
arch/csky/include/asm/thread_info.h +1 -1
index b5ed788f0c681..fdd4f8ad45acf 100644
@@ -3,7 +3,7 @@
    #ifndef _ASM_CSKY_THREAD_INFO_H
    #define _ASM_CSKY_THREAD_INFO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
    #include <asm/types.h>
    #include <asm/page.h>

arch/csky/include/asm/thread_info.h static inline struct thread_info *current_thread_info(void) · line 57

Quoted 8 lines
arch/csky/include/asm/thread_info.h +1 -1
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
        return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
    }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
    #define TIF_SIGPENDING              0       /* signal pending */
    #define TIF_NOTIFY_RESUME   1       /* callback before returning to user */

Friendly ping!

Quoted 8 lines
Quoted 7 lines

Guo Ren, could you maybe pick this (and the previous patch) up via your csky tree? (x86 and parisc already got merge via their respective architecture trees, so I guess the same should happen for this patch here, too).

Thanks,
Thomas

How about riscv?

The riscv patch
(https://lore.kernel.org/all/[email protected]/)
needs a rebase since it does not apply cleanly anymore. I'll try to do that in the next couple of days.

Quoted 5 lines
Quoted 2 lines

Thanks for the info, I would take the patch after the other architecture is approved. It's not a rush job.

The riscv patch has now been merged. Could you please pick up the csky patch now?

Yes, I'll review and pick it up.

Signature · 2 lines
Best Regards
 Guo Ren
#27 lore raw

PATCH 12/41 hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

---
 arch/hexagon/include/uapi/asm/registers.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/hexagon/include/uapi/asm/registers.h +2 -2
index d51270f3b3582..8f73d41651e87 100644
@@ -7,7 +7,7 @@
 #ifndef _ASM_REGISTERS_H
 #define _ASM_REGISTERS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*  See kernel/entry.S for further documentation.  */
 
@@ -224,6 +224,6 @@ struct pt_regs {
 	(regs)->hvmer.vmest = (HVM_VMEST_UM_MSK << HVM_VMEST_UM_SFT) \
 			    | (HVM_VMEST_IE_MSK << HVM_VMEST_IE_SFT)
 
-#endif  /*  ifndef __ASSEMBLY  */
+#endif  /*  ifndef __ASSEMBLER__  */
 
 #endif
Signature · 1 line
2.48.1
#28 lore raw

PATCH 13/41 hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 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 ++++++------
 5 files changed, 15 insertions(+), 15 deletions(-)
arch/hexagon/include/asm/hexagon_vm.h +2 -2
index 9aa2493fe7863..e1e702eb9e12a 100644
@@ -39,7 +39,7 @@
 #define HVM_TRAP1_VMGETREGS		22
 #define HVM_TRAP1_VMTIMEROP		24
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 enum VM_CACHE_OPS {
 	hvmc_ickill,
@@ -178,7 +178,7 @@ static inline long __vmintop_clear(long i)
 
 #else /* Only assembly code should reference these */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * Constants for virtual instruction parameters and return values
arch/hexagon/include/asm/mem-layout.h +3 -3
index e2f99413fe56e..8bad920d8928a 100644
@@ -25,7 +25,7 @@
  */
 
 #ifdef CONFIG_HEXAGON_PHYS_OFFSET
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned long	__phys_offset;
 #endif
 #define PHYS_OFFSET	__phys_offset
@@ -44,7 +44,7 @@ extern unsigned long	__phys_offset;
 #define STACK_TOP			TASK_SIZE
 #define STACK_TOP_MAX			TASK_SIZE
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 enum fixed_addresses {
 	FIX_KMAP_BEGIN,
 	FIX_KMAP_END,  /*  check for per-cpuism  */
@@ -101,7 +101,7 @@ extern int max_kernel_seg;
  * and pkmap_base begins.
  */
 #define VMALLOC_END (PKMAP_BASE-PAGE_SIZE*2)
-#endif /*  !__ASSEMBLY__  */
+#endif /*  !__ASSEMBLER__  */
 
 
 #endif /* _ASM_HEXAGON_MEM_LAYOUT_H */
arch/hexagon/include/asm/page.h +2 -2
index 137ba7c5de481..7e651428a08c0 100644
@@ -48,7 +48,7 @@
 #include <vdso/page.h>
 
 #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * This is for PFN_DOWN, which mm.h needs.  Seems the right place to pull it in.
@@ -128,7 +128,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
 /* XXX Todo: implement assembly-optimized version of getorder. */
 #include <asm-generic/getorder.h>
 
-#endif /* ifdef __ASSEMBLY__ */
+#endif /* ifdef __ASSEMBLER__ */
 #endif /* ifdef __KERNEL__ */
 
 #endif
arch/hexagon/include/asm/processor.h +2 -2
index 0cd39c2cdf8f7..b93c2cc4be22e 100644
@@ -8,7 +8,7 @@
 #ifndef _ASM_PROCESSOR_H
 #define _ASM_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/mem-layout.h>
 #include <asm/registers.h>
@@ -124,6 +124,6 @@ struct hexagon_switch_stack {
 	unsigned long		lr;
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
arch/hexagon/include/asm/thread_info.h +6 -6
index e90f280b9ce3e..a0da6c694c87b 100644
@@ -10,7 +10,7 @@
 
 #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/processor.h>
 #include <asm/registers.h>
 #include <asm/page.h>
@@ -20,7 +20,7 @@
 #define THREAD_SIZE		(1<<THREAD_SHIFT)
 #define THREAD_SIZE_ORDER	(THREAD_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * This is union'd with the "bottom" of the kernel stack.
@@ -47,13 +47,13 @@ struct thread_info {
 	unsigned long		sp;
 };
 
-#else /* !__ASSEMBLY__ */
+#else /* !__ASSEMBLER__ */
 
 #include <asm/asm-offsets.h>
 
-#endif  /* __ASSEMBLY__  */
+#endif  /* __ASSEMBLER__  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define INIT_THREAD_INFO(tsk)                   \
 {                                               \
@@ -73,7 +73,7 @@ struct thread_info {
 register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
 #define current_thread_info()  __current_thread_info
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * thread information flags
Signature · 1 line
2.48.1
maintainer Acked-by on v1 13/41
#29 lore raw

Re: [PATCH 13/41] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 8 lines · Thomas Huth

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. 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.

Quoted 7 lines

This is a completely mechanical patch (done with a simple "sed -i" statement).

---

Quoted 151 lines
  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 ++++++------
  5 files changed, 15 insertions(+), 15 deletions(-)
arch/hexagon/include/asm/hexagon_vm.h +2 -2
index 9aa2493fe7863..e1e702eb9e12a 100644
@@ -39,7 +39,7 @@
  #define HVM_TRAP1_VMGETREGS		22
  #define HVM_TRAP1_VMTIMEROP		24
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  enum VM_CACHE_OPS {
  	hvmc_ickill,
@@ -178,7 +178,7 @@ static inline long __vmintop_clear(long i)
 
  #else /* Only assembly code should reference these */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /*
   * Constants for virtual instruction parameters and return values
arch/hexagon/include/asm/mem-layout.h +3 -3
index e2f99413fe56e..8bad920d8928a 100644
@@ -25,7 +25,7 @@
   */
 
  #ifdef CONFIG_HEXAGON_PHYS_OFFSET
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern unsigned long	__phys_offset;
  #endif
  #define PHYS_OFFSET	__phys_offset
@@ -44,7 +44,7 @@ extern unsigned long	__phys_offset;
  #define STACK_TOP			TASK_SIZE
  #define STACK_TOP_MAX			TASK_SIZE
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  enum fixed_addresses {
  	FIX_KMAP_BEGIN,
  	FIX_KMAP_END,  /*  check for per-cpuism  */
@@ -101,7 +101,7 @@ extern int max_kernel_seg;
   * and pkmap_base begins.
   */
  #define VMALLOC_END (PKMAP_BASE-PAGE_SIZE*2)
-#endif /*  !__ASSEMBLY__  */
+#endif /*  !__ASSEMBLER__  */
 
 
  #endif /* _ASM_HEXAGON_MEM_LAYOUT_H */
arch/hexagon/include/asm/page.h +2 -2
index 137ba7c5de481..7e651428a08c0 100644
@@ -48,7 +48,7 @@
  #include <vdso/page.h>
 
  #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /*
   * This is for PFN_DOWN, which mm.h needs.  Seems the right place to pull it in.
@@ -128,7 +128,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
  /* XXX Todo: implement assembly-optimized version of getorder. */
  #include <asm-generic/getorder.h>
 
-#endif /* ifdef __ASSEMBLY__ */
+#endif /* ifdef __ASSEMBLER__ */
  #endif /* ifdef __KERNEL__ */
 
  #endif
arch/hexagon/include/asm/processor.h +2 -2
index 0cd39c2cdf8f7..b93c2cc4be22e 100644
@@ -8,7 +8,7 @@
  #ifndef _ASM_PROCESSOR_H
  #define _ASM_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <asm/mem-layout.h>
  #include <asm/registers.h>
@@ -124,6 +124,6 @@ struct hexagon_switch_stack {
  	unsigned long		lr;
  };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
  #endif
arch/hexagon/include/asm/thread_info.h +6 -6
index e90f280b9ce3e..a0da6c694c87b 100644
@@ -10,7 +10,7 @@
 
  #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #include <asm/processor.h>
  #include <asm/registers.h>
  #include <asm/page.h>
@@ -20,7 +20,7 @@
  #define THREAD_SIZE		(1<<THREAD_SHIFT)
  #define THREAD_SIZE_ORDER	(THREAD_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /*
   * This is union'd with the "bottom" of the kernel stack.
@@ -47,13 +47,13 @@ struct thread_info {
  	unsigned long		sp;
  };
 
-#else /* !__ASSEMBLY__ */
+#else /* !__ASSEMBLER__ */
 
  #include <asm/asm-offsets.h>
 
-#endif  /* __ASSEMBLY__  */
+#endif  /* __ASSEMBLER__  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define INIT_THREAD_INFO(tsk)                   \
  {                                               \
@@ -73,7 +73,7 @@ struct thread_info {
  register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
  #define current_thread_info()  __current_thread_info
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /*
   * thread information flags
#30 lore raw

Re: [PATCH 13/41] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 13 lines · Brian Cain
Quoted 11 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

Quoted 7 lines
Quoted 4 lines

---

Hi Brian!

Could you please merge the two hexagon patches through the hexagon tree? (most of the patches for the other architectures have also been picked up by the respective architecture maintainers)

Thanks,
Thomas

Quoted 126 lines
Quoted 125 lines

  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 ++++++------

  5 files changed, 15 insertions(+), 15 deletions(-)
arch/hexagon/include/asm/hexagon_vm.h +2 -2
index 9aa2493fe7863..e1e702eb9e12a 100644
@@ -39,7 +39,7 @@
   #define HVM_TRAP1_VMGETREGS        22
   #define HVM_TRAP1_VMTIMEROP        24
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   enum VM_CACHE_OPS {
       hvmc_ickill,
@@ -178,7 +178,7 @@ static inline long __vmintop_clear(long i)
   #else /* Only assembly code should reference these */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   /*
    * Constants for virtual instruction parameters and return values
arch/hexagon/include/asm/mem-layout.h +2 -2
index e2f99413fe56e..8bad920d8928a 100644
@@ -25,7 +25,7 @@
    */
   #ifdef CONFIG_HEXAGON_PHYS_OFFSET
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   extern unsigned long    __phys_offset;
   #endif
   #define PHYS_OFFSET    __phys_offset
@@ -44,7 +44,7 @@ extern unsigned long    __phys_offset;
   #define STACK_TOP            TASK_SIZE
   #define STACK_TOP_MAX            TASK_SIZE
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   enum fixed_addresses {
       FIX_KMAP_BEGIN,

      FIX_KMAP_END,  /*  check for per-cpuism  */

arch/hexagon/include/asm/mem-layout.h +1 -1
@@ -101,7 +101,7 @@ extern int max_kernel_seg;
    * and pkmap_base begins.
    */
   #define VMALLOC_END (PKMAP_BASE-PAGE_SIZE*2)
-#endif /*  !__ASSEMBLY__  */
+#endif /*  !__ASSEMBLER__  */
   #endif /* _ASM_HEXAGON_MEM_LAYOUT_H */
arch/hexagon/include/asm/page.h +2 -2
index 137ba7c5de481..7e651428a08c0 100644
@@ -48,7 +48,7 @@
   #include <vdso/page.h>
   #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   /*
    * This is for PFN_DOWN, which mm.h needs.  Seems the right place to pull it in.
@@ -128,7 +128,7 @@ static inline unsigned long virt_to_pfn(const void 
 *kaddr)
   /* XXX Todo: implement assembly-optimized version of getorder. */
   #include <asm-generic/getorder.h>
-#endif /* ifdef __ASSEMBLY__ */
+#endif /* ifdef __ASSEMBLER__ */
   #endif /* ifdef __KERNEL__ */
   #endif
arch/hexagon/include/asm/processor.h +2 -2
index 0cd39c2cdf8f7..b93c2cc4be22e 100644
@@ -8,7 +8,7 @@
   #ifndef _ASM_PROCESSOR_H
   #define _ASM_PROCESSOR_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #include <asm/mem-layout.h>
   #include <asm/registers.h>
@@ -124,6 +124,6 @@ struct hexagon_switch_stack {
       unsigned long        lr;
   };
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
   #endif
arch/hexagon/include/asm/thread_info.h +6 -6
index e90f280b9ce3e..a0da6c694c87b 100644
@@ -10,7 +10,7 @@
   #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #include <asm/processor.h>
   #include <asm/registers.h>
   #include <asm/page.h>
@@ -20,7 +20,7 @@
   #define THREAD_SIZE        (1<<THREAD_SHIFT)
   #define THREAD_SIZE_ORDER    (THREAD_SHIFT - PAGE_SHIFT)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   /*
    * This is union'd with the "bottom" of the kernel stack.
@@ -47,13 +47,13 @@ struct thread_info {
       unsigned long        sp;
   };
-#else /* !__ASSEMBLY__ */
+#else /* !__ASSEMBLER__ */
   #include <asm/asm-offsets.h>
-#endif  /* __ASSEMBLY__  */
+#endif  /* __ASSEMBLER__  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
   #define INIT_THREAD_INFO(tsk)                   \
   {                                               \
@@ -73,7 +73,7 @@ struct thread_info {
   register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
   #define current_thread_info()  __current_thread_info
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
   /*
    * thread information flags
#31 lore raw

PATCH 14/41 loongarch: Replace __ASSEMBLY__ with __ASSEMBLER__ in the loongarch headers

In reply to Thomas Huth

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. 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.

This is almost a completely mechanical patch (done with a simple "sed -i" statement), with one comment tweaked manually in arch/loongarch/include/asm/cpu.h (it was missing the trailing underscores).

---
 arch/loongarch/include/asm/addrspace.h         |  8 ++++----
 arch/loongarch/include/asm/alternative-asm.h   |  4 ++--
 arch/loongarch/include/asm/alternative.h       |  4 ++--
 arch/loongarch/include/asm/asm-extable.h       |  6 +++---
 arch/loongarch/include/asm/asm.h               |  8 ++++----
 arch/loongarch/include/asm/cpu.h               |  4 ++--
 arch/loongarch/include/asm/ftrace.h            |  4 ++--
 arch/loongarch/include/asm/gpr-num.h           |  6 +++---
 arch/loongarch/include/asm/irqflags.h          |  4 ++--
 arch/loongarch/include/asm/jump_label.h        |  4 ++--
 arch/loongarch/include/asm/kasan.h             |  2 +-
 arch/loongarch/include/asm/loongarch.h         | 16 ++++++++--------
 arch/loongarch/include/asm/orc_types.h         |  4 ++--
 arch/loongarch/include/asm/page.h              |  4 ++--
 arch/loongarch/include/asm/pgtable-bits.h      |  4 ++--
 arch/loongarch/include/asm/pgtable.h           |  4 ++--
 arch/loongarch/include/asm/prefetch.h          |  2 +-
 arch/loongarch/include/asm/thread_info.h       |  4 ++--
 arch/loongarch/include/asm/types.h             |  2 +-
 arch/loongarch/include/asm/unwind_hints.h      |  4 ++--
 arch/loongarch/include/asm/vdso/getrandom.h    |  4 ++--
 arch/loongarch/include/asm/vdso/gettimeofday.h |  4 ++--
 arch/loongarch/include/asm/vdso/processor.h    |  4 ++--
 arch/loongarch/include/asm/vdso/vdso.h         |  4 ++--
 arch/loongarch/include/asm/vdso/vsyscall.h     |  4 ++--
 tools/arch/loongarch/include/asm/orc_types.h   |  4 ++--
 26 files changed, 61 insertions(+), 61 deletions(-)
arch/loongarch/include/asm/addrspace.h +4 -4
index fe198b473f849..e739dbc6329dc 100644
@@ -18,12 +18,12 @@
 /*
  * This gives the physical RAM offset.
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifndef PHYS_OFFSET
 #define PHYS_OFFSET	_UL(0)
 #endif
 extern unsigned long vm_map_base;
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #ifndef IO_BASE
 #define IO_BASE			CSR_DMW0_BASE
@@ -66,7 +66,7 @@ extern unsigned long vm_map_base;
 #define FIXADDR_TOP		((unsigned long)(long)(int)0xfffe0000)
 #endif
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _ATYPE_
 #define _ATYPE32_
 #define _ATYPE64_
@@ -85,7 +85,7 @@ extern unsigned long vm_map_base;
 /*
  *  32/64-bit LoongArch address spaces
  */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _ACAST32_
 #define _ACAST64_
 #else
arch/loongarch/include/asm/alternative-asm.h +2 -2
index ff3d10ac393f2..7dc29bd9b2f0e 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_ALTERNATIVE_ASM_H
 #define _ASM_ALTERNATIVE_ASM_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/asm.h>
 
@@ -77,6 +77,6 @@
 	.previous
 .endm
 
-#endif  /*  __ASSEMBLY__  */
+#endif  /*  __ASSEMBLER__  */
 
 #endif /* _ASM_ALTERNATIVE_ASM_H */
arch/loongarch/include/asm/alternative.h +2 -2
index cee7b29785ab2..b5bae21fb3c85 100644
@@ -2,7 +2,7 @@
 #ifndef _ASM_ALTERNATIVE_H
 #define _ASM_ALTERNATIVE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <linux/stddef.h>
@@ -106,6 +106,6 @@ extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
 #define alternative_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \
 	(asm volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) ::: "memory"))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_ALTERNATIVE_H */
arch/loongarch/include/asm/asm-extable.h +3 -3
index df05005f2b80a..d60bdf2e63775 100644
@@ -7,7 +7,7 @@
 #define EX_TYPE_UACCESS_ERR_ZERO	2
 #define EX_TYPE_BPF			3
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #define __ASM_EXTABLE_RAW(insn, fixup, type, data)	\
 	.pushsection	__ex_table, "a";		\
@@ -22,7 +22,7 @@
 	__ASM_EXTABLE_RAW(\insn, \fixup, EX_TYPE_FIXUP, 0)
 	.endm
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #include <linux/bits.h>
 #include <linux/stringify.h>
@@ -60,6 +60,6 @@
 #define _ASM_EXTABLE_UACCESS_ERR(insn, fixup, err)			\
 	_ASM_EXTABLE_UACCESS_ERR_ZERO(insn, fixup, err, zero)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ASM_EXTABLE_H */
arch/loongarch/include/asm/asm.h +4 -4
index f591b3245def6..f018d26fc995a 100644
@@ -110,7 +110,7 @@
 #define LONG_SRA	srai.w
 #define LONG_SRAV	sra.w
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define LONG		.word
 #endif
 #define LONGSIZE	4
@@ -131,7 +131,7 @@
 #define LONG_SRA	srai.d
 #define LONG_SRAV	sra.d
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define LONG		.dword
 #endif
 #define LONGSIZE	8
@@ -158,7 +158,7 @@
 
 #define PTR_SCALESHIFT	2
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define PTR		.word
 #endif
 #define PTRSIZE		4
@@ -181,7 +181,7 @@
 
 #define PTR_SCALESHIFT	3
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define PTR		.dword
 #endif
 #define PTRSIZE		8
arch/loongarch/include/asm/cpu.h +2 -2
index 98cf4d7b4b0a0..dfb982fe87019 100644
@@ -46,7 +46,7 @@
 
 #define PRID_PRODUCT_MASK	0x0fff
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 
 enum cpu_type_enum {
 	CPU_UNKNOWN,
@@ -55,7 +55,7 @@ enum cpu_type_enum {
 	CPU_LAST
 };
 
-#endif /* !__ASSEMBLY */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * ISA Level encodings
arch/loongarch/include/asm/ftrace.h +2 -2
index 6e0a99763a9a7..f4caaf764f9ee 100644
@@ -14,7 +14,7 @@
 
 #define MCOUNT_INSN_SIZE 4		/* sizeof mcount call */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifndef CONFIG_DYNAMIC_FTRACE
 
@@ -84,7 +84,7 @@ __arch_ftrace_set_direct_caller(struct pt_regs *regs, unsigned long addr)
 
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* CONFIG_FUNCTION_TRACER */
 
arch/loongarch/include/asm/gpr-num.h +3 -3
index 996038da806d1..af95b941f48bd 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_GPR_NUM_H
 #define __ASM_GPR_NUM_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.equ	.L__gpr_num_zero, 0
 	.irp	num,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
@@ -25,7 +25,7 @@
 	.equ	.L__gpr_num_$s\num, 23 + \num
 	.endr
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #define __DEFINE_ASM_GPR_NUMS					\
 "	.equ	.L__gpr_num_zero, 0\n"				\
@@ -47,6 +47,6 @@
 "	.equ	.L__gpr_num_$s\\num, 23 + \\num\n"		\
 "	.endr\n"						\
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_GPR_NUM_H */
arch/loongarch/include/asm/irqflags.h +2 -2
index 319a8c616f1f5..fa898cfc367a3 100644
@@ -5,7 +5,7 @@
 #ifndef _ASM_IRQFLAGS_H
 #define _ASM_IRQFLAGS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/stringify.h>
@@ -72,6 +72,6 @@ static inline int arch_irqs_disabled(void)
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
 
-#endif /* #ifndef __ASSEMBLY__ */
+#endif /* #ifndef __ASSEMBLER__ */
 
 #endif /* _ASM_IRQFLAGS_H */
arch/loongarch/include/asm/jump_label.h +2 -2
index 8a924bd69d196..4000c7603d8e3 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_JUMP_LABEL_H
 #define __ASM_JUMP_LABEL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -50,5 +50,5 @@ static __always_inline bool arch_static_branch_jump(struct static_key * const ke
 	return true;
 }
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif	/* __ASM_JUMP_LABEL_H */
arch/loongarch/include/asm/kasan.h +1 -1
index 7f52bd31b9d4f..62f139a9c87da 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_KASAN_H
 #define __ASM_KASAN_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/linkage.h>
 #include <linux/mmzone.h>
arch/loongarch/include/asm/loongarch.h +8 -8
index 52651aa0e5834..4d1a156d8ee07 100644
@@ -9,15 +9,15 @@
 #include <linux/linkage.h>
 #include <linux/types.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <larchintrin.h>
 
 /* CPUCFG */
 #define read_cpucfg(reg) __cpucfg(reg)
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 /* LoongArch Registers */
 #define REG_ZERO	0x0
@@ -53,7 +53,7 @@
 #define REG_S7		0x1e
 #define REG_S8		0x1f
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* Bit fields for CPUCFG registers */
 #define LOONGARCH_CPUCFG0		0x0
@@ -171,7 +171,7 @@
  * SW emulation for KVM hypervirsor, see arch/loongarch/include/uapi/asm/kvm_para.h
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* CSR */
 #define csr_read32(reg) __csrrd_w(reg)
@@ -187,7 +187,7 @@
 #define iocsr_write32(val, reg) __iocsrwr_w(val, reg)
 #define iocsr_write64(val, reg) __iocsrwr_d(val, reg)
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /* CSR register number */
 
@@ -1195,7 +1195,7 @@
 #define LOONGARCH_IOCSR_EXTIOI_ROUTE_BASE	0x1c00
 #define IOCSR_EXTIOI_VECTOR_NUM			256
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static __always_inline u64 drdtime(void)
 {
@@ -1357,7 +1357,7 @@ __BUILD_CSR_OP(tlbidx)
 #define clear_csr_estat(val)	\
 	csr_xchg32(~(val), val, LOONGARCH_CSR_ESTAT)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* Generic EntryLo bit definitions */
 #define ENTRYLO_V		(_ULCAST_(1) << 0)
arch/loongarch/include/asm/orc_types.h +2 -2
index caf1f71a1057b..d5fa98d1d1779 100644
@@ -34,7 +34,7 @@
 #define ORC_TYPE_REGS			3
 #define ORC_TYPE_REGS_PARTIAL		4
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * This struct is more or less a vastly simplified version of the DWARF Call
  * Frame Information standard.  It contains only the necessary parts of DWARF
@@ -53,6 +53,6 @@ struct orc_entry {
 	unsigned int	type:3;
 	unsigned int	signal:1;
 };
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ORC_TYPES_H */
arch/loongarch/include/asm/page.h +2 -2
index 7368f12b7cb1e..a3aaf34fba16a 100644
@@ -15,7 +15,7 @@
 #define HPAGE_MASK	(~(HPAGE_SIZE - 1))
 #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/kernel.h>
 #include <linux/pfn.h>
@@ -110,6 +110,6 @@ extern int __virt_addr_valid(volatile void *kaddr);
 #include <asm-generic/memory_model.h>
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_PAGE_H */
arch/loongarch/include/asm/pgtable-bits.h +2 -2
index 45bfc65a0c9f9..7bbfb04a54cc3 100644
@@ -92,7 +92,7 @@
 #define PAGE_KERNEL_WUC __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
 				 _PAGE_GLOBAL | _PAGE_KERN |  _CACHE_WUC)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define _PAGE_IOREMAP		pgprot_val(PAGE_KERNEL_SUC)
 
@@ -127,6 +127,6 @@ static inline pgprot_t pgprot_writecombine(pgprot_t _prot)
 	return __pgprot(prot);
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_PGTABLE_BITS_H */
arch/loongarch/include/asm/pgtable.h +2 -2
index da346733a1dae..5d1a0bc77ee43 100644
@@ -55,7 +55,7 @@
 
 #define USER_PTRS_PER_PGD       ((TASK_SIZE64 / PGDIR_SIZE)?(TASK_SIZE64 / PGDIR_SIZE):1)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/mm_types.h>
 #include <linux/mmzone.h>
@@ -625,6 +625,6 @@ static inline long pmd_protnone(pmd_t pmd)
 #define HAVE_ARCH_UNMAPPED_AREA
 #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_PGTABLE_H */
arch/loongarch/include/asm/prefetch.h +1 -1
index 1672262a5e2ef..0b168cdaae9a9 100644
@@ -8,7 +8,7 @@
 #define Pref_Load	0
 #define Pref_Store	8
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.macro	__pref hint addr
 #ifdef CONFIG_CPU_HAS_PREFETCH
arch/loongarch/include/asm/thread_info.h +2 -2
index 4f5a9441754e3..9dfa2ef008167 100644
@@ -10,7 +10,7 @@
 
 #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/processor.h>
 
@@ -53,7 +53,7 @@ static inline struct thread_info *current_thread_info(void)
 
 register unsigned long current_stack_pointer __asm__("$sp");
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /* thread information allocation */
 #define THREAD_SIZE		SZ_16K
arch/loongarch/include/asm/types.h +1 -1
index baf15a0dcf8b5..0edd731f3d6a0 100644
@@ -8,7 +8,7 @@
 #include <asm-generic/int-ll64.h>
 #include <uapi/asm/types.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _ULCAST_
 #define _U64CAST_
 #else
arch/loongarch/include/asm/unwind_hints.h +2 -2
index a01086ad9ddea..42c442ec044e0 100644
@@ -5,7 +5,7 @@
 #include <linux/objtool.h>
 #include <asm/orc_types.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 .macro UNWIND_HINT_UNDEFINED
 	UNWIND_HINT type=UNWIND_HINT_TYPE_UNDEFINED
@@ -23,6 +23,6 @@
 	UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_CALL
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_LOONGARCH_UNWIND_HINTS_H */
arch/loongarch/include/asm/vdso/getrandom.h +2 -2
index e80f3c4ac7481..4fe152ca99f52 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_GETRANDOM_H
 #define __ASM_VDSO_GETRANDOM_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/unistd.h>
 #include <asm/vdso/vdso.h>
@@ -33,6 +33,6 @@ static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(void
 	return &_loongarch_data.rng_data;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETRANDOM_H */
arch/loongarch/include/asm/vdso/gettimeofday.h +2 -2
index 7eb3f041af764..3e150072cb5a7 100644
@@ -7,7 +7,7 @@
 #ifndef __ASM_VDSO_GETTIMEOFDAY_H
 #define __ASM_VDSO_GETTIMEOFDAY_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/unistd.h>
 #include <asm/vdso/vdso.h>
@@ -101,6 +101,6 @@ const struct vdso_data *__arch_get_timens_vdso_data(const struct vdso_data *vd)
 	return _timens_data;
 }
 #endif
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/loongarch/include/asm/vdso/processor.h +2 -2
index ef5770b343a01..1e255373b0b8e 100644
@@ -5,10 +5,10 @@
 #ifndef __ASM_VDSO_PROCESSOR_H
 #define __ASM_VDSO_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define cpu_relax()	barrier()
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_PROCESSOR_H */
arch/loongarch/include/asm/vdso/vdso.h +2 -2
index 1c183a9b2115a..fa1951408f0a9 100644
@@ -7,7 +7,7 @@
 #ifndef _ASM_VDSO_VDSO_H
 #define _ASM_VDSO_VDSO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/asm.h>
 #include <asm/page.h>
@@ -50,6 +50,6 @@ enum vvar_pages {
 
 extern struct loongarch_vdso_data _loongarch_data __attribute__((visibility("hidden")));
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/loongarch/include/asm/vdso/vsyscall.h +2 -2
index 8987e951d0a93..8cbab22ba7d55 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_VDSO_VSYSCALL_H
 #define __ASM_VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <vdso/datapage.h>
 
@@ -26,6 +26,6 @@ struct vdso_rng_data *__loongarch_get_k_vdso_rng_data(void)
 /* The asm-generic header needs to be included after the definitions above */
 #include <asm-generic/vdso/vsyscall.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
tools/arch/loongarch/include/asm/orc_types.h +2 -2
index caf1f71a1057b..d5fa98d1d1779 100644
@@ -34,7 +34,7 @@
 #define ORC_TYPE_REGS			3
 #define ORC_TYPE_REGS_PARTIAL		4
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * This struct is more or less a vastly simplified version of the DWARF Call
  * Frame Information standard.  It contains only the necessary parts of DWARF
@@ -53,6 +53,6 @@ struct orc_entry {
 	unsigned int	type:3;
 	unsigned int	signal:1;
 };
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ORC_TYPES_H */
Signature · 1 line
2.48.1
#32 lore raw

PATCH 15/41 m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/m68k/include/uapi/asm/bootinfo-vme.h | 4 ++--
 arch/m68k/include/uapi/asm/bootinfo.h     | 8 ++++----
 arch/m68k/include/uapi/asm/ptrace.h       | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
arch/m68k/include/uapi/asm/bootinfo-vme.h +2 -2
index f36a09ab5e79b..b8139eb393524 100644
@@ -33,7 +33,7 @@
 #define VME_TYPE_BVME6000	0x6000	/* BVM Ltd. BVME6000 */
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Board ID data structure - pointer to this retrieved from Bug by head.S
@@ -56,7 +56,7 @@ typedef struct {
 	__be32	option2;
 } t_bdid, *p_bdid;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
     /*
arch/m68k/include/uapi/asm/bootinfo.h +4 -4
index 024e87d7095f8..28d2d44c08d06 100644
@@ -16,7 +16,7 @@
 #include <linux/types.h>
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
     /*
      *  Bootinfo definitions
@@ -43,7 +43,7 @@ struct mem_info {
 	__be32 size;			/* length of memory chunk (in bytes) */
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
     /*
@@ -167,7 +167,7 @@ struct mem_info {
 #define BI_VERSION_MAJOR(v)		(((v) >> 16) & 0xffff)
 #define BI_VERSION_MINOR(v)		((v) & 0xffff)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct bootversion {
 	__be16 branch;
@@ -178,7 +178,7 @@ struct bootversion {
 	} machversions[];
 } __packed;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _UAPI_ASM_M68K_BOOTINFO_H */
arch/m68k/include/uapi/asm/ptrace.h +2 -2
index ebd9fccb3d11f..d70f771399b40 100644
@@ -22,7 +22,7 @@
 #define PT_SR	   17
 #define PT_PC	   18
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* this struct defines the way the registers are stored on the
    stack during a system call. */
@@ -81,5 +81,5 @@ struct switch_stack {
 #define PTRACE_GETFDPIC_EXEC	0
 #define PTRACE_GETFDPIC_INTERP	1
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _UAPI_M68K_PTRACE_H */
Signature · 1 line
2.48.1
#33 lore raw

PATCH 16/41 m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is almost a completely mechanical patch (done with a simple "sed -i" statement), with one comment tweaked manually in arch/m68k/include/asm/mac_baboon.h (which was missing underscores).

---
 arch/m68k/include/asm/adb_iop.h          |  4 ++--
 arch/m68k/include/asm/bootinfo.h         |  4 ++--
 arch/m68k/include/asm/entry.h            |  4 ++--
 arch/m68k/include/asm/kexec.h            |  4 ++--
 arch/m68k/include/asm/mac_baboon.h       |  4 ++--
 arch/m68k/include/asm/mac_iop.h          |  4 ++--
 arch/m68k/include/asm/mac_oss.h          |  4 ++--
 arch/m68k/include/asm/mac_psc.h          |  4 ++--
 arch/m68k/include/asm/mac_via.h          |  4 ++--
 arch/m68k/include/asm/math-emu.h         |  6 +++---
 arch/m68k/include/asm/mcf_pgtable.h      |  4 ++--
 arch/m68k/include/asm/mcfmmu.h           |  2 +-
 arch/m68k/include/asm/motorola_pgtable.h |  4 ++--
 arch/m68k/include/asm/nettel.h           |  4 ++--
 arch/m68k/include/asm/openprom.h         |  4 ++--
 arch/m68k/include/asm/page.h             |  4 ++--
 arch/m68k/include/asm/page_mm.h          |  4 ++--
 arch/m68k/include/asm/page_no.h          |  4 ++--
 arch/m68k/include/asm/pgtable.h          |  2 +-
 arch/m68k/include/asm/pgtable_mm.h       |  8 ++++----
 arch/m68k/include/asm/ptrace.h           |  4 ++--
 arch/m68k/include/asm/setup.h            | 10 +++++-----
 arch/m68k/include/asm/sun3_pgtable.h     |  8 ++++----
 arch/m68k/include/asm/sun3mmu.h          |  4 ++--
 arch/m68k/include/asm/thread_info.h      |  6 +++---
 arch/m68k/include/asm/traps.h            |  6 +++---
 arch/m68k/math-emu/fp_emu.h              |  8 ++++----
 27 files changed, 64 insertions(+), 64 deletions(-)
arch/m68k/include/asm/adb_iop.h +2 -2
index 6aecd020e2fc9..ca10b1ec0c785 100644
@@ -33,7 +33,7 @@
 #define ADB_IOP_SRQ		0x04	/* SRQ detected                */
 #define ADB_IOP_TIMEOUT		0x02	/* nonzero if timeout          */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct adb_iopmsg {
 	__u8 flags;		/* ADB flags         */
@@ -43,4 +43,4 @@ struct adb_iopmsg {
 	__u8 spare[21];		/* spare             */
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
arch/m68k/include/asm/bootinfo.h +2 -2
index 81c91af8ec6c0..267272b436e27 100644
@@ -14,7 +14,7 @@
 #include <uapi/asm/bootinfo.h>
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_BOOTINFO_PROC
 extern void save_bootinfo(const struct bi_record *bi);
@@ -28,7 +28,7 @@ void process_uboot_commandline(char *commandp, int size);
 static inline void process_uboot_commandline(char *commandp, int size) {}
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #endif /* _M68K_BOOTINFO_H */
arch/m68k/include/asm/entry.h +2 -2
index 9b52b060c76ab..86cba7c19e679 100644
@@ -4,7 +4,7 @@
 
 #include <asm/setup.h>
 #include <asm/page.h>
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #include <asm/thread_info.h>
 #endif
 
@@ -41,7 +41,7 @@
 #define ALLOWINT	(~0x700)
 #endif /* machine compilation types */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 /*
  * This defines the normal kernel pt-regs layout.
  *
arch/m68k/include/asm/kexec.h +2 -2
index 3b0b64f0a3531..f79427bd64878 100644
@@ -15,7 +15,7 @@
 
 #define KEXEC_ARCH KEXEC_ARCH_68K
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static inline void crash_setup_regs(struct pt_regs *newregs,
 				    struct pt_regs *oldregs)
@@ -23,7 +23,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
 	/* Dummy implementation for now */
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* CONFIG_KEXEC_CORE */
 
arch/m68k/include/asm/mac_baboon.h +2 -2
index 08d9b8829a1ab..ed5b5b48bdf83 100644
@@ -5,7 +5,7 @@
 
 #define BABOON_BASE (0x50F1A000)	/* same as IDE controller base */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct baboon {
 	char	pad1[208];	/* generic IDE registers, not used here */
@@ -36,4 +36,4 @@ extern void baboon_register_interrupts(void);
 extern void baboon_irq_enable(int);
 extern void baboon_irq_disable(int);
 
-#endif /* __ASSEMBLY **/
+#endif /* __ASSEMBLER__ */
arch/m68k/include/asm/mac_iop.h +2 -2
index 32f1c79c818f1..a6753eb16ba46 100644
@@ -66,7 +66,7 @@
 #define IOP_ADDR_ALIVE		0x031F
 #define IOP_ADDR_RECV_MSG	0x0320
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * IOP Control registers, staggered because in usual Apple style they were
@@ -163,4 +163,4 @@ extern void iop_ism_irq_poll(uint);
 
 extern void iop_register_interrupts(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
arch/m68k/include/asm/mac_oss.h +2 -2
index 56ef986c0a9b1..a6e86e443155f 100644
@@ -59,7 +59,7 @@
 
 #define OSS_POWEROFF	0x80
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct mac_oss {
     __u8  irq_level[0x10];	/* [0x000-0x00f] Interrupt levels */
@@ -77,4 +77,4 @@ extern void oss_register_interrupts(void);
 extern void oss_irq_enable(int);
 extern void oss_irq_disable(int);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
arch/m68k/include/asm/mac_psc.h +2 -2
index 86a5a5eab89ed..6587dbd544764 100644
@@ -207,7 +207,7 @@
 				 * Unknown, always 0x0000.
 				 */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern volatile __u8 *psc;
 
@@ -249,4 +249,4 @@ static inline u32 psc_read_long(int offset)
 	return *((volatile __u32 *)(psc + offset));
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
arch/m68k/include/asm/mac_via.h +2 -2
index a9ef1e9ba6c41..b065cd8e5071e 100644
@@ -250,7 +250,7 @@
 #define IER_SET_BIT(b) (0x80 | (1<<(b)) )
 #define IER_CLR_BIT(b) (0x7F & (1<<(b)) )
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern volatile __u8 *via1,*via2;
 extern int rbv_present,via_alt_mapping;
@@ -267,6 +267,6 @@ extern void via1_irq(struct irq_desc *desc);
 extern void via1_set_head(int);
 extern int via2_scsi_drq_pending(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_MAC_VIA_H_ */
arch/m68k/include/asm/math-emu.h +3 -3
index eefaa3a2b596f..91074ade14ad6 100644
@@ -67,7 +67,7 @@
 #define PMUNIMPL	(1<<PUNIMPL)
 #define PMMOVEM		(1<<PMOVEM)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -127,7 +127,7 @@ extern unsigned int fp_debugprint;
 
 #define FPDATA		((struct fp_data *)current->thread.fp)
 
-#else	/* __ASSEMBLY__ */
+#else	/* __ASSEMBLER__ */
 
 #define FPDATA		%a2
 
@@ -311,6 +311,6 @@ old_gas=old_gas+1
 .endm
 
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif	/* _ASM_M68K_SETUP_H */
arch/m68k/include/asm/mcf_pgtable.h +2 -2
index 48f87a8a88320..a6189351aa907 100644
@@ -92,7 +92,7 @@
 #define PTE_MASK	PAGE_MASK
 #define CF_PAGE_CHG_MASK (PTE_MASK | CF_PAGE_ACCESSED | CF_PAGE_DIRTY)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define pmd_pgtable(pmd) pfn_to_virt(pmd_val(pmd) >> PAGE_SHIFT)
 
@@ -298,5 +298,5 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
 #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #define pte_pfn(pte)		(pte_val(pte) >> PAGE_SHIFT)
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 #endif	/* _MCF_PGTABLE_H */
arch/m68k/include/asm/mcfmmu.h +1 -1
index 283352ab0d5d8..db16ea1057f7b 100644
@@ -88,7 +88,7 @@
 #define	MMUDR_PAN	10			/* Physical address */
 #define	MMUDR_PAMASK	0xfffffc00		/* PA mask */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  *	Simple access functions for the MMU registers. Nothing fancy
arch/m68k/include/asm/motorola_pgtable.h +2 -2
index 9866c7acdabe1..aea231a2b2c04 100644
@@ -44,7 +44,7 @@
 /* We borrow bit 11 to store the exclusive marker in swap PTEs. */
 #define _PAGE_SWP_EXCLUSIVE	0x800
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* This is the cache mode to be used for pages containing page descriptors for
  * processors >= '040. It is in pte_mknocache(), and the variable is defined
@@ -208,5 +208,5 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
 	return pte;
 }
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 #endif /* _MOTOROLA_PGTABLE_H */
arch/m68k/include/asm/nettel.h +2 -2
index 3bd4b7a4613f6..9bf55cef119e2 100644
@@ -38,7 +38,7 @@
 
 #define	NETtel_LEDADDR	0x30400000
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern volatile unsigned short ppdata;
 
@@ -80,7 +80,7 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 #define	MCFPP_DTR0	0x0040
 #define	MCFPP_DTR1	0x0000		/* Port 1 no DTR support */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  *	These functions defined to give quasi generic access to the
  *	PPIO bits used for DTR/DCD.
arch/m68k/include/asm/openprom.h +2 -2
index dd22e649f5c56..6456ba40a9464 100644
@@ -21,7 +21,7 @@
 #define	LINUX_OPPROM_MAGIC      0x10010407
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /* V0 prom device operations. */
 struct linux_dev_v0_funcs {
 	int (*v0_devopen)(char *device_str);
@@ -308,6 +308,6 @@ struct linux_prom_ranges {
 	unsigned int or_size;
 };
 
-#endif /* !(__ASSEMBLY__) */
+#endif /* !(__ASSEMBLER__) */
 
 #endif /* !(__SPARC_OPENPROM_H) */
arch/m68k/include/asm/page.h +2 -2
index b173ba27d36f1..d30f8b2f15927 100644
@@ -10,7 +10,7 @@
 
 #define PAGE_OFFSET	(PAGE_OFFSET_RAW)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * These are used to make use of C type-checking..
@@ -48,7 +48,7 @@ extern unsigned long _rambase;
 extern unsigned long _ramstart;
 extern unsigned long _ramend;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #ifdef CONFIG_MMU
 #include <asm/page_mm.h>
arch/m68k/include/asm/page_mm.h +2 -2
index e0ae4d5fc9859..ed782609ca413 100644
@@ -2,7 +2,7 @@
 #ifndef _M68K_PAGE_MM_H
 #define _M68K_PAGE_MM_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <asm/module.h>
@@ -144,6 +144,6 @@ extern int m68k_virt_to_node_shift;
 #define virt_addr_valid(kaddr)	((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
 #define pfn_valid(pfn)		virt_addr_valid(pfn_to_virt(pfn))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _M68K_PAGE_MM_H */
arch/m68k/include/asm/page_no.h +2 -2
index 63c0e706084b1..39db2026a4b4c 100644
@@ -2,7 +2,7 @@
 #ifndef _M68K_PAGE_NO_H
 #define _M68K_PAGE_NO_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  
 extern unsigned long memory_start;
 extern unsigned long memory_end;
@@ -37,6 +37,6 @@ static inline void *pfn_to_virt(unsigned long pfn)
 
 #define ARCH_PFN_OFFSET PHYS_PFN(PAGE_OFFSET_RAW)
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _M68K_PAGE_NO_H */
arch/m68k/include/asm/pgtable.h +1 -1
index 49fcfd7348600..02f1a4601379f 100644
@@ -10,7 +10,7 @@
 #include <asm/pgtable_mm.h>
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void paging_init(void);
 #endif
 
arch/m68k/include/asm/pgtable_mm.h +4 -4
index dbdf1c2b2f66b..62f2ff4e6799b 100644
@@ -11,7 +11,7 @@
 
 #include <asm/setup.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/processor.h>
 #include <linux/sched.h>
 #include <linux/threads.h>
@@ -145,7 +145,7 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf,
 #define update_mmu_cache(vma, addr, ptep) \
 	update_mmu_cache_range(NULL, vma, addr, ptep, 1)
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /* MMU-specific headers */
 
@@ -157,7 +157,7 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf,
 #include <asm/motorola_pgtable.h>
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Macro to mark a page protection value as "uncacheable".
  */
@@ -182,6 +182,6 @@ pgprot_t pgprot_dmacoherent(pgprot_t prot);
 #define pgprot_dmacoherent(prot)	pgprot_dmacoherent(prot)
 
 #endif /* CONFIG_COLDFIRE */
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _M68K_PGTABLE_H */
arch/m68k/include/asm/ptrace.h +2 -2
index ea5a80ca1ab33..bc86ce012025e 100644
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/ptrace.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifndef PS_S
 #define PS_S  (0x2000)
@@ -24,5 +24,5 @@
 #define arch_has_block_step()	(1)
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _M68K_PTRACE_H */
arch/m68k/include/asm/setup.h +5 -5
index 2c99477aaf89a..e4ec169f5c7d6 100644
@@ -28,9 +28,9 @@
 
 #define CL_SIZE COMMAND_LINE_SIZE
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned long m68k_machtype;
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #if !defined(CONFIG_AMIGA)
 #  define MACH_IS_AMIGA (0)
@@ -199,7 +199,7 @@ extern unsigned long m68k_machtype;
 #endif
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned long m68k_cputype;
 extern unsigned long m68k_fputype;
 extern unsigned long m68k_mmutype;
@@ -213,7 +213,7 @@ extern unsigned long vme_brdtype;
      */
 
 extern int m68k_is040or060;
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #if !defined(CONFIG_M68020)
 #  define CPU_IS_020 (0)
@@ -321,7 +321,7 @@ extern int m68k_is040or060;
 
 #define NUM_MEMINFO	4
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct m68k_mem_info {
 	unsigned long addr;		/* physical address of memory chunk */
 	unsigned long size;		/* length of memory chunk (in bytes) */
arch/m68k/include/asm/sun3_pgtable.h +4 -4
index 30081aee81643..bdbeaa90dbcc7 100644
@@ -4,7 +4,7 @@
 
 #include <asm/sun3mmu.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/virtconvert.h>
 #include <linux/linkage.h>
 
@@ -19,7 +19,7 @@
 #define PTOV(addr)	__va(addr)
 
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 /* These need to be defined for compatibility although the sun3 doesn't use them */
 #define _PAGE_NOCACHE030 0x040
@@ -74,7 +74,7 @@
 /* We borrow bit 6 to store the exclusive marker in swap PTEs. */
 #define _PAGE_SWP_EXCLUSIVE	0x040
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Conversion functions: convert a page and protection to a page entry,
@@ -192,5 +192,5 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
 	return pte;
 }
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 #endif	/* !_SUN3_PGTABLE_H */
arch/m68k/include/asm/sun3mmu.h +2 -2
index 21a75daa278f2..fee05cd2ce5ba 100644
@@ -67,7 +67,7 @@
 #define SUN3_BUSERR_PROTERR	(0x40)
 #define SUN3_BUSERR_INVALID	(0x80)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* Read bus error status register (implicitly clearing it). */
 static inline unsigned char sun3_get_buserr(void)
@@ -167,6 +167,6 @@ extern void __iomem *sun3_ioremap(unsigned long phys, unsigned long size,
 
 extern int sun3_map_test(unsigned long addr, char *val);
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 #endif	/* !__SUN3_MMU_H__ */
arch/m68k/include/asm/thread_info.h +3 -3
index 3e31adbddc75f..5cb3ace556222 100644
@@ -22,7 +22,7 @@
 
 #define THREAD_SIZE	(PAGE_SIZE << THREAD_SIZE_ORDER)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct thread_info {
 	struct task_struct	*task;		/* main task structure */
@@ -31,7 +31,7 @@ struct thread_info {
 	__u32			cpu;		/* should always be 0 on m68k */
 	unsigned long		tp_value;	/* thread pointer */
 };
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #define INIT_THREAD_INFO(tsk)			\
 {						\
@@ -39,7 +39,7 @@ struct thread_info {
 	.preempt_count	= INIT_PREEMPT_COUNT,	\
 }
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /* how to get the thread information struct from C */
 static inline struct thread_info *current_thread_info(void)
 {
arch/m68k/include/asm/traps.h +3 -3
index a9d5c1c870d31..c7b3989bd4b25 100644
@@ -11,7 +11,7 @@
 #ifndef _M68K_TRAPS_H
 #define _M68K_TRAPS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/linkage.h>
 #include <asm/ptrace.h>
@@ -94,7 +94,7 @@ asmlinkage void bad_inthandler(void);
 
 #define VECOFF(vec) ((vec)<<2)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* Status register bits */
 #define PS_T  (0x8000)
@@ -271,6 +271,6 @@ struct frame {
 asmlinkage void berr_040cleanup(struct frame *fp);
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _M68K_TRAPS_H */
arch/m68k/math-emu/fp_emu.h +4 -4
index c1ecfef7886a6..6ac811c31ca4d 100644
@@ -38,12 +38,12 @@
 #ifndef _FP_EMU_H
 #define _FP_EMU_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #include <asm/asm-offsets.h>
 #endif
 #include <asm/math-emu.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define IS_INF(a) ((a)->exp == 0x7fff)
 #define IS_ZERO(a) ((a)->mant.m64 == 0)
@@ -124,7 +124,7 @@ extern const struct fp_ext fp_Inf;
 			: "a1", "d1", "d2", "memory");		\
 })
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 /*
  * set, reset or clear a bit in the fp status register
@@ -141,6 +141,6 @@ extern const struct fp_ext fp_Inf;
 	btst	#(\bit&7),(FPD_FPSR+3-(\bit/8),FPDATA)
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _FP_EMU_H */
Signature · 1 line
2.48.1
#34 lore raw

PATCH 17/41 microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/microblaze/include/uapi/asm/ptrace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/microblaze/include/uapi/asm/ptrace.h +2 -2
index 46dd94cb78021..8039957a1a9cd 100644
@@ -10,7 +10,7 @@
 #ifndef _UAPI_ASM_MICROBLAZE_PTRACE_H
 #define _UAPI_ASM_MICROBLAZE_PTRACE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef unsigned long microblaze_reg_t;
 
@@ -68,6 +68,6 @@ struct pt_regs {
 
 #endif /* __KERNEL */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _UAPI_ASM_MICROBLAZE_PTRACE_H */
Signature · 1 line
2.48.1
maintainer Applied
#35 lore raw

Re: [PATCH 17/41] microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Quoted 29 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/microblaze/include/uapi/asm/ptrace.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/microblaze/include/uapi/asm/ptrace.h +1 -1
index 46dd94cb78021..8039957a1a9cd 100644
@@ -10,7 +10,7 @@
  #ifndef _UAPI_ASM_MICROBLAZE_PTRACE_H
  #define _UAPI_ASM_MICROBLAZE_PTRACE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  typedef unsigned long microblaze_reg_t;
 

arch/microblaze/include/uapi/asm/ptrace.h struct pt_regs { · line 73

Quoted 7 lines
arch/microblaze/include/uapi/asm/ptrace.h +1 -1
@@ -68,6 +68,6 @@ struct pt_regs {
 
  #endif /* __KERNEL */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif /* _UAPI_ASM_MICROBLAZE_PTRACE_H */

Applied.
M

Signature · 6 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs
TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs
#36 lore raw

PATCH 18/41 microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/microblaze/include/asm/asm-compat.h       |  2 +-
 arch/microblaze/include/asm/current.h          |  4 ++--
 arch/microblaze/include/asm/entry.h            |  4 ++--
 arch/microblaze/include/asm/exceptions.h       |  4 ++--
 arch/microblaze/include/asm/fixmap.h           |  4 ++--
 arch/microblaze/include/asm/ftrace.h           |  2 +-
 arch/microblaze/include/asm/kgdb.h             |  4 ++--
 arch/microblaze/include/asm/mmu.h              |  4 ++--
 arch/microblaze/include/asm/page.h             |  8 ++++----
 arch/microblaze/include/asm/pgtable.h          | 18 +++++++++---------
 arch/microblaze/include/asm/processor.h        |  8 ++++----
 arch/microblaze/include/asm/ptrace.h           |  4 ++--
 arch/microblaze/include/asm/sections.h         |  4 ++--
 arch/microblaze/include/asm/setup.h            |  4 ++--
 arch/microblaze/include/asm/thread_info.h      |  4 ++--
 arch/microblaze/include/asm/unistd.h           |  4 ++--
 .../microblaze/include/asm/xilinx_mb_manager.h |  4 ++--
 17 files changed, 43 insertions(+), 43 deletions(-)
arch/microblaze/include/asm/asm-compat.h +1 -1
index c05259ce2d2c2..9f04614762319 100644
@@ -4,7 +4,7 @@
 
 #include <asm/types.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #  define stringify_in_c(...)	__VA_ARGS__
 #  define ASM_CONST(x)		x
 #else
arch/microblaze/include/asm/current.h +2 -2
index a4bb45be30e69..099e69f32bf97 100644
@@ -14,13 +14,13 @@
  * but check asm/microblaze/kernel/entry.S to be sure.
  */
 #define CURRENT_TASK	r31
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 /*
  * Dedicate r31 to keeping the current task pointer
  */
 register struct task_struct *current asm("r31");
 
 # define get_current()	current
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_MICROBLAZE_CURRENT_H */
arch/microblaze/include/asm/entry.h +2 -2
index 6c42bed411662..9efadf12397ca 100644
@@ -21,7 +21,7 @@
 
 #define PER_CPU(var) var
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
 DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
 DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
@@ -29,6 +29,6 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
 DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
 
 extern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_MICROBLAZE_ENTRY_H */
arch/microblaze/include/asm/exceptions.h +2 -2
index 967f175173e14..c4591e4f7175b 100644
@@ -11,7 +11,7 @@
 #define _ASM_MICROBLAZE_EXCEPTIONS_H
 
 #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* Macros to enable and disable HW exceptions in the MSR */
 /* Define MSR enable bit for HW exceptions */
@@ -64,6 +64,6 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);
 void die(const char *str, struct pt_regs *fp, long err);
 void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
 
-#endif /*__ASSEMBLY__ */
+#endif /*__ASSEMBLER__ */
 #endif /* __KERNEL__ */
 #endif /* _ASM_MICROBLAZE_EXCEPTIONS_H */
arch/microblaze/include/asm/fixmap.h +2 -2
index e6e9288bff761..f9797849e4d43 100644
@@ -15,7 +15,7 @@
 #ifndef _ASM_FIXMAP_H
 #define _ASM_FIXMAP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/kernel.h>
 #include <asm/page.h>
 #ifdef CONFIG_HIGHMEM
@@ -62,5 +62,5 @@ extern void __set_fixmap(enum fixed_addresses idx,
 
 #include <asm-generic/fixmap.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif
arch/microblaze/include/asm/ftrace.h +1 -1
index 4ca38b92a3a20..27c1bafb669c3 100644
@@ -7,7 +7,7 @@
 #define MCOUNT_ADDR		((unsigned long)(_mcount))
 #define MCOUNT_INSN_SIZE	8 /* sizeof mcount call */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void _mcount(void);
 extern void ftrace_call_graph(void);
 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
arch/microblaze/include/asm/kgdb.h +2 -2
index 8dc5ebb07fd5a..321c3c8bfcf27 100644
@@ -3,7 +3,7 @@
 #ifndef __MICROBLAZE_KGDB_H__
 #define __MICROBLAZE_KGDB_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define CACHE_FLUSH_IS_SAFE	1
 #define BUFMAX			2048
@@ -27,6 +27,6 @@ static inline void arch_kgdb_breakpoint(void)
 struct pt_regs;
 asmlinkage void microblaze_kgdb_break(struct pt_regs *regs);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __MICROBLAZE_KGDB_H__ */
 #endif /* __KERNEL__ */
arch/microblaze/include/asm/mmu.h +2 -2
index b928a87c00766..7262dc4da3385 100644
@@ -9,7 +9,7 @@
 #define _ASM_MICROBLAZE_MMU_H
 
 #  ifdef __KERNEL__
-#   ifndef __ASSEMBLY__
+#   ifndef __ASSEMBLER__
 
 /* Default "unsigned long" context */
 typedef unsigned long mm_context_t;
@@ -56,7 +56,7 @@ extern void _tlbia(void);		/* invalidate all TLB entries */
  * mapping has to increase tlb_skip size.
  */
 extern u32 tlb_skip;
-#   endif /* __ASSEMBLY__ */
+#   endif /* __ASSEMBLER__ */
 
 /*
  * The MicroBlaze processor has a TLB architecture identical to PPC-40x. The
arch/microblaze/include/asm/page.h +4 -4
index 90fc9c81debda..90ac9f34b4b49 100644
@@ -25,7 +25,7 @@
 
 #define PTE_SHIFT	(PAGE_SHIFT - 2)	/* 1024 ptes per page */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * PAGE_OFFSET -- the first address of the first page of memory. With MMU
@@ -100,7 +100,7 @@ extern int page_is_ram(unsigned long pfn);
 #  define page_to_virt(page)   __va(page_to_pfn(page) << PAGE_SHIFT)
 
 #  define ARCH_PFN_OFFSET	(memory_start >> PAGE_SHIFT)
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
 /* Convert between virtual and physical address for MMU. */
 /* Handle MicroBlaze processor with virtual memory. */
@@ -113,7 +113,7 @@ extern int page_is_ram(unsigned long pfn);
 #define tovirt(rd, rs) \
 	addik rd, rs, (CONFIG_KERNEL_START - CONFIG_KERNEL_BASE_ADDR)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 # define __pa(x)	__virt_to_phys((unsigned long)(x))
 # define __va(x)	((void *)__phys_to_virt((unsigned long)(x)))
@@ -130,7 +130,7 @@ static inline const void *pfn_to_virt(unsigned long pfn)
 
 #define	virt_addr_valid(vaddr)	(pfn_valid(virt_to_pfn(vaddr)))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #define TOPHYS(addr)  __virt_to_phys(addr)
 
arch/microblaze/include/asm/pgtable.h +9 -9
index e4ea2ec3642f0..eadc73d22dda6 100644
@@ -10,14 +10,14 @@
 
 #include <asm/setup.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern int mem_init_done;
 #endif
 
 #include <asm-generic/pgtable-nopmd.h>
 
 #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/sched.h>
 #include <linux/threads.h>
@@ -39,7 +39,7 @@ extern pte_t *va_to_pte(unsigned long address);
 #define VMALLOC_START	(CONFIG_KERNEL_START + CONFIG_LOWMEM_SIZE)
 #define VMALLOC_END	ioremap_bot
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * Macro to mark a page protection value as "uncacheable".
@@ -208,7 +208,7 @@ extern pte_t *va_to_pte(unsigned long address);
  * Also, write permissions imply read permissions.
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * ZERO_PAGE is a global shared page that is always zero: used
  * for zero-mapped memory areas etc..
@@ -216,7 +216,7 @@ extern pte_t *va_to_pte(unsigned long address);
 extern unsigned long empty_zero_page[1024];
 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #define pte_none(pte)		((pte_val(pte) & ~_PTE_NONE_MASK) == 0)
 #define pte_present(pte)	(pte_val(pte) & _PAGE_PRESENT)
@@ -237,7 +237,7 @@ extern unsigned long empty_zero_page[1024];
 #define pfn_pte(pfn, prot) \
 	__pte(((pte_basic_t)(pfn) << PFN_PTE_SHIFT) | pgprot_val(prot))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * The following only work if pte_present() is true.
  * Undefined behaviour if not..
@@ -444,13 +444,13 @@ extern int mem_init_done;
 
 asmlinkage void __init mmu_init(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __KERNEL__ */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern unsigned long ioremap_bot, ioremap_base;
 
 void setup_memory(void);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_MICROBLAZE_PGTABLE_H */
arch/microblaze/include/asm/processor.h +4 -4
index 4e193c7550dfa..d59bdfffca7cc 100644
@@ -14,7 +14,7 @@
 #include <asm/entry.h>
 #include <asm/current.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 /* from kernel/cpu/mb.c */
 extern const struct seq_operations cpuinfo_op;
 
@@ -29,7 +29,7 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
 extern void ret_from_fork(void);
 extern void ret_from_kernel_thread(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
 /*
  * This is used to define STACK_TOP, and with MMU it must be below
@@ -45,7 +45,7 @@ extern void ret_from_kernel_thread(void);
 
 # define THREAD_KSP	0
 
-#  ifndef __ASSEMBLY__
+#  ifndef __ASSEMBLER__
 
 /* If you change this, you must change the associated assembly-languages
  * constants defined below, THREAD_*.
@@ -88,5 +88,5 @@ unsigned long __get_wchan(struct task_struct *p);
 extern struct dentry *of_debugfs_root;
 #endif
 
-#  endif /* __ASSEMBLY__ */
+#  endif /* __ASSEMBLER__ */
 #endif /* _ASM_MICROBLAZE_PROCESSOR_H */
arch/microblaze/include/asm/ptrace.h +2 -2
index bfcb89df5e26f..17982292a64fd 100644
@@ -7,7 +7,7 @@
 
 #include <uapi/asm/ptrace.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define kernel_mode(regs)		((regs)->pt_mode)
 #define user_mode(regs)			(!kernel_mode(regs))
 
@@ -20,5 +20,5 @@ static inline long regs_return_value(struct pt_regs *regs)
 	return regs->r3;
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _ASM_MICROBLAZE_PTRACE_H */
arch/microblaze/include/asm/sections.h +2 -2
index a9311ad84a67f..f5008f5e7a5c1 100644
@@ -10,11 +10,11 @@
 
 #include <asm-generic/sections.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 extern char _ssbss[], _esbss[];
 extern unsigned long __ivt_start[], __ivt_end[];
 
 extern u32 _fdt_start[], _fdt_end[];
 
-# endif /* !__ASSEMBLY__ */
+# endif /* !__ASSEMBLER__ */
 #endif /* _ASM_MICROBLAZE_SECTIONS_H */
arch/microblaze/include/asm/setup.h +2 -2
index bf2600f759593..837ed0bbae4b5 100644
@@ -9,7 +9,7 @@
 
 #include <uapi/asm/setup.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 extern char cmd_line[COMMAND_LINE_SIZE];
 
 extern char *klimit;
@@ -25,5 +25,5 @@ void machine_shutdown(void);
 void machine_halt(void);
 void machine_power_off(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 #endif /* _ASM_MICROBLAZE_SETUP_H */
arch/microblaze/include/asm/thread_info.h +2 -2
index a0ddd2a36fb94..0153f7c2717c9 100644
@@ -13,7 +13,7 @@
 #define THREAD_SIZE		(1 << THREAD_SHIFT)
 #define THREAD_SIZE_ORDER	1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 # include <linux/types.h>
 # include <asm/processor.h>
 
@@ -86,7 +86,7 @@ static inline struct thread_info *current_thread_info(void)
 }
 
 /* thread information allocation */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * thread information flags
arch/microblaze/include/asm/unistd.h +2 -2
index cfe3f888b432b..fedda9908aa94 100644
@@ -8,7 +8,7 @@
 
 #include <uapi/asm/unistd.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* #define __ARCH_WANT_OLD_READDIR */
 /* #define __ARCH_WANT_OLD_STAT */
@@ -33,6 +33,6 @@
 #define __ARCH_WANT_SYS_VFORK
 #define __ARCH_WANT_SYS_FORK
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_MICROBLAZE_UNISTD_H */
arch/microblaze/include/asm/xilinx_mb_manager.h +2 -2
index 7b6995722b0c0..121a3224882b2 100644
@@ -5,7 +5,7 @@
 #ifndef _XILINX_MB_MANAGER_H
 #define _XILINX_MB_MANAGER_H
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 
 #include <linux/of_address.h>
 
@@ -21,7 +21,7 @@ void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
 			  void *priv, void (*reset_callback)(void *data));
 asmlinkage void xmb_inject_err(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
 /* Error injection offset */
 #define XMB_INJECT_ERR_OFFSET	0x200
Signature · 1 line
2.48.1
maintainer
#37 lore raw

Re: [PATCH 18/41] microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

Quoted 451 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/microblaze/include/asm/asm-compat.h       |  2 +-
  arch/microblaze/include/asm/current.h          |  4 ++--
  arch/microblaze/include/asm/entry.h            |  4 ++--
  arch/microblaze/include/asm/exceptions.h       |  4 ++--
  arch/microblaze/include/asm/fixmap.h           |  4 ++--
  arch/microblaze/include/asm/ftrace.h           |  2 +-
  arch/microblaze/include/asm/kgdb.h             |  4 ++--
  arch/microblaze/include/asm/mmu.h              |  4 ++--
  arch/microblaze/include/asm/page.h             |  8 ++++----
  arch/microblaze/include/asm/pgtable.h          | 18 +++++++++---------
  arch/microblaze/include/asm/processor.h        |  8 ++++----
  arch/microblaze/include/asm/ptrace.h           |  4 ++--
  arch/microblaze/include/asm/sections.h         |  4 ++--
  arch/microblaze/include/asm/setup.h            |  4 ++--
  arch/microblaze/include/asm/thread_info.h      |  4 ++--
  arch/microblaze/include/asm/unistd.h           |  4 ++--
  .../microblaze/include/asm/xilinx_mb_manager.h |  4 ++--
  17 files changed, 43 insertions(+), 43 deletions(-)
arch/microblaze/include/asm/asm-compat.h +1 -1
index c05259ce2d2c2..9f04614762319 100644
@@ -4,7 +4,7 @@
 
  #include <asm/types.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
  #  define stringify_in_c(...)	__VA_ARGS__
  #  define ASM_CONST(x)		x
  #else
arch/microblaze/include/asm/current.h +2 -2
index a4bb45be30e69..099e69f32bf97 100644
@@ -14,13 +14,13 @@
   * but check asm/microblaze/kernel/entry.S to be sure.
   */
  #define CURRENT_TASK	r31
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  /*
   * Dedicate r31 to keeping the current task pointer
   */
  register struct task_struct *current asm("r31");
 
  # define get_current()	current
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_CURRENT_H */
arch/microblaze/include/asm/entry.h +2 -2
index 6c42bed411662..9efadf12397ca 100644
@@ -21,7 +21,7 @@
 
  #define PER_CPU(var) var
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
  DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
  DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
@@ -29,6 +29,6 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
  DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
 
  extern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_ENTRY_H */
arch/microblaze/include/asm/exceptions.h +2 -2
index 967f175173e14..c4591e4f7175b 100644
@@ -11,7 +11,7 @@
  #define _ASM_MICROBLAZE_EXCEPTIONS_H
 
  #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /* Macros to enable and disable HW exceptions in the MSR */
  /* Define MSR enable bit for HW exceptions */
@@ -64,6 +64,6 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);
  void die(const char *str, struct pt_regs *fp, long err);
  void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
 
-#endif /*__ASSEMBLY__ */
+#endif /*__ASSEMBLER__ */
  #endif /* __KERNEL__ */
  #endif /* _ASM_MICROBLAZE_EXCEPTIONS_H */
arch/microblaze/include/asm/fixmap.h +2 -2
index e6e9288bff761..f9797849e4d43 100644
@@ -15,7 +15,7 @@
  #ifndef _ASM_FIXMAP_H
  #define _ASM_FIXMAP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #include <linux/kernel.h>
  #include <asm/page.h>
  #ifdef CONFIG_HIGHMEM
@@ -62,5 +62,5 @@ extern void __set_fixmap(enum fixed_addresses idx,
 
  #include <asm-generic/fixmap.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif
arch/microblaze/include/asm/ftrace.h +1 -1
index 4ca38b92a3a20..27c1bafb669c3 100644
@@ -7,7 +7,7 @@
  #define MCOUNT_ADDR		((unsigned long)(_mcount))
  #define MCOUNT_INSN_SIZE	8 /* sizeof mcount call */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern void _mcount(void);
  extern void ftrace_call_graph(void);
  void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
arch/microblaze/include/asm/kgdb.h +2 -2
index 8dc5ebb07fd5a..321c3c8bfcf27 100644
@@ -3,7 +3,7 @@
  #ifndef __MICROBLAZE_KGDB_H__
  #define __MICROBLAZE_KGDB_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define CACHE_FLUSH_IS_SAFE	1
  #define BUFMAX			2048
@@ -27,6 +27,6 @@ static inline void arch_kgdb_breakpoint(void)
  struct pt_regs;
  asmlinkage void microblaze_kgdb_break(struct pt_regs *regs);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __MICROBLAZE_KGDB_H__ */
  #endif /* __KERNEL__ */
arch/microblaze/include/asm/mmu.h +2 -2
index b928a87c00766..7262dc4da3385 100644
@@ -9,7 +9,7 @@
  #define _ASM_MICROBLAZE_MMU_H
 
  #  ifdef __KERNEL__
-#   ifndef __ASSEMBLY__
+#   ifndef __ASSEMBLER__
 
  /* Default "unsigned long" context */
  typedef unsigned long mm_context_t;
@@ -56,7 +56,7 @@ extern void _tlbia(void);		/* invalidate all TLB entries */
   * mapping has to increase tlb_skip size.
   */
  extern u32 tlb_skip;
-#   endif /* __ASSEMBLY__ */
+#   endif /* __ASSEMBLER__ */
 
  /*
   * The MicroBlaze processor has a TLB architecture identical to PPC-40x. The
arch/microblaze/include/asm/page.h +4 -4
index 90fc9c81debda..90ac9f34b4b49 100644
@@ -25,7 +25,7 @@
 
  #define PTE_SHIFT	(PAGE_SHIFT - 2)	/* 1024 ptes per page */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /*
   * PAGE_OFFSET -- the first address of the first page of memory. With MMU
@@ -100,7 +100,7 @@ extern int page_is_ram(unsigned long pfn);
  #  define page_to_virt(page)   __va(page_to_pfn(page) << PAGE_SHIFT)
 
  #  define ARCH_PFN_OFFSET	(memory_start >> PAGE_SHIFT)
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  /* Convert between virtual and physical address for MMU. */
  /* Handle MicroBlaze processor with virtual memory. */
@@ -113,7 +113,7 @@ extern int page_is_ram(unsigned long pfn);
  #define tovirt(rd, rs) \
  	addik rd, rs, (CONFIG_KERNEL_START - CONFIG_KERNEL_BASE_ADDR)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  # define __pa(x)	__virt_to_phys((unsigned long)(x))
  # define __va(x)	((void *)__phys_to_virt((unsigned long)(x)))
@@ -130,7 +130,7 @@ static inline const void *pfn_to_virt(unsigned long pfn)
 
  #define	virt_addr_valid(vaddr)	(pfn_valid(virt_to_pfn(vaddr)))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #define TOPHYS(addr)  __virt_to_phys(addr)
 
arch/microblaze/include/asm/pgtable.h +9 -9
index e4ea2ec3642f0..eadc73d22dda6 100644
@@ -10,14 +10,14 @@
 
  #include <asm/setup.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern int mem_init_done;
  #endif
 
  #include <asm-generic/pgtable-nopmd.h>
 
  #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/sched.h>
  #include <linux/threads.h>
@@ -39,7 +39,7 @@ extern pte_t *va_to_pte(unsigned long address);
  #define VMALLOC_START	(CONFIG_KERNEL_START + CONFIG_LOWMEM_SIZE)
  #define VMALLOC_END	ioremap_bot
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /*
   * Macro to mark a page protection value as "uncacheable".
@@ -208,7 +208,7 @@ extern pte_t *va_to_pte(unsigned long address);
   * Also, write permissions imply read permissions.
   */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  /*
   * ZERO_PAGE is a global shared page that is always zero: used
   * for zero-mapped memory areas etc..
@@ -216,7 +216,7 @@ extern pte_t *va_to_pte(unsigned long address);
  extern unsigned long empty_zero_page[1024];
  #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #define pte_none(pte)		((pte_val(pte) & ~_PTE_NONE_MASK) == 0)
  #define pte_present(pte)	(pte_val(pte) & _PAGE_PRESENT)
@@ -237,7 +237,7 @@ extern unsigned long empty_zero_page[1024];
  #define pfn_pte(pfn, prot) \
  	__pte(((pte_basic_t)(pfn) << PFN_PTE_SHIFT) | pgprot_val(prot))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  /*
   * The following only work if pte_present() is true.
   * Undefined behaviour if not..
@@ -444,13 +444,13 @@ extern int mem_init_done;
 
  asmlinkage void __init mmu_init(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __KERNEL__ */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern unsigned long ioremap_bot, ioremap_base;
 
  void setup_memory(void);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_PGTABLE_H */
arch/microblaze/include/asm/processor.h +4 -4
index 4e193c7550dfa..d59bdfffca7cc 100644
@@ -14,7 +14,7 @@
  #include <asm/entry.h>
  #include <asm/current.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  /* from kernel/cpu/mb.c */
  extern const struct seq_operations cpuinfo_op;
 
@@ -29,7 +29,7 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
  extern void ret_from_fork(void);
  extern void ret_from_kernel_thread(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  /*
   * This is used to define STACK_TOP, and with MMU it must be below
@@ -45,7 +45,7 @@ extern void ret_from_kernel_thread(void);
 
  # define THREAD_KSP	0
 
-#  ifndef __ASSEMBLY__
+#  ifndef __ASSEMBLER__
 
  /* If you change this, you must change the associated assembly-languages
   * constants defined below, THREAD_*.
@@ -88,5 +88,5 @@ unsigned long __get_wchan(struct task_struct *p);
  extern struct dentry *of_debugfs_root;
  #endif
 
-#  endif /* __ASSEMBLY__ */
+#  endif /* __ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_PROCESSOR_H */
arch/microblaze/include/asm/ptrace.h +2 -2
index bfcb89df5e26f..17982292a64fd 100644
@@ -7,7 +7,7 @@
 
  #include <uapi/asm/ptrace.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #define kernel_mode(regs)		((regs)->pt_mode)
  #define user_mode(regs)			(!kernel_mode(regs))
 
@@ -20,5 +20,5 @@ static inline long regs_return_value(struct pt_regs *regs)
  	return regs->r3;
  }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_PTRACE_H */
arch/microblaze/include/asm/sections.h +2 -2
index a9311ad84a67f..f5008f5e7a5c1 100644
@@ -10,11 +10,11 @@
 
  #include <asm-generic/sections.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  extern char _ssbss[], _esbss[];
  extern unsigned long __ivt_start[], __ivt_end[];
 
  extern u32 _fdt_start[], _fdt_end[];
 
-# endif /* !__ASSEMBLY__ */
+# endif /* !__ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_SECTIONS_H */
arch/microblaze/include/asm/setup.h +2 -2
index bf2600f759593..837ed0bbae4b5 100644
@@ -9,7 +9,7 @@
 
  #include <uapi/asm/setup.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  extern char cmd_line[COMMAND_LINE_SIZE];
 
  extern char *klimit;
@@ -25,5 +25,5 @@ void machine_shutdown(void);
  void machine_halt(void);
  void machine_power_off(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_SETUP_H */
arch/microblaze/include/asm/thread_info.h +2 -2
index a0ddd2a36fb94..0153f7c2717c9 100644
@@ -13,7 +13,7 @@
  #define THREAD_SIZE		(1 << THREAD_SHIFT)
  #define THREAD_SIZE_ORDER	1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  # include <linux/types.h>
  # include <asm/processor.h>
 
@@ -86,7 +86,7 @@ static inline struct thread_info *current_thread_info(void)
  }
 
  /* thread information allocation */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /*
   * thread information flags
arch/microblaze/include/asm/unistd.h +2 -2
index cfe3f888b432b..fedda9908aa94 100644
@@ -8,7 +8,7 @@
 
  #include <uapi/asm/unistd.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /* #define __ARCH_WANT_OLD_READDIR */
  /* #define __ARCH_WANT_OLD_STAT */
@@ -33,6 +33,6 @@
  #define __ARCH_WANT_SYS_VFORK
  #define __ARCH_WANT_SYS_FORK
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_UNISTD_H */
arch/microblaze/include/asm/xilinx_mb_manager.h +1 -1
index 7b6995722b0c0..121a3224882b2 100644
@@ -5,7 +5,7 @@
  #ifndef _XILINX_MB_MANAGER_H
  #define _XILINX_MB_MANAGER_H
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 
  #include <linux/of_address.h>
 

arch/microblaze/include/asm/xilinx_mb_manager.h void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val, · line 27

Quoted 8 lines
arch/microblaze/include/asm/xilinx_mb_manager.h +1 -1
@@ -21,7 +21,7 @@ void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
  			  void *priv, void (*reset_callback)(void *data));
  asmlinkage void xmb_inject_err(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  /* Error injection offset */
  #define XMB_INJECT_ERR_OFFSET	0x200
$ git grep ASSEMBLY arch/microblaze/
arch/microblaze/include/uapi/asm/ptrace.h:13:#ifndef __ASSEMBLY__
arch/microblaze/include/uapi/asm/ptrace.h:71:#endif /* __ASSEMBLY__ */

This should be fixed too.

Thanks,
Michal

Signature · 6 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs
TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs
maintainer Applied
#38 lore raw

Re: [PATCH 18/41] microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth
Quoted 451 lines · Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  arch/microblaze/include/asm/asm-compat.h       |  2 +-
  arch/microblaze/include/asm/current.h          |  4 ++--
  arch/microblaze/include/asm/entry.h            |  4 ++--
  arch/microblaze/include/asm/exceptions.h       |  4 ++--
  arch/microblaze/include/asm/fixmap.h           |  4 ++--
  arch/microblaze/include/asm/ftrace.h           |  2 +-
  arch/microblaze/include/asm/kgdb.h             |  4 ++--
  arch/microblaze/include/asm/mmu.h              |  4 ++--
  arch/microblaze/include/asm/page.h             |  8 ++++----
  arch/microblaze/include/asm/pgtable.h          | 18 +++++++++---------
  arch/microblaze/include/asm/processor.h        |  8 ++++----
  arch/microblaze/include/asm/ptrace.h           |  4 ++--
  arch/microblaze/include/asm/sections.h         |  4 ++--
  arch/microblaze/include/asm/setup.h            |  4 ++--
  arch/microblaze/include/asm/thread_info.h      |  4 ++--
  arch/microblaze/include/asm/unistd.h           |  4 ++--
  .../microblaze/include/asm/xilinx_mb_manager.h |  4 ++--
  17 files changed, 43 insertions(+), 43 deletions(-)
arch/microblaze/include/asm/asm-compat.h +1 -1
index c05259ce2d2c2..9f04614762319 100644
@@ -4,7 +4,7 @@
 
  #include <asm/types.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
  #  define stringify_in_c(...)	__VA_ARGS__
  #  define ASM_CONST(x)		x
  #else
arch/microblaze/include/asm/current.h +2 -2
index a4bb45be30e69..099e69f32bf97 100644
@@ -14,13 +14,13 @@
   * but check asm/microblaze/kernel/entry.S to be sure.
   */
  #define CURRENT_TASK	r31
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  /*
   * Dedicate r31 to keeping the current task pointer
   */
  register struct task_struct *current asm("r31");
 
  # define get_current()	current
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_CURRENT_H */
arch/microblaze/include/asm/entry.h +2 -2
index 6c42bed411662..9efadf12397ca 100644
@@ -21,7 +21,7 @@
 
  #define PER_CPU(var) var
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
  DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
  DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
@@ -29,6 +29,6 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
  DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
 
  extern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_ENTRY_H */
arch/microblaze/include/asm/exceptions.h +2 -2
index 967f175173e14..c4591e4f7175b 100644
@@ -11,7 +11,7 @@
  #define _ASM_MICROBLAZE_EXCEPTIONS_H
 
  #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /* Macros to enable and disable HW exceptions in the MSR */
  /* Define MSR enable bit for HW exceptions */
@@ -64,6 +64,6 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);
  void die(const char *str, struct pt_regs *fp, long err);
  void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
 
-#endif /*__ASSEMBLY__ */
+#endif /*__ASSEMBLER__ */
  #endif /* __KERNEL__ */
  #endif /* _ASM_MICROBLAZE_EXCEPTIONS_H */
arch/microblaze/include/asm/fixmap.h +2 -2
index e6e9288bff761..f9797849e4d43 100644
@@ -15,7 +15,7 @@
  #ifndef _ASM_FIXMAP_H
  #define _ASM_FIXMAP_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #include <linux/kernel.h>
  #include <asm/page.h>
  #ifdef CONFIG_HIGHMEM
@@ -62,5 +62,5 @@ extern void __set_fixmap(enum fixed_addresses idx,
 
  #include <asm-generic/fixmap.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
  #endif
arch/microblaze/include/asm/ftrace.h +1 -1
index 4ca38b92a3a20..27c1bafb669c3 100644
@@ -7,7 +7,7 @@
  #define MCOUNT_ADDR		((unsigned long)(_mcount))
  #define MCOUNT_INSN_SIZE	8 /* sizeof mcount call */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern void _mcount(void);
  extern void ftrace_call_graph(void);
  void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
arch/microblaze/include/asm/kgdb.h +2 -2
index 8dc5ebb07fd5a..321c3c8bfcf27 100644
@@ -3,7 +3,7 @@
  #ifndef __MICROBLAZE_KGDB_H__
  #define __MICROBLAZE_KGDB_H__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #define CACHE_FLUSH_IS_SAFE	1
  #define BUFMAX			2048
@@ -27,6 +27,6 @@ static inline void arch_kgdb_breakpoint(void)
  struct pt_regs;
  asmlinkage void microblaze_kgdb_break(struct pt_regs *regs);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __MICROBLAZE_KGDB_H__ */
  #endif /* __KERNEL__ */
arch/microblaze/include/asm/mmu.h +2 -2
index b928a87c00766..7262dc4da3385 100644
@@ -9,7 +9,7 @@
  #define _ASM_MICROBLAZE_MMU_H
 
  #  ifdef __KERNEL__
-#   ifndef __ASSEMBLY__
+#   ifndef __ASSEMBLER__
 
  /* Default "unsigned long" context */
  typedef unsigned long mm_context_t;
@@ -56,7 +56,7 @@ extern void _tlbia(void);		/* invalidate all TLB entries */
   * mapping has to increase tlb_skip size.
   */
  extern u32 tlb_skip;
-#   endif /* __ASSEMBLY__ */
+#   endif /* __ASSEMBLER__ */
 
  /*
   * The MicroBlaze processor has a TLB architecture identical to PPC-40x. The
arch/microblaze/include/asm/page.h +4 -4
index 90fc9c81debda..90ac9f34b4b49 100644
@@ -25,7 +25,7 @@
 
  #define PTE_SHIFT	(PAGE_SHIFT - 2)	/* 1024 ptes per page */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /*
   * PAGE_OFFSET -- the first address of the first page of memory. With MMU
@@ -100,7 +100,7 @@ extern int page_is_ram(unsigned long pfn);
  #  define page_to_virt(page)   __va(page_to_pfn(page) << PAGE_SHIFT)
 
  #  define ARCH_PFN_OFFSET	(memory_start >> PAGE_SHIFT)
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  /* Convert between virtual and physical address for MMU. */
  /* Handle MicroBlaze processor with virtual memory. */
@@ -113,7 +113,7 @@ extern int page_is_ram(unsigned long pfn);
  #define tovirt(rd, rs) \
  	addik rd, rs, (CONFIG_KERNEL_START - CONFIG_KERNEL_BASE_ADDR)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  # define __pa(x)	__virt_to_phys((unsigned long)(x))
  # define __va(x)	((void *)__phys_to_virt((unsigned long)(x)))
@@ -130,7 +130,7 @@ static inline const void *pfn_to_virt(unsigned long pfn)
 
  #define	virt_addr_valid(vaddr)	(pfn_valid(virt_to_pfn(vaddr)))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #define TOPHYS(addr)  __virt_to_phys(addr)
 
arch/microblaze/include/asm/pgtable.h +9 -9
index e4ea2ec3642f0..eadc73d22dda6 100644
@@ -10,14 +10,14 @@
 
  #include <asm/setup.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern int mem_init_done;
  #endif
 
  #include <asm-generic/pgtable-nopmd.h>
 
  #ifdef __KERNEL__
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #include <linux/sched.h>
  #include <linux/threads.h>
@@ -39,7 +39,7 @@ extern pte_t *va_to_pte(unsigned long address);
  #define VMALLOC_START	(CONFIG_KERNEL_START + CONFIG_LOWMEM_SIZE)
  #define VMALLOC_END	ioremap_bot
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /*
   * Macro to mark a page protection value as "uncacheable".
@@ -208,7 +208,7 @@ extern pte_t *va_to_pte(unsigned long address);
   * Also, write permissions imply read permissions.
   */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  /*
   * ZERO_PAGE is a global shared page that is always zero: used
   * for zero-mapped memory areas etc..
@@ -216,7 +216,7 @@ extern pte_t *va_to_pte(unsigned long address);
  extern unsigned long empty_zero_page[1024];
  #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #define pte_none(pte)		((pte_val(pte) & ~_PTE_NONE_MASK) == 0)
  #define pte_present(pte)	(pte_val(pte) & _PAGE_PRESENT)
@@ -237,7 +237,7 @@ extern unsigned long empty_zero_page[1024];
  #define pfn_pte(pfn, prot) \
  	__pte(((pte_basic_t)(pfn) << PFN_PTE_SHIFT) | pgprot_val(prot))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  /*
   * The following only work if pte_present() is true.
   * Undefined behaviour if not..
@@ -444,13 +444,13 @@ extern int mem_init_done;
 
  asmlinkage void __init mmu_init(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* __KERNEL__ */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  extern unsigned long ioremap_bot, ioremap_base;
 
  void setup_memory(void);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_PGTABLE_H */
arch/microblaze/include/asm/processor.h +4 -4
index 4e193c7550dfa..d59bdfffca7cc 100644
@@ -14,7 +14,7 @@
  #include <asm/entry.h>
  #include <asm/current.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  /* from kernel/cpu/mb.c */
  extern const struct seq_operations cpuinfo_op;
 
@@ -29,7 +29,7 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
  extern void ret_from_fork(void);
  extern void ret_from_kernel_thread(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  /*
   * This is used to define STACK_TOP, and with MMU it must be below
@@ -45,7 +45,7 @@ extern void ret_from_kernel_thread(void);
 
  # define THREAD_KSP	0
 
-#  ifndef __ASSEMBLY__
+#  ifndef __ASSEMBLER__
 
  /* If you change this, you must change the associated assembly-languages
   * constants defined below, THREAD_*.
@@ -88,5 +88,5 @@ unsigned long __get_wchan(struct task_struct *p);
  extern struct dentry *of_debugfs_root;
  #endif
 
-#  endif /* __ASSEMBLY__ */
+#  endif /* __ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_PROCESSOR_H */
arch/microblaze/include/asm/ptrace.h +2 -2
index bfcb89df5e26f..17982292a64fd 100644
@@ -7,7 +7,7 @@
 
  #include <uapi/asm/ptrace.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  #define kernel_mode(regs)		((regs)->pt_mode)
  #define user_mode(regs)			(!kernel_mode(regs))
 
@@ -20,5 +20,5 @@ static inline long regs_return_value(struct pt_regs *regs)
  	return regs->r3;
  }
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_PTRACE_H */
arch/microblaze/include/asm/sections.h +2 -2
index a9311ad84a67f..f5008f5e7a5c1 100644
@@ -10,11 +10,11 @@
 
  #include <asm-generic/sections.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  extern char _ssbss[], _esbss[];
  extern unsigned long __ivt_start[], __ivt_end[];
 
  extern u32 _fdt_start[], _fdt_end[];
 
-# endif /* !__ASSEMBLY__ */
+# endif /* !__ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_SECTIONS_H */
arch/microblaze/include/asm/setup.h +2 -2
index bf2600f759593..837ed0bbae4b5 100644
@@ -9,7 +9,7 @@
 
  #include <uapi/asm/setup.h>
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
  extern char cmd_line[COMMAND_LINE_SIZE];
 
  extern char *klimit;
@@ -25,5 +25,5 @@ void machine_shutdown(void);
  void machine_halt(void);
  void machine_power_off(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
  #endif /* _ASM_MICROBLAZE_SETUP_H */
arch/microblaze/include/asm/thread_info.h +2 -2
index a0ddd2a36fb94..0153f7c2717c9 100644
@@ -13,7 +13,7 @@
  #define THREAD_SIZE		(1 << THREAD_SHIFT)
  #define THREAD_SIZE_ORDER	1
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
  # include <linux/types.h>
  # include <asm/processor.h>
 
@@ -86,7 +86,7 @@ static inline struct thread_info *current_thread_info(void)
  }
 
  /* thread information allocation */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  /*
   * thread information flags
arch/microblaze/include/asm/unistd.h +2 -2
index cfe3f888b432b..fedda9908aa94 100644
@@ -8,7 +8,7 @@
 
  #include <uapi/asm/unistd.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  /* #define __ARCH_WANT_OLD_READDIR */
  /* #define __ARCH_WANT_OLD_STAT */
@@ -33,6 +33,6 @@
  #define __ARCH_WANT_SYS_VFORK
  #define __ARCH_WANT_SYS_FORK
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
  #endif /* _ASM_MICROBLAZE_UNISTD_H */
arch/microblaze/include/asm/xilinx_mb_manager.h +1 -1
index 7b6995722b0c0..121a3224882b2 100644
@@ -5,7 +5,7 @@
  #ifndef _XILINX_MB_MANAGER_H
  #define _XILINX_MB_MANAGER_H
 
-# ifndef __ASSEMBLY__
+# ifndef __ASSEMBLER__
 
  #include <linux/of_address.h>
 

arch/microblaze/include/asm/xilinx_mb_manager.h void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val, · line 27

Quoted 8 lines
arch/microblaze/include/asm/xilinx_mb_manager.h +1 -1
@@ -21,7 +21,7 @@ void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
  			  void *priv, void (*reset_callback)(void *data));
  asmlinkage void xmb_inject_err(void);
 
-# endif /* __ASSEMBLY__ */
+# endif /* __ASSEMBLER__ */
 
  /* Error injection offset */
  #define XMB_INJECT_ERR_OFFSET	0x200

Applied.
M

Signature · 6 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs
TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs
#39 lore raw

PATCH 19/41 mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers

In reply to Thomas Huth

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. 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.

This is almost a completely mechanical patch (done with a simple "sed -i" statement), with just one comment tweaked manually in arch/mips/include/asm/cpu.h (that was missing some underscores).

---
 arch/mips/include/asm/addrspace.h            |  4 +--
 arch/mips/include/asm/asm-eva.h              |  6 ++--
 arch/mips/include/asm/asm.h                  |  8 ++---
 arch/mips/include/asm/bmips.h                |  4 +--
 arch/mips/include/asm/cpu.h                  |  4 +--
 arch/mips/include/asm/dec/ecc.h              |  2 +-
 arch/mips/include/asm/dec/interrupts.h       |  4 +--
 arch/mips/include/asm/dec/kn01.h             |  2 +-
 arch/mips/include/asm/dec/kn02.h             |  2 +-
 arch/mips/include/asm/dec/kn02xa.h           |  2 +-
 arch/mips/include/asm/eva.h                  |  4 +--
 arch/mips/include/asm/ftrace.h               |  4 +--
 arch/mips/include/asm/hazards.h              |  4 +--
 arch/mips/include/asm/irqflags.h             |  4 +--
 arch/mips/include/asm/jazz.h                 | 16 ++++-----
 arch/mips/include/asm/jump_label.h           |  4 +--
 arch/mips/include/asm/linkage.h              |  2 +-
 arch/mips/include/asm/mach-generic/spaces.h  |  4 +--
 arch/mips/include/asm/mips-boards/bonito64.h |  4 +--
 arch/mips/include/asm/mipsmtregs.h           |  6 ++--
 arch/mips/include/asm/mipsregs.h             |  6 ++--
 arch/mips/include/asm/msa.h                  |  4 +--
 arch/mips/include/asm/pci/bridge.h           |  4 +--
 arch/mips/include/asm/pm.h                   |  6 ++--
 arch/mips/include/asm/prefetch.h             |  2 +-
 arch/mips/include/asm/regdef.h               |  4 +--
 arch/mips/include/asm/sibyte/board.h         |  4 +--
 arch/mips/include/asm/sibyte/sb1250.h        |  2 +-
 arch/mips/include/asm/sibyte/sb1250_defs.h   |  6 ++--
 arch/mips/include/asm/smp-cps.h              |  6 ++--
 arch/mips/include/asm/sn/addrs.h             | 18 +++++-----
 arch/mips/include/asm/sn/gda.h               |  4 +--
 arch/mips/include/asm/sn/kldir.h             |  4 +--
 arch/mips/include/asm/sn/klkernvars.h        |  4 +--
 arch/mips/include/asm/sn/launch.h            |  4 +--
 arch/mips/include/asm/sn/nmi.h               |  8 ++---
 arch/mips/include/asm/sn/sn0/addrs.h         | 14 ++++----
 arch/mips/include/asm/sn/sn0/hub.h           |  2 +-
 arch/mips/include/asm/sn/sn0/hubio.h         | 36 ++++++++++----------
 arch/mips/include/asm/sn/sn0/hubmd.h         |  4 +--
 arch/mips/include/asm/sn/sn0/hubni.h         |  6 ++--
 arch/mips/include/asm/sn/sn0/hubpi.h         |  4 +--
 arch/mips/include/asm/sn/types.h             |  2 +-
 arch/mips/include/asm/sync.h                 |  2 +-
 arch/mips/include/asm/thread_info.h          |  4 +--
 arch/mips/include/asm/unistd.h               |  4 +--
 arch/mips/include/asm/vdso/gettimeofday.h    |  4 +--
 arch/mips/include/asm/vdso/processor.h       |  4 +--
 arch/mips/include/asm/vdso/vdso.h            |  4 +--
 arch/mips/include/asm/vdso/vsyscall.h        |  4 +--
 arch/mips/include/asm/xtalk/xtalk.h          |  4 +--
 arch/mips/include/asm/xtalk/xwidget.h        |  4 +--
 drivers/soc/bcm/brcmstb/pm/pm.h              |  2 +-
 53 files changed, 140 insertions(+), 140 deletions(-)
arch/mips/include/asm/addrspace.h +2 -2
index 7e9ef01cb182b..e2354e9b0ee28 100644
@@ -15,7 +15,7 @@
 /*
  *  Configure language
  */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _ATYPE_
 #define _ATYPE32_
 #define _ATYPE64_
@@ -34,7 +34,7 @@
 /*
  *  32-bit MIPS address spaces
  */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _ACAST32_
 #define _ACAST64_
 #else
arch/mips/include/asm/asm-eva.h +3 -3
index e327ebc767539..220431d00ee9b 100644
@@ -10,7 +10,7 @@
 #ifndef __ASM_ASM_EVA_H
 #define __ASM_ASM_EVA_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* Kernel variants */
 
@@ -99,7 +99,7 @@
 
 #endif /* CONFIG_EVA */
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #define kernel_cache(op, base)		cache op, base
 #define kernel_pref(hint, base)		pref hint, base
@@ -185,6 +185,6 @@
 
 #endif /* CONFIG_EVA */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_ASM_EVA_H */
arch/mips/include/asm/asm.h +4 -4
index 87ff609b53fe1..0ed19ffed0769 100644
@@ -37,7 +37,7 @@
 #define CFI_SECTIONS
 #endif
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 /*
  * LEAF - declare leaf routine
  */
@@ -123,7 +123,7 @@ symbol		=	value
 #define ASM_PRINT(string)
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * Stack alignment
@@ -228,7 +228,7 @@ symbol		=	value
 #define LONG_INS	ins
 #define LONG_EXT	ext
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define LONG		.word
 #endif
 #define LONGSIZE	4
@@ -257,7 +257,7 @@ symbol		=	value
 #define LONG_INS	dins
 #define LONG_EXT	dext
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define LONG		.dword
 #endif
 #define LONGSIZE	8
arch/mips/include/asm/bmips.h +2 -2
index 3a1cdfddb987e..0eee81be9e2b5 100644
@@ -42,7 +42,7 @@
 
 #define ZSCM_REG_BASE			0x97000000
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 
 #include <linux/cpumask.h>
 #include <asm/r4kcache.h>
@@ -124,6 +124,6 @@ static inline void bmips_write_zscm_reg(unsigned int offset, unsigned long data)
 	barrier();
 }
 
-#endif /* !defined(__ASSEMBLY__) */
+#endif /* !defined(__ASSEMBLER__) */
 
 #endif /* _ASM_BMIPS_H */
arch/mips/include/asm/cpu.h +2 -2
index ecb9854cb4324..32cf5496006e4 100644
@@ -288,7 +288,7 @@
 
 #define FPIR_IMP_NONE		0x0000
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 
 enum cpu_type_enum {
 	CPU_UNKNOWN,
@@ -329,7 +329,7 @@ enum cpu_type_enum {
 	CPU_LAST
 };
 
-#endif /* !__ASSEMBLY */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * ISA Level encodings
arch/mips/include/asm/dec/ecc.h +1 -1
index c3a3f71f1a544..dbc39643c31c5 100644
@@ -37,7 +37,7 @@
 #define KN0X_ESR_SYNLO		(0x7f<<0)	/* syndrome from ECC logic */
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/interrupt.h>
 
arch/mips/include/asm/dec/interrupts.h +2 -2
index e10d341067c82..c1cd36c04b6c8 100644
@@ -95,7 +95,7 @@
 #define DEC_CPU_IRQ_ALL		(0xff << CAUSEB_IP)
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Interrupt table structures to hide differences between systems.
@@ -121,6 +121,6 @@ extern void cpu_all_int(void);
 extern void dec_intr_unimplemented(void);
 extern void asic_intr_unimplemented(void);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/mips/include/asm/dec/kn01.h +1 -1
index 88d9ffd742588..6c074b93a7dbf 100644
@@ -71,7 +71,7 @@
 #define KN01_CSR_LEDS		(0xff<<0) /* ~diagnostic LEDs (w/o) */
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
arch/mips/include/asm/dec/kn02.h +1 -1
index 93430b5f47241..9fea17020079d 100644
@@ -80,7 +80,7 @@
 #define KN02_IRQ_ALL		0xff
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
arch/mips/include/asm/dec/kn02xa.h +1 -1
index b56b4577f6eff..3580d78b906fb 100644
@@ -70,7 +70,7 @@
 #define KN02XA_EAR_RES_0	(0x3<<0)	/* unused */
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/interrupt.h>
 
arch/mips/include/asm/eva.h +2 -2
index a3d1807f227c2..c7b39f38634b8 100644
@@ -13,7 +13,7 @@
 
 #include <kernel-entry-init.h>
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #ifdef CONFIG_EVA
 
@@ -38,6 +38,6 @@ platform_eva_init
 
 #endif /* CONFIG_EVA */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/mips/include/asm/ftrace.h +2 -2
index dc025888f6d28..55d32cdeba4f3 100644
@@ -15,7 +15,7 @@
 #define MCOUNT_ADDR ((unsigned long)(_mcount))
 #define MCOUNT_INSN_SIZE 4		/* sizeof mcount call */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void _mcount(void);
 #define mcount _mcount
 
@@ -89,6 +89,6 @@ struct dyn_arch_ftrace {
 void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
 			   unsigned long fp);
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* CONFIG_FUNCTION_TRACER */
 #endif /* _ASM_MIPS_FTRACE_H */
arch/mips/include/asm/hazards.h +2 -2
index cb16be93b048e..a084b3b3bc810 100644
@@ -301,7 +301,7 @@ do {									\
 
 #endif
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #define _ssnop ___ssnop
 #define	_ehb ___ehb
@@ -417,6 +417,6 @@ do {									\
  */
 extern void mips_ihb(void);
 
-#endif /* __ASSEMBLY__  */
+#endif /* __ASSEMBLER__  */
 
 #endif /* _ASM_HAZARDS_H */
arch/mips/include/asm/irqflags.h +2 -2
index f5b8300f45735..70e5b05fd88bd 100644
@@ -11,7 +11,7 @@
 #ifndef _ASM_IRQFLAGS_H
 #define _ASM_IRQFLAGS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/compiler.h>
 #include <linux/stringify.h>
@@ -142,7 +142,7 @@ static inline int arch_irqs_disabled(void)
 	return arch_irqs_disabled_flags(arch_local_save_flags());
 }
 
-#endif /* #ifndef __ASSEMBLY__ */
+#endif /* #ifndef __ASSEMBLER__ */
 
 /*
  * Do the CPU's IRQ-state tracing from assembly code.
arch/mips/include/asm/jazz.h +8 -8
index a61970d01a81c..9356e87dd64be 100644
@@ -70,7 +70,7 @@
 #define LED_E			0x9e
 #define LED_F			0x8e
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static __inline__ void pica_set_led(unsigned int bits)
 {
@@ -79,7 +79,7 @@ static __inline__ void pica_set_led(unsigned int bits)
 	*led_register = bits;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Base address of the Sonic Ethernet adapter in Jazz machines.
@@ -100,7 +100,7 @@ static __inline__ void pica_set_led(unsigned int bits)
 #define JAZZ_KEYBOARD_DATA	0xe0005000
 #define JAZZ_KEYBOARD_COMMAND	0xe0005001
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef struct {
 	unsigned char data;
@@ -121,7 +121,7 @@ typedef struct {
  */
 #define keyboard_hardware	jazz_keyboard_hardware
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * i8042 keyboard controller for most other Mips machines.
@@ -154,7 +154,7 @@ typedef struct {
 /*
  * DRAM configuration register
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef __MIPSEL__
 typedef struct {
 	unsigned int bank2 : 3;
@@ -174,7 +174,7 @@ typedef struct {
 	unsigned int bank2 : 3;
 } dram_configuration;
 #endif
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define PICA_DRAM_CONFIG	0xe00fffe0
 
@@ -260,7 +260,7 @@ typedef struct {
 /*
  * Access the R4030 DMA and I/O Controller
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static inline void r4030_delay(void)
 {
@@ -299,7 +299,7 @@ static inline void r4030_write_reg32(unsigned long addr, unsigned val)
 	r4030_delay();
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define JAZZ_FDC_BASE	0xe0003000
 #define JAZZ_RTC_BASE	0xe0004000
arch/mips/include/asm/jump_label.h +2 -2
index ff5d388502d4a..c1508f88e03ea 100644
@@ -10,7 +10,7 @@
 
 #define arch_jump_label_transform_static arch_jump_label_transform
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 #include <asm/isa-rev.h>
@@ -76,5 +76,5 @@ struct jump_entry {
 	jump_label_t key;
 };
 
-#endif  /* __ASSEMBLY__ */
+#endif  /* __ASSEMBLER__ */
 #endif /* _ASM_MIPS_JUMP_LABEL_H */
arch/mips/include/asm/linkage.h +1 -1
index 1829c2b6da6cd..fd44ba754f1a6 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #include <asm/asm.h>
 #endif
 
arch/mips/include/asm/mach-generic/spaces.h +2 -2
index f8783d339fb0d..6332b6cbf7eef 100644
@@ -21,13 +21,13 @@
 /*
  * This gives the physical RAM offset.
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 # if defined(CONFIG_MIPS_AUTO_PFN_OFFSET)
 #  define PHYS_OFFSET		((unsigned long)PFN_PHYS(ARCH_PFN_OFFSET))
 # elif !defined(PHYS_OFFSET)
 #  define PHYS_OFFSET		_AC(0, UL)
 # endif
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #ifdef CONFIG_32BIT
 #define CAC_BASE		_AC(0x80000000, UL)
arch/mips/include/asm/mips-boards/bonito64.h +2 -2
index 31a31fe78d775..74c5fc0fc6c04 100644
@@ -21,7 +21,7 @@
 #ifndef _ASM_MIPS_BOARDS_BONITO64_H
 #define _ASM_MIPS_BOARDS_BONITO64_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 /* offsets from base register */
 #define BONITO(x)	(x)
@@ -36,7 +36,7 @@ extern unsigned long _pcictrl_bonito_pcicfg;
 
 #define BONITO(x)		*(volatile u32 *)(_pcictrl_bonito + (x))
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #define BONITO_BOOT_BASE		0x1fc00000
arch/mips/include/asm/mipsmtregs.h +3 -3
index b1ee3c48e84ba..cab7582010e80 100644
@@ -10,7 +10,7 @@
 
 #include <asm/mipsregs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * C macros
@@ -176,7 +176,7 @@
 /* TCHalt */
 #define TCHALT_H		(_ULCAST_(1))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 static inline unsigned core_nvpes(void)
 {
@@ -469,6 +469,6 @@ do {									\
 
 __BUILD_SET_C0(mvpcontrol)
 
-#endif /* Not __ASSEMBLY__ */
+#endif /* Not __ASSEMBLER__ */
 
 #endif
arch/mips/include/asm/mipsregs.h +3 -3
index c025558754d57..f799c0d723dac 100644
@@ -32,7 +32,7 @@
 /*
  *  Configure language
  */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #define _ULCAST_
 #define _U64CAST_
 #else
@@ -1346,7 +1346,7 @@
 #define FPU_CSR_RD	0x3	/* towards -Infinity */
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * Macros for handling the ISA mode bit for MIPS16 and microMIPS.
@@ -3095,6 +3095,6 @@ static inline unsigned int get_ebase_cpunum(void)
 	return read_c0_ebase() & MIPS_EBASE_CPUNUM;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_MIPSREGS_H */
arch/mips/include/asm/msa.h +2 -2
index 236a49ee2e3e7..c6077f5fa4b18 100644
@@ -8,7 +8,7 @@
 
 #include <asm/mipsregs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/inst.h>
 
@@ -218,7 +218,7 @@ __BUILD_MSA_CTL_REG(request, 5)
 __BUILD_MSA_CTL_REG(map, 6)
 __BUILD_MSA_CTL_REG(unmap, 7)
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define MSA_IR		0
 #define MSA_CSR		1
arch/mips/include/asm/pci/bridge.h +2 -2
index 9c476a0400e0c..eaeafccd82c7d 100644
@@ -43,7 +43,7 @@
  *    Bridge address map
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define ATE_V		0x01
 #define ATE_CO		0x02
@@ -288,7 +288,7 @@ struct bridge_err_cmdword {
 };
 
 #define berr_field	berr_un.berr_st
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * The values of these macros can and should be crosschecked
arch/mips/include/asm/pm.h +3 -3
index 7ecd4dfe38461..52f3d64c5f347 100644
@@ -8,7 +8,7 @@
 #ifndef __ASM_PM_H
 #define __ASM_PM_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/asm-offsets.h>
 #include <asm/asm.h>
@@ -130,7 +130,7 @@
 	RESUME_RESTORE_REGS_RETURN
 .endm
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 /**
  * struct mips_static_suspend_state - Core saved CPU state across S2R.
@@ -150,6 +150,6 @@ struct mips_static_suspend_state {
 	unsigned long sp;
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_PM_HELPERS_H */
arch/mips/include/asm/prefetch.h +1 -1
index a56594f360ee2..4bd359fa3d977 100644
@@ -42,7 +42,7 @@
 #define Pref_WriteBackInvalidate	25
 #define Pref_PrepareForStore		30
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 	.macro	__pref hint addr
 #ifdef CONFIG_CPU_HAS_PREFETCH
arch/mips/include/asm/regdef.h +2 -2
index 236051364f78e..dd0b558c97672 100644
@@ -103,7 +103,7 @@
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 #if _MIPS_SIM == _MIPS_SIM_ABI32
 
 /*
@@ -192,6 +192,6 @@
 #define ra	$31	/* return address */
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_REGDEF_H */
arch/mips/include/asm/sibyte/board.h +2 -2
index 03463faa42446..d29c1c013dc5c 100644
@@ -19,7 +19,7 @@
 #include <asm/sibyte/bigsur.h>
 #endif
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #ifdef LEDS_PHYS
 #define setleds(t0, t1, c0, c1, c2, c3) \
@@ -46,6 +46,6 @@ extern void setleds(char *str);
 #define setleds(s) do { } while (0)
 #endif /* LEDS_PHYS */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _SIBYTE_BOARD_H */
arch/mips/include/asm/sibyte/sb1250.h +1 -1
index 495b31925ed77..de4b352256c8a 100644
@@ -19,7 +19,7 @@
 
 #define SB1250_DUART_MINOR_BASE		64
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/addrspace.h>
 
arch/mips/include/asm/sibyte/sb1250_defs.h +3 -3
index 68cd7c0b37eae..98cbb65cce0ac 100644
@@ -199,7 +199,7 @@
  * Note: you'll need to define uint32_t and uint64_t in your headers.
  */
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 #define _SB_MAKE64(x) ((uint64_t)(x))
 #define _SB_MAKE32(x) ((uint32_t)(x))
 #else
@@ -238,9 +238,9 @@
  */
 
 
-#if defined(__mips64) && !defined(__ASSEMBLY__)
+#if defined(__mips64) && !defined(__ASSEMBLER__)
 #define SBWRITECSR(csr, val) *((volatile uint64_t *) PHYS_TO_K1(csr)) = (val)
 #define SBREADCSR(csr) (*((volatile uint64_t *) PHYS_TO_K1(csr)))
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
arch/mips/include/asm/smp-cps.h +3 -3
index ab94e50f62b87..d80a629a71f95 100644
@@ -9,7 +9,7 @@
 
 #define CPS_ENTRY_PATCH_INSNS	6
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct vpe_boot_config {
 	unsigned long pc;
@@ -49,9 +49,9 @@ static inline bool mips_cps_smp_in_use(void) { return false; }
 
 #endif /* !CONFIG_MIPS_CPS */
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 .extern mips_cps_bootcfg;
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __MIPS_ASM_SMP_CPS_H__ */
arch/mips/include/asm/sn/addrs.h +9 -9
index 837d23e249768..7c675fecbf9a9 100644
@@ -10,10 +10,10 @@
 #define _ASM_SN_ADDRS_H
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/smp.h>
 #include <linux/types.h>
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #include <asm/addrspace.h>
 #include <asm/sn/kldir.h>
@@ -25,15 +25,15 @@
 #endif
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define UINT64_CAST		(unsigned long)
 
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 
 #define UINT64_CAST
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 
 #define NASID_GET_META(_n)	((_n) >> NASID_LOCAL_BITS)
@@ -254,7 +254,7 @@
 #define LOCAL_HUB_ADDR(_x)	(IALIAS_BASE + (_x))
 #define REMOTE_HUB_ADDR(_n, _x) ((NODE_SWIN_BASE(_n, 1) + 0x800000 + (_x)))
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define LOCAL_HUB_PTR(_x)	((u64 *)LOCAL_HUB_ADDR((_x)))
 #define REMOTE_HUB_PTR(_n, _x)	((u64 *)REMOTE_HUB_ADDR((_n), (_x)))
@@ -265,7 +265,7 @@
 #define REMOTE_HUB_S(_n, _r, _d)	__raw_writeq((_d),		\
 						REMOTE_HUB_PTR((_n), (_r)))
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Software structure locations -- permanently fixed
@@ -315,7 +315,7 @@
 #define KLI_KERN_XP		8
 #define KLI_KERN_PARTID		9
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define KLD_BASE(nasid)		((kldir_ent_t *) KLDIR_ADDR(nasid))
 #define KLD_LAUNCH(nasid)	(KLD_BASE(nasid) + KLI_LAUNCH)
@@ -371,7 +371,7 @@
 #define KERN_VARS_ADDR(nasid)	KLD_KERN_VARS(nasid)->pointer
 #define KERN_VARS_SIZE(nasid)	KLD_KERN_VARS(nasid)->size
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 
 #endif /* _ASM_SN_ADDRS_H */
arch/mips/include/asm/sn/gda.h +2 -2
index 5b8c96d5b5870..d8fd80137206a 100644
@@ -39,7 +39,7 @@
 #define G_PARTIDOFF	40
 #define G_TABLEOFF	128
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef struct gda {
 	u32	g_magic;	/* GDA magic number */
@@ -63,7 +63,7 @@ typedef struct gda {
 
 #define GDA ((gda_t*) GDA_ADDR(get_nasid()))
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 /*
  * Define:	PART_GDA_VERSION
  * Purpose:	Define the minimum version of the GDA required, lower
arch/mips/include/asm/sn/kldir.h +2 -2
index 245f59bf38454..f394b1e0c9566 100644
@@ -15,7 +15,7 @@
 #define KLDIR_ENT_SIZE			0x40
 #define KLDIR_MAX_ENTRIES		(0x400 / 0x40)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef struct kldir_ent_s {
 	u64		magic;		/* Indicates validity of entry	    */
 	off_t		offset;		/* Offset from start of node space  */
@@ -27,7 +27,7 @@ typedef struct kldir_ent_s {
 	/* NOTE: These 16 bytes are used in the Partition KLDIR
 	   entry to store partition info. Refer to klpart.h for this. */
 } kldir_ent_t;
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #ifdef CONFIG_SGI_IP27
 #include <asm/sn/sn0/kldir.h>
arch/mips/include/asm/sn/klkernvars.h +2 -2
index ea6b217951636..bb7a6c36f6e7b 100644
@@ -12,7 +12,7 @@
 
 #define KV_MAGIC		0x5f4b565f
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/sn/types.h>
 
@@ -24,6 +24,6 @@ typedef struct kern_vars_s {
 	unsigned long	kv_rw_baseaddr;
 } kern_vars_t;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_SN_KLKERNVARS_H */
arch/mips/include/asm/sn/launch.h +2 -2
index 04226d8d30c42..ce95187362e70 100644
@@ -59,7 +59,7 @@
  * clears the BUSY flag after control is returned to it.
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef int launch_state_t;
 typedef void (*launch_proc_t)(u64 call_parm);
@@ -101,6 +101,6 @@ typedef struct launch_s {
 #define LAUNCH_FLASH	(*(void (*)(void)) \
 			 IP27PROM_FLASHLEDS)
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_SN_LAUNCH_H */
arch/mips/include/asm/sn/nmi.h +4 -4
index 12ac210f12a17..eff51606bbcea 100644
@@ -48,7 +48,7 @@
  *
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef struct nmi_s {
 	volatile unsigned long	 magic;		/* Magic number */
@@ -59,13 +59,13 @@ typedef struct nmi_s {
 	volatile unsigned long	 gmaster;	/* Flag true only on global master*/
 } nmi_t;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /* Following definitions are needed both in the prom & the kernel
  * to identify the format of the nmi cpu register save area in the
  * low memory on each node.
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct reg_struct {
 	unsigned long	gpr[32];
@@ -78,7 +78,7 @@ struct reg_struct {
 	unsigned long	nmi_sr;
 };
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /* These are the assembly language offsets into the reg_struct structure */
 
arch/mips/include/asm/sn/sn0/addrs.h +7 -7
index f13df84edfdd5..a28158a91ecf5 100644
@@ -84,15 +84,15 @@
 #define NASID_GET(_pa)		(int) ((UINT64_CAST (_pa) >>		\
 					NASID_SHFT) & NASID_BITMASK)
 
-#if !defined(__ASSEMBLY__)
+#if !defined(__ASSEMBLER__)
 
 #define NODE_SWIN_BASE(nasid, widget)					\
 	((widget == 0) ? NODE_BWIN_BASE((nasid), SWIN0_BIGWIN)		\
 	: RAW_NODE_SWIN_BASE(nasid, widget))
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
 #define NODE_SWIN_BASE(nasid, widget) \
      (NODE_IO_BASE(nasid) + (UINT64_CAST(widget) << SWIN_SIZE_BITS))
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /*
  * The following definitions pertain to the IO special address
@@ -139,11 +139,11 @@
 /* Turn on sable logging for the processors whose bits are set. */
 #define SABLE_LOG_TRIGGER(_map)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define KERN_NMI_ADDR(nasid, slice)					\
 		    TO_NODE_UNCAC((nasid), IP27_NMI_KREGS_OFFSET +	\
 				  (IP27_NMI_KREGS_CPU_SIZE * (slice)))
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #ifdef PROM
 
@@ -248,7 +248,7 @@
 #define KL_UART_DATA	LOCAL_HUB_ADDR(MD_UREG0_1)	/* UART data reg */
 #define KL_I2C_REG	MD_UREG0_0			/* I2C reg */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /* Address 0x400 to 0x1000 ualias points to cache error eframe + misc
  * CACHE_ERR_SP_PTR could either contain an address to the stack, or
@@ -266,7 +266,7 @@
 #define CACHE_ERR_SP		(CACHE_ERR_SP_PTR - 16)
 #define CACHE_ERR_AREA_SIZE	(ARCS_SPB_OFFSET - CACHE_ERR_EFRAME)
 
-#endif	/* !__ASSEMBLY__ */
+#endif	/* !__ASSEMBLER__ */
 
 #define _ARCSPROM
 
arch/mips/include/asm/sn/sn0/hub.h +1 -1
index c84adde36d41f..916394319af59 100644
@@ -37,7 +37,7 @@
 #define UATTR_MSPEC	2
 #define UATTR_UNCAC	3
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 /*
  * Returns the local nasid into res.
  */
arch/mips/include/asm/sn/sn0/hubio.h +18 -18
index 57ece90f8cf1e..c489426f8f9e2 100644
@@ -169,7 +169,7 @@
 /*
  * The IO LLP control status register and widget control register
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef union hubii_wid_u {
 	u64	wid_reg_value;
@@ -292,7 +292,7 @@ typedef union io_perf_cnt {
 	} perf_cnt_bits;
 } io_perf_cnt_t;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 
 #define LNK_STAT_WORKING	0x2
@@ -440,7 +440,7 @@ typedef union io_perf_cnt {
 /*
  * Fields in CRB Register A
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef union icrba_u {
 	u64	reg_value;
 	struct {
@@ -486,7 +486,7 @@ typedef union h1_icrba_u {
 #define ICRBN_A_CERR_SHFT	54
 #define ICRBN_A_ERR_MASK	0x3ff
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define IIO_ICRB_ADDR_SHFT	2	/* Shift to get proper address */
 
@@ -509,7 +509,7 @@ typedef union h1_icrba_u {
 /*
  * Fields in CRB Register B
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef union icrbb_u {
 	u64	reg_value;
 	struct {
@@ -608,7 +608,7 @@ typedef union h1_icrbb_u {
 #define b_imsg		icrbb_field_s.imsg
 #define b_initiator	icrbb_field_s.initiator
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * values for field xtsize
@@ -666,7 +666,7 @@ typedef union h1_icrbb_u {
  * Fields in CRB Register C
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef union icrbc_s {
 	u64	reg_value;
@@ -698,13 +698,13 @@ typedef union icrbc_s {
 #define c_barrop	icrbc_field_s.barrop
 #define c_doresp	icrbc_field_s.doresp
 #define c_gbr	icrbc_field_s.gbr
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Fields in CRB Register D
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef union icrbd_s {
 	u64	reg_value;
 	struct {
@@ -737,7 +737,7 @@ typedef union hubii_ifdr_u {
 	} hi_ifdr_fields;
 } hubii_ifdr_t;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * Hardware designed names for the BTE control registers.
@@ -784,7 +784,7 @@ typedef union hubii_ifdr_u {
  * IO PIO Read Table Entry format
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef union iprte_a {
 	u64	entry;
@@ -806,7 +806,7 @@ typedef union iprte_a {
 #define iprte_init	iprte_fields.initiator
 #define iprte_addr	iprte_fields.addr
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define IPRTE_ADDRSHFT	3
 
@@ -814,7 +814,7 @@ typedef union iprte_a {
  * Hub IIO PRB Register format.
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * Note: Fields bnakctr, anakctr, xtalkctrmode, ovflow fields are
  * "Status" fields, and should only be used in case of clean up after errors.
@@ -846,7 +846,7 @@ typedef union iprb_u {
 #define iprb_anakctr	iprb_fields_s.anakctr
 #define iprb_xtalkctr	iprb_fields_s.xtalkctr
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * values for mode field in iprb_t.
@@ -861,7 +861,7 @@ typedef union iprb_u {
 /*
  * IO CRB entry C_A to E_A : Partial (cache) CRBS
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef union icrbp_a {
 	u64   ip_reg;	    /* the entire register value	*/
 	struct {
@@ -895,7 +895,7 @@ typedef union icrbp_a {
 	} ip_fmt;
 } icrbp_a_t;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * A couple of defines to go with the above structure.
@@ -903,7 +903,7 @@ typedef union icrbp_a {
 #define ICRBP_A_CERR_SHFT	54
 #define ICRBP_A_ERR_MASK	0x3ff
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef union hubii_idsr {
 	u64 iin_reg;
 	struct {
@@ -917,7 +917,7 @@ typedef union hubii_idsr {
 		    level : 7;
 	} iin_fmt;
 } hubii_idsr_t;
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * IO BTE Length/Status (IIO_IBLS) register bit field definitions
arch/mips/include/asm/sn/sn0/hubmd.h +2 -2
index 305d002be1825..97d9cbbf9f4c6 100644
@@ -423,7 +423,7 @@
  * Operations on page migration threshold register
  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * LED register macros
@@ -735,7 +735,7 @@ typedef union md_perf_cnt {
 } md_perf_cnt_t;
 
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 
 #define DIR_ERROR_VALID_MASK	0xe000000000000000
arch/mips/include/asm/sn/sn0/hubni.h +3 -3
index b8253142cb834..4830bae723e4b 100644
@@ -11,7 +11,7 @@
 #ifndef _ASM_SGI_SN0_HUBNI_H
 #define _ASM_SGI_SN0_HUBNI_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <linux/types.h>
 #endif
 
@@ -226,7 +226,7 @@
 
 #define NLT_EXIT_PORT_MASK (UINT64_CAST 0xf)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef union	hubni_port_error_u {
 	u64	nipe_reg_value;
@@ -258,6 +258,6 @@ static inline int get_region_shift(void)
 	return NASID_TO_COARSEREG_SHFT;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_SGI_SN0_HUBNI_H */
arch/mips/include/asm/sn/sn0/hubpi.h +2 -2
index 7b83655913c52..a4fe0feeef0cc 100644
@@ -306,7 +306,7 @@
 #define ERR_STACK_SIZE_BYTES(_sz) \
        ((_sz) ? (PI_MIN_STACK_SIZE << ((_sz) - 1)) : 0)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * format of error stack and error status registers.
  */
@@ -359,7 +359,7 @@ typedef union pi_err_stat1 {
 
 typedef u64	rtc_time_t;
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 
 /* Bits in PI_SYSAD_ERRCHK_EN */
arch/mips/include/asm/sn/types.h +1 -1
index 451ba1ee41ad8..53d04c04d6f55 100644
@@ -11,7 +11,7 @@
 
 #include <linux/types.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 typedef unsigned long	cpuid_t;
 typedef signed short	nasid_t;	/* node id in numa-as-id space */
arch/mips/include/asm/sync.h +1 -1
index 44c04a82d0b7d..d7873e8d7e6f8 100644
@@ -193,7 +193,7 @@
  * Preprocessor magic to expand macros used as arguments before we insert them
  * into assembly code.
  */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 # define ___SYNC(type, reason, else)				\
 	____SYNC(type, reason, else)
 #else
arch/mips/include/asm/thread_info.h +2 -2
index b9d76e8ac5a23..2707dad260dd7 100644
@@ -11,7 +11,7 @@
 #ifdef __KERNEL__
 
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/processor.h>
 
@@ -73,7 +73,7 @@ static inline struct thread_info *current_thread_info(void)
 register unsigned long current_stack_pointer __asm__("sp");
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /* thread information allocation */
 #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT)
arch/mips/include/asm/unistd.h +2 -2
index ba83d3fb0a848..6a974b990f4b2 100644
@@ -29,7 +29,7 @@
 #define NR_syscalls  (__NR_O32_Linux + __NR_O32_Linux_syscalls)
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_OLD_READDIR
@@ -62,6 +62,6 @@
 /* whitelists for checksyscalls */
 #define __IGNORE_fadvise64_64
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_UNISTD_H */
arch/mips/include/asm/vdso/gettimeofday.h +2 -2
index 44a45f3fa4b01..e69bf35006625 100644
@@ -11,7 +11,7 @@
 #ifndef __ASM_VDSO_GETTIMEOFDAY_H
 #define __ASM_VDSO_GETTIMEOFDAY_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/vdso/vdso.h>
 #include <asm/clocksource.h>
@@ -214,6 +214,6 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
 	return get_vdso_data();
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
arch/mips/include/asm/vdso/processor.h +2 -2
index 511c95d735e65..05cdb366dc21c 100644
@@ -5,7 +5,7 @@
 #ifndef __ASM_VDSO_PROCESSOR_H
 #define __ASM_VDSO_PROCESSOR_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_CPU_LOONGSON64
 /*
@@ -22,6 +22,6 @@
 #define cpu_relax()	barrier()
 #endif
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_PROCESSOR_H */
arch/mips/include/asm/vdso/vdso.h +2 -2
index 6cd88191fefa9..1cbe6aca73201 100644
@@ -6,7 +6,7 @@
 
 #include <asm/sgidefs.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/asm.h>
 #include <asm/page.h>
@@ -72,4 +72,4 @@ static inline void __iomem *get_gic(const struct vdso_data *data)
 
 #endif /* CONFIG_CLKSRC_MIPS_GIC */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
arch/mips/include/asm/vdso/vsyscall.h +2 -2
index a4582870aaea4..ea9d04d05eafa 100644
@@ -2,7 +2,7 @@
 #ifndef __ASM_VDSO_VSYSCALL_H
 #define __ASM_VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <vdso/datapage.h>
 
@@ -21,6 +21,6 @@ struct vdso_data *__mips_get_k_vdso_data(void)
 /* The asm-generic header needs to be included after the definitions above */
 #include <asm-generic/vdso/vsyscall.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
arch/mips/include/asm/xtalk/xtalk.h +2 -2
index 680e7efebbaf6..dfe6a3fce65a5 100644
@@ -12,7 +12,7 @@
 #ifndef _ASM_XTALK_XTALK_H
 #define _ASM_XTALK_XTALK_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * User-level device driver visible types
  */
@@ -47,6 +47,6 @@ typedef struct xtalk_piomap_s *xtalk_piomap_t;
 #define XIO_PORT(x)	((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT))
 #define XIO_PACK(p, o)	((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS))
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_XTALK_XTALK_H */
arch/mips/include/asm/xtalk/xwidget.h +2 -2
index 24f121da6a1d9..efcfe4494576a 100644
@@ -203,7 +203,7 @@ static const struct widget_ident __initconst widget_idents[] = {
  * widget target flush register are widget dependent thus will not be
  * defined here
  */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 typedef u32 widgetreg_t;
 
 /* widget configuration registers */
@@ -274,6 +274,6 @@ typedef struct xwidget_hwid_s {
 	((hwid2)->mfg_num == XWIDGET_MFG_NUM_NONE) || \
 	((hwid1)->mfg_num == (hwid2)->mfg_num)))
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_XTALK_XWIDGET_H */
drivers/soc/bcm/brcmstb/pm/pm.h +1 -1
index 94a380470a2f9..17f7a06a7a836 100644
@@ -60,7 +60,7 @@
 			   PM_DEEP_STANDBY | \
 			   PM_PLL_PWRDOWN | PM_PWR_DOWN)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #ifndef CONFIG_MIPS
 extern const unsigned long brcmstb_pm_do_s2_sz;
Signature · 1 line
2.48.1
Reviewed-by on v1 19/41
#40 lore raw

Re: [PATCH 19/41] mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers

Quoted 62 lines · Thomas Huth

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. 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.

This is almost a completely mechanical patch (done with a simple "sed -i" statement), with just one comment tweaked manually in arch/mips/include/asm/cpu.h (that was missing some underscores).

---
  arch/mips/include/asm/addrspace.h            |  4 +--
  arch/mips/include/asm/asm-eva.h              |  6 ++--
  arch/mips/include/asm/asm.h                  |  8 ++---
  arch/mips/include/asm/bmips.h                |  4 +--
  arch/mips/include/asm/cpu.h                  |  4 +--
  arch/mips/include/asm/dec/ecc.h              |  2 +-
  arch/mips/include/asm/dec/interrupts.h       |  4 +--
  arch/mips/include/asm/dec/kn01.h             |  2 +-
  arch/mips/include/asm/dec/kn02.h             |  2 +-
  arch/mips/include/asm/dec/kn02xa.h           |  2 +-
  arch/mips/include/asm/eva.h                  |  4 +--
  arch/mips/include/asm/ftrace.h               |  4 +--
  arch/mips/include/asm/hazards.h              |  4 +--
  arch/mips/include/asm/irqflags.h             |  4 +--
  arch/mips/include/asm/jazz.h                 | 16 ++++-----
  arch/mips/include/asm/jump_label.h           |  4 +--
  arch/mips/include/asm/linkage.h              |  2 +-
  arch/mips/include/asm/mach-generic/spaces.h  |  4 +--
  arch/mips/include/asm/mips-boards/bonito64.h |  4 +--
  arch/mips/include/asm/mipsmtregs.h           |  6 ++--
  arch/mips/include/asm/mipsregs.h             |  6 ++--
  arch/mips/include/asm/msa.h                  |  4 +--
  arch/mips/include/asm/pci/bridge.h           |  4 +--
  arch/mips/include/asm/pm.h                   |  6 ++--
  arch/mips/include/asm/prefetch.h             |  2 +-
  arch/mips/include/asm/regdef.h               |  4 +--
  arch/mips/include/asm/sibyte/board.h         |  4 +--
  arch/mips/include/asm/sibyte/sb1250.h        |  2 +-
  arch/mips/include/asm/sibyte/sb1250_defs.h   |  6 ++--
  arch/mips/include/asm/smp-cps.h              |  6 ++--
  arch/mips/include/asm/sn/addrs.h             | 18 +++++-----
  arch/mips/include/asm/sn/gda.h               |  4 +--
  arch/mips/include/asm/sn/kldir.h             |  4 +--
  arch/mips/include/asm/sn/klkernvars.h        |  4 +--
  arch/mips/include/asm/sn/launch.h            |  4 +--
  arch/mips/include/asm/sn/nmi.h               |  8 ++---
  arch/mips/include/asm/sn/sn0/addrs.h         | 14 ++++----
  arch/mips/include/asm/sn/sn0/hub.h           |  2 +-
  arch/mips/include/asm/sn/sn0/hubio.h         | 36 ++++++++++----------
  arch/mips/include/asm/sn/sn0/hubmd.h         |  4 +--
  arch/mips/include/asm/sn/sn0/hubni.h         |  6 ++--
  arch/mips/include/asm/sn/sn0/hubpi.h         |  4 +--
  arch/mips/include/asm/sn/types.h             |  2 +-
  arch/mips/include/asm/sync.h                 |  2 +-
  arch/mips/include/asm/thread_info.h          |  4 +--
  arch/mips/include/asm/unistd.h               |  4 +--
Quoted 8 lines
  arch/mips/include/asm/vdso/gettimeofday.h    |  4 +--
  arch/mips/include/asm/vdso/processor.h       |  4 +--
  arch/mips/include/asm/vdso/vdso.h            |  4 +--
  arch/mips/include/asm/vdso/vsyscall.h        |  4 +--
  arch/mips/include/asm/xtalk/xtalk.h          |  4 +--
  arch/mips/include/asm/xtalk/xwidget.h        |  4 +--
  drivers/soc/bcm/brcmstb/pm/pm.h              |  2 +-
  53 files changed, 140 insertions(+), 140 deletions(-)
#41 lore raw

PATCH 20/41 nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/nios2/include/uapi/asm/ptrace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/nios2/include/uapi/asm/ptrace.h +2 -2
index 2b91dbe5bcfee..1298db9f0fc98 100644
@@ -13,7 +13,7 @@
 #ifndef _UAPI_ASM_NIOS2_PTRACE_H
 #define _UAPI_ASM_NIOS2_PTRACE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <linux/types.h>
 
@@ -80,5 +80,5 @@ struct user_pt_regs {
 	__u32		regs[49];
 };
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _UAPI_ASM_NIOS2_PTRACE_H */
Signature · 1 line
2.48.1
#42 lore raw

PATCH 21/41 nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers

In reply to Thomas Huth

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. 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.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
 arch/nios2/include/asm/entry.h       | 4 ++--
 arch/nios2/include/asm/page.h        | 4 ++--
 arch/nios2/include/asm/processor.h   | 4 ++--
 arch/nios2/include/asm/ptrace.h      | 4 ++--
 arch/nios2/include/asm/registers.h   | 4 ++--
 arch/nios2/include/asm/setup.h       | 4 ++--
 arch/nios2/include/asm/thread_info.h | 4 ++--
 arch/nios2/include/asm/traps.h       | 2 +-
 8 files changed, 15 insertions(+), 15 deletions(-)
arch/nios2/include/asm/entry.h +2 -2
index bafb7b2ca59fc..cb25ed56450ab 100644
@@ -10,7 +10,7 @@
 #ifndef _ASM_NIOS2_ENTRY_H
 #define _ASM_NIOS2_ENTRY_H
 
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
 
 #include <asm/processor.h>
 #include <asm/registers.h>
@@ -117,5 +117,5 @@
 	addi	sp, sp, SWITCH_STACK_SIZE
 .endm
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _ASM_NIOS2_ENTRY_H */
arch/nios2/include/asm/page.h +2 -2
index 2897ec1b74f61..00a51623d38a5 100644
@@ -26,7 +26,7 @@
 #define PAGE_OFFSET	\
 	(CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_KERNEL_REGION_BASE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * This gives the physical RAM offset.
@@ -90,6 +90,6 @@ extern struct page *mem_map;
 
 #include <asm-generic/getorder.h>
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_NIOS2_PAGE_H */
arch/nios2/include/asm/processor.h +2 -2
index eb44130364a9a..d9521c3c2df98 100644
@@ -36,7 +36,7 @@
 /* Kuser helpers is mapped to this user space address */
 #define KUSER_BASE		0x1000
 #define KUSER_SIZE		(PAGE_SIZE)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 # define TASK_SIZE		0x7FFF0000UL
 # define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
@@ -72,6 +72,6 @@ extern unsigned long __get_wchan(struct task_struct *p);
 
 #define cpu_relax()	barrier()
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_NIOS2_PROCESSOR_H */
arch/nios2/include/asm/ptrace.h +2 -2
index 9da34c3022a27..96cbcd40c7ce5 100644
@@ -18,7 +18,7 @@
 /* This struct defines the way the registers are stored on the
    stack during a system call.  */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct pt_regs {
 	unsigned long  r8;	/* r8-r15 Caller-saved GP registers */
 	unsigned long  r9;
@@ -78,5 +78,5 @@ extern void show_regs(struct pt_regs *);
 
 int do_syscall_trace_enter(void);
 void do_syscall_trace_exit(void);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _ASM_NIOS2_PTRACE_H */
arch/nios2/include/asm/registers.h +2 -2
index 95b67dd16f818..165dab26221f2 100644
@@ -6,7 +6,7 @@
 #ifndef _ASM_NIOS2_REGISTERS_H
 #define _ASM_NIOS2_REGISTERS_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/cpuinfo.h>
 #endif
 
@@ -44,7 +44,7 @@
 
 /* tlbmisc register bits */
 #define TLBMISC_PID_SHIFT	4
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #define TLBMISC_PID_MASK	((1UL << cpuinfo.tlb_pid_num_bits) - 1)
 #endif
 #define TLBMISC_WAY_MASK	0xf
arch/nios2/include/asm/setup.h +2 -2
index 908a1526d1bd7..6d3f26a71cb51 100644
@@ -8,7 +8,7 @@
 
 #include <asm-generic/setup.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #ifdef __KERNEL__
 
 extern char exception_handler_hook[];
@@ -18,6 +18,6 @@ extern char fast_handler_end[];
 extern void pagetable_init(void);
 
 #endif/* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* _ASM_NIOS2_SETUP_H */
arch/nios2/include/asm/thread_info.h +2 -2
index 5abac9893b32b..83df79286d62e 100644
@@ -24,7 +24,7 @@
 #define THREAD_SIZE_ORDER	1
 #define THREAD_SIZE		8192 /* 2 * PAGE_SIZE */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 /*
  * low level task data that entry.S needs immediate access to
@@ -61,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
 
 	return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
 }
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 /*
  * thread information flags
arch/nios2/include/asm/traps.h +1 -1
index afd77bef01c65..133a3dedbc3e8 100644
@@ -12,7 +12,7 @@
 
 #define TRAP_ID_SYSCALL		0
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr);
 void do_page_fault(struct pt_regs *regs, unsigned long cause,
 		   unsigned long address);
Signature · 1 line
2.48.1
#43 lore raw

PATCH 22/41 openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

In reply to Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

This is a completely mechanical patch (done with a simple "sed -i" statement).

Cc Jonas Bonn <[email protected]>
Cc Stefan Kristiansson <[email protected]>
Cc Stafford Horne <[email protected]>
---
 arch/openrisc/include/uapi/asm/ptrace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/openrisc/include/uapi/asm/ptrace.h +1 -1
index a77cc9915ca8f..1f12a60d5a06c 100644
@@ -20,7 +20,7 @@
 #ifndef _UAPI__ASM_OPENRISC_PTRACE_H
 #define _UAPI__ASM_OPENRISC_PTRACE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * This is the layout of the regset returned by the GETREGSET ptrace call
  */
Signature · 1 line
2.48.1
maintainer
#44 lore raw

Re: [PATCH 22/41] openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers

Quoted 8 lines · Thomas Huth

__ASSEMBLY__ is only defined by the Makefile of the kernel, so this is not really useful for uapi headers (unless the userspace Makefile defines it, too). Let's switch to __ASSEMBLER__ which gets set automatically by the compiler when compiling assembly code.

This is a completely mechanical patch (done with a simple "sed -i" statement).

Thanks Thomas,

This makes sense to me, I see the other discussions now and it look's like there is still some discussions going on. For now I have added this to the OpenRISC queue, but I don't think it will get in until 6.16.

That should give a bit more time for the discussion and more time to test for me.

-Stafford

Quoted 25 lines
Cc Jonas Bonn <[email protected]>
Cc Stefan Kristiansson <[email protected]>
Cc Stafford Horne <[email protected]>
---
 arch/openrisc/include/uapi/asm/ptrace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/openrisc/include/uapi/asm/ptrace.h +1 -1
index a77cc9915ca8f..1f12a60d5a06c 100644
@@ -20,7 +20,7 @@
 #ifndef _UAPI__ASM_OPENRISC_PTRACE_H
 #define _UAPI__ASM_OPENRISC_PTRACE_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /*
  * This is the layout of the regset returned by the GETREGSET ptrace call
  */
Signature · 1 line
2.48.1