From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00772606A31A for ; Fri, 23 Oct 2026 06:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pggzjORE; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ll/bIthD DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=vDaL1COJr2K4S86R8pTMA5yAv9IhqUJagtYuczRJqaA=; b=pggzjORE3OsU3bMi2p3c4G+Abj 9OJGQ/l0Yq8BkgyZPCJJ5IYx7WW3x1tcTfrX6F80VEz+UtTMTJkXAB/2pIGM33Vww1ZukCaFtpT+D PFL6dMwwa/dx+2QssRwo3MprdkaXsZp9ZBvoxxWQpSv5wNL3pixNlWx16VUweSFnU0sKTyzM0iBBw OTUggwzGiR3khzsH6iiHppgFs5P0IoP0fHrC0uqd0Hp5Gz9p5pURDfHZ0mbca4aXP2x+9ZdO7bhzH lcjLfM6uW4AnbYIJP3fN2p/Y2zpdXDtetkevPAC+n7W6YwNZZiqN+LgBWnZVFfQCnNp/PolL/eY8R jfWXjw9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xK97F-0000000FeJX-2HCY; Fri, 23 Oct 2026 06:51:01 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xK97B-0000000FeHa-3B6F for linux-riscv@lists.infradead.org; Fri, 23 Oct 2026 06:50:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792738257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F6+noPVYF4kQP6smbqYTSV7WwZHDrBWE8Us7MYDz21A=; b=Ll/bIthD/XJmjJLaSlVZOMmbPlmpgtUBF+HzOaMf1e4H1QMiv3s4u+rywngsSXVTWLLlL7 Rr5RtFw+hm7dLCdIeuU6eH463KALVx5uyGiGeEL3Dp1fCj0RhyL3MpJjJFQArmzmhKtyrL rq/wBk1yITat8fLuorv3/J2RDPI7bvA= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-btsU4HnaOfiLk5Dw5-cjHg-1; Fri, 23 Oct 2026 02:50:54 -0400 X-MC-Unique: btsU4HnaOfiLk5Dw5-cjHg-1 X-Mimecast-MFC-AGG-ID: btsU4HnaOfiLk5Dw5-cjHg_1792738249 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E21B51800660; Fri, 23 Oct 2026 06:50:47 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.48.42]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7EFCD1956095; Fri, 23 Oct 2026 06:50:27 +0000 (UTC) From: Thomas Huth To: Arnd Bergmann , Nathan Chancellor , Nicolas Schier , Richard Henderson , Matt Turner , Magnus Lindholm , Catalin Marinas , Will Deacon , Huacai Chen , Thomas Bogendoerfer , Madhavan Srinivasan , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Chris Zankel , Max Filippov , Ard Biesheuvel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Luis Augenstein , Maximilian Huber , Anup Patel , Paolo Bonzini , Shuah Khan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andy Lutomirski , Vincenzo Frascino Cc: soc@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Mark Rutland , WANG Xuerui , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , "Ritesh Harjani (IBM)" , Shrikanth Hegde , Christian Borntraeger , Sven Schnelle , "H. Peter Anvin" , Ilias Apalodimas , Atish Patra , Sean Christopherson , Alexandre Ghiti , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-efi@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Date: Fri, 23 Oct 2026 08:48:50 +0200 Message-ID: <20261023064908.66707-14-thuth@redhat.com> In-Reply-To: <20261023064908.66707-1-thuth@redhat.com> References: <20261023064908.66707-1-thuth@redhat.com> X-Archived-By: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: bvUKg9d7Vrj1dD_mtrHDOOKB5xtrQvd2nEwQK73J4ME_1792738249 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261022_235057_955624_34FF8795 X-CRM114-Status: GOOD ( 14.36 ) X-Spam-Score: -2.8 (--) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 All spots have been changed to __ASSEMBLER__ (i.e. the macro that gets defined by the compiler), so we don't have to manually define __ASSEMBLY__ anymore. Signed-off-by: Thomas Huth --- Makefile | 2 +- arch/alpha/boot/compressed/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 1 - arch/loongarch/vdso/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/platforms/cell/spufs/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 2 +- arch/xtensa/kernel/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/net/wan/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- scripts/headers_install.sh | 1 - scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py | 2 +- tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 21 files changed, 17 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 0319cd716d73b..98bffdd9cf2d6 100644 --- a/Makefile +++ b/Makefile @@ -606,7 +606,7 @@ LINUXINCLUDE := \ -I$(objtree)/include \ $(USERINCLUDE) -KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE +KBUILD_AFLAGS := -fno-PIE KBUILD_CFLAGS := KBUILD_CFLAGS += -fshort-wchar diff --git a/arch/alpha/boot/compressed/Makefile b/arch/alpha/boot/compressed/Makefile index eb930f01b4be4..16119a13e53a3 100644 --- a/arch/alpha/boot/compressed/Makefile +++ b/arch/alpha/boot/compressed/Makefile @@ -22,7 +22,7 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += -pipe -mcpu=ev4 -mno-fp-regs -ffixed-8 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS KBUILD_CFLAGS += $(CC_FLAGS_DIALECT) -KBUILD_AFLAGS := -D__ASSEMBLY__ $(KBUILD_CFLAGS) +KBUILD_AFLAGS := $(KBUILD_CFLAGS) # The stub has no sanitizer or coverage runtime. arch/alpha/lib/lib.a is # built with the kernel's instrumentation and -mcpu=, so build private diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 00efdc5d23543..0ba0b4bb3e013 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -77,7 +77,6 @@ VDSO_CFLAGS += -marm endif VDSO_AFLAGS := $(VDSO_CAFLAGS) -VDSO_AFLAGS += -D__ASSEMBLY__ # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1 diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile index 0b84892d084b6..c2b73fd3781c0 100644 --- a/arch/loongarch/vdso/Makefile +++ b/arch/loongarch/vdso/Makefile @@ -32,7 +32,7 @@ cflags-vdso := $(ccflags-vdso) \ $(call cc-option, -fasynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index 2684540758a8d..3e3803b2db48f 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -30,7 +30,7 @@ endif KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ +KBUILD_AFLAGS := $(KBUILD_AFLAGS) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index 00d3ba2c482ac..4d04987e995de 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -33,7 +33,7 @@ cflags-vdso := $(ccflags-vdso) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) obj-vdso-y += vgettimeofday.o diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 7ee0fa2d3371e..5dca91ec9f4aa 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -80,7 +80,7 @@ BOOTCFLAGS := $(BOOTTARGETFLAGS) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \ -fomit-frame-pointer -fno-builtin -fPIC -BOOTAFLAGS := $(BOOTTARGETFLAGS) -D__ASSEMBLY__ +BOOTAFLAGS := $(BOOTTARGETFLAGS) BOOTARFLAGS := -crD diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile index 60319d4ff25a6..959617c4ee89c 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile @@ -15,7 +15,7 @@ SPU_AS := $(SPU_CROSS)gcc SPU_LD := $(SPU_CROSS)ld SPU_OBJCOPY := $(SPU_CROSS)objcopy SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -D__KERNEL__ -SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__ +SPU_AFLAGS := -c -I$(srctree)/include -D__KERNEL__ SPU_LDFLAGS := -N -Ttext=0x0 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 8b712cd85fcd3..83ecc702f7146 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -17,7 +17,7 @@ KBUILD_CFLAGS += -fPIC LDFLAGS_vmlinux := $(call ld-option,-no-pie) extra_tools := relocs aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 4a9bce32586d3..69d75072888d1 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -52,7 +52,7 @@ targets += cpustr.h # --------------------------------------------------------------------------- KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 680ad803cba7d..e73ef522496e1 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -49,7 +49,7 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h # that the compiler finds it even with out-of-tree builds (make O=/some/path). CFLAGS_sev-handle-vc.o += -I$(objtree)/arch/x86/lib/ -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info) diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile index a0fb39abc5c86..20bbe1af05acd 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile @@ -65,5 +65,5 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index d3ef0407401f6..ece4ae6dea97d 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -39,7 +39,7 @@ sed-y = -e ':a; s/\*(\([^)]*\)\.text\.unlikely/*(\1.literal.unlikely .{text}.unl -e 's/\.{text}/.text/g' quiet_cmd__cpp_lds_S = LDS $@ -cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ \ +cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa \ -DLINKER_SCRIPT $< | sed $(sed-y) >$@ $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 415f63105b481..d4edc3c0c4556 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -61,7 +61,7 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) # `-fdata-sections` flag from KBUILD_CFLAGS_KERNEL KBUILD_CFLAGS_KERNEL := $(filter-out -fdata-sections, $(KBUILD_CFLAGS_KERNEL)) -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \ file.o mem.o random.o randomalloc.o pci.o \ diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index 00e9b7ee1e012..4233143534465 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -57,7 +57,7 @@ $(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE $(call if_changed,m68kld_bin_o) quiet_cmd_m68kas_o_S = M68KAS $@ - cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< + cmd_m68kas_o_S = $(M68KCC) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< $(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE $(call if_changed_dep,m68kas_o_S) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6127feb970c65..0b7c1e273f0cb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -465,7 +465,7 @@ targets += $(lib-y) $(always-y) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \ - -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< + -DLINKER_SCRIPT -o $@ $< $(obj)/%.lds: $(src)/%.lds.S FORCE $(call if_changed_dep,cpp_lds_S) diff --git a/scripts/gfp-translate b/scripts/gfp-translate index 8385ae0d5af93..f6353795fdca3 100755 --- a/scripts/gfp-translate +++ b/scripts/gfp-translate @@ -73,7 +73,7 @@ echo Parsing: $GFPMASK #include // Try to fool compiler.h into not including extra stuff -#define __ASSEMBLY__ 1 +#define __ASSEMBLER__ 1 #include #include diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 2f1d1767ca267..9c15e748761c4 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -36,7 +36,6 @@ sed -E -e ' s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @ - s/__ASSEMBLY__/__ASSEMBLER__/g ' $INFILE > $TMPFILE || exit 1 scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE diff --git a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py index 93787a1cd1566..8d9ae35764040 100644 --- a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py +++ b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py @@ -152,7 +152,7 @@ class TestSavedCmdParser(unittest.TestCase): self._assert_parsing(cmd, expected) def test_clang(self): - cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -D__ASSEMBLY__ -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S""" + cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S""" expected = "../arch/x86/entry/entry_64_compat.S" self._assert_parsing(cmd, expected) diff --git a/tools/testing/selftests/kvm/lib/riscv/handlers.S b/tools/testing/selftests/kvm/lib/riscv/handlers.S index b787b982e922a..c8cc2d695f483 100644 --- a/tools/testing/selftests/kvm/lib/riscv/handlers.S +++ b/tools/testing/selftests/kvm/lib/riscv/handlers.S @@ -3,10 +3,6 @@ * Copyright (c) 2023 Intel Corporation */ -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ -#endif - #include .macro save_context diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testing/selftests/vDSO/vgetrandom-chacha.S index 16f985b089d45..42839c5cf5ec4 100644 --- a/tools/testing/selftests/vDSO/vgetrandom-chacha.S +++ b/tools/testing/selftests/vDSO/vgetrandom-chacha.S @@ -3,8 +3,6 @@ * Copyright (C) 2024 Jason A. Donenfeld . All Rights Reserved. */ -#define __ASSEMBLY__ - #if defined(__aarch64__) #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" #elif defined(__loongarch__) -- 2.56.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792738256; b=UF6ReX1Dvgue1SaV635yA0i6JQV+0gAHJB+ZJs/346bnJo4trKM7sjSYIEMQJDMzIA80 COEYpQ6fgBKlsNiH3dn3wnbYUGvyQu+zSnYdaYIMB0dmJrch3chXWMAKk0GQ2MStyXYL5 EI7pKl9zie8BCJweg5nt8cv21uD3yeXoQMZqcqrRwGZpITxL36kHpjhwVtNskiWcdXbTu dy1oAIwWoEVm0+Ctr6sbF/cSJ1JxEUDgUR4cK/Nh/w0xtwaIaE0acQJm24HjfHMUiXLcl LOarzWwhS32JjOkEA0WjjA/Mv4CQfcr2eoVeS4ttRjBBXRV+Cijmz7QA8VF1ihy1qLQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792738256; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=F6+noPVYF4kQP6smbqYTSV7WwZHDrBWE8Us7MYDz21A=; b=wj1esnwlGb6n5nN+X8/Uh95pzrSUD2mp96Z9gvrIgPaBLcECe6og9Zbkepmq91ZCdROu X98qNc7HyrHFEB2x+Btp9TZ3Muz/CpuVVqEgVQLkF6ViE3asHYQoTLAnr8cxwXaVlAFhE t286IJIJUqAjeWbXrf6jXhYbKMpsisV2abE+B7wYem1xchhFW2U4x9B4a4SlrFa2Zb3Il o81asJe7mf94Tm73i6n2VIH5UiAwVMDtzpGvg08gb4Y4FGsP0irpSGMduFmU2S0QF8FDP tLuJ/3Q2os8IgEeKw8hAbf9PRDlX7a3dhwfREH5qElnANqpmzZI3sONbF84nHfEohMw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DMBYQ++E; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DCC9606A323 for ; Fri, 23 Oct 2026 06:50:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8DCC9606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DMBYQ++E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792738254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F6+noPVYF4kQP6smbqYTSV7WwZHDrBWE8Us7MYDz21A=; b=DMBYQ++Ec2YdNTCkGfCenFQpSeFu2lnTGzUVI+2wRts0pdYULSiNwrdY8Kj33GQOqpaqA3 CiTDid/SgrXVTBkuBDFAVEyuxU+aoSQSJo7fWkJqdwSOQS7A2hEtvXJ9BX5Ne6FCpsU48J s3bgTCDBDtoCTPirSDIW+u21R0q8KLU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-1BrFnSVrOACgn3OQUjDx2Q-1; Fri, 23 Oct 2026 02:50:51 -0400 X-MC-Unique: 1BrFnSVrOACgn3OQUjDx2Q-1 X-Mimecast-MFC-AGG-ID: 1BrFnSVrOACgn3OQUjDx2Q_1792738248 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BCC341955F71; Fri, 23 Oct 2026 06:50:47 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.48.42]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7EFCD1956095; Fri, 23 Oct 2026 06:50:27 +0000 (UTC) From: Thomas Huth To: Arnd Bergmann , Nathan Chancellor , Nicolas Schier , Richard Henderson , Matt Turner , Magnus Lindholm , Catalin Marinas , Will Deacon , Huacai Chen , Thomas Bogendoerfer , Madhavan Srinivasan , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Chris Zankel , Max Filippov , Ard Biesheuvel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Luis Augenstein , Maximilian Huber , Anup Patel , Paolo Bonzini , Shuah Khan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andy Lutomirski , Vincenzo Frascino Cc: soc@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Mark Rutland , WANG Xuerui , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , "Ritesh Harjani (IBM)" , Shrikanth Hegde , Christian Borntraeger , Sven Schnelle , "H. Peter Anvin" , Ilias Apalodimas , Atish Patra , Sean Christopherson , Alexandre Ghiti , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-efi@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Date: Fri, 23 Oct 2026 08:48:50 +0200 Message-ID: <20261023064908.66707-14-thuth@redhat.com> In-Reply-To: <20261023064908.66707-1-thuth@redhat.com> References: <20261023064908.66707-1-thuth@redhat.com> X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 All spots have been changed to __ASSEMBLER__ (i.e. the macro that gets defined by the compiler), so we don't have to manually define __ASSEMBLY__ anymore. Signed-off-by: Thomas Huth --- Makefile | 2 +- arch/alpha/boot/compressed/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 1 - arch/loongarch/vdso/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/platforms/cell/spufs/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 2 +- arch/xtensa/kernel/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/net/wan/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- scripts/headers_install.sh | 1 - scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py | 2 +- tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 21 files changed, 17 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 0319cd716d73b..98bffdd9cf2d6 100644 --- a/Makefile +++ b/Makefile @@ -606,7 +606,7 @@ LINUXINCLUDE := \ -I$(objtree)/include \ $(USERINCLUDE) -KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE +KBUILD_AFLAGS := -fno-PIE KBUILD_CFLAGS := KBUILD_CFLAGS += -fshort-wchar diff --git a/arch/alpha/boot/compressed/Makefile b/arch/alpha/boot/compressed/Makefile index eb930f01b4be4..16119a13e53a3 100644 --- a/arch/alpha/boot/compressed/Makefile +++ b/arch/alpha/boot/compressed/Makefile @@ -22,7 +22,7 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += -pipe -mcpu=ev4 -mno-fp-regs -ffixed-8 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS KBUILD_CFLAGS += $(CC_FLAGS_DIALECT) -KBUILD_AFLAGS := -D__ASSEMBLY__ $(KBUILD_CFLAGS) +KBUILD_AFLAGS := $(KBUILD_CFLAGS) # The stub has no sanitizer or coverage runtime. arch/alpha/lib/lib.a is # built with the kernel's instrumentation and -mcpu=, so build private diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 00efdc5d23543..0ba0b4bb3e013 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -77,7 +77,6 @@ VDSO_CFLAGS += -marm endif VDSO_AFLAGS := $(VDSO_CAFLAGS) -VDSO_AFLAGS += -D__ASSEMBLY__ # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1 diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile index 0b84892d084b6..c2b73fd3781c0 100644 --- a/arch/loongarch/vdso/Makefile +++ b/arch/loongarch/vdso/Makefile @@ -32,7 +32,7 @@ cflags-vdso := $(ccflags-vdso) \ $(call cc-option, -fasynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index 2684540758a8d..3e3803b2db48f 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -30,7 +30,7 @@ endif KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ +KBUILD_AFLAGS := $(KBUILD_AFLAGS) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index 00d3ba2c482ac..4d04987e995de 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -33,7 +33,7 @@ cflags-vdso := $(ccflags-vdso) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) obj-vdso-y += vgettimeofday.o diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 7ee0fa2d3371e..5dca91ec9f4aa 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -80,7 +80,7 @@ BOOTCFLAGS := $(BOOTTARGETFLAGS) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \ -fomit-frame-pointer -fno-builtin -fPIC -BOOTAFLAGS := $(BOOTTARGETFLAGS) -D__ASSEMBLY__ +BOOTAFLAGS := $(BOOTTARGETFLAGS) BOOTARFLAGS := -crD diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile index 60319d4ff25a6..959617c4ee89c 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile @@ -15,7 +15,7 @@ SPU_AS := $(SPU_CROSS)gcc SPU_LD := $(SPU_CROSS)ld SPU_OBJCOPY := $(SPU_CROSS)objcopy SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -D__KERNEL__ -SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__ +SPU_AFLAGS := -c -I$(srctree)/include -D__KERNEL__ SPU_LDFLAGS := -N -Ttext=0x0 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 8b712cd85fcd3..83ecc702f7146 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -17,7 +17,7 @@ KBUILD_CFLAGS += -fPIC LDFLAGS_vmlinux := $(call ld-option,-no-pie) extra_tools := relocs aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 4a9bce32586d3..69d75072888d1 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -52,7 +52,7 @@ targets += cpustr.h # --------------------------------------------------------------------------- KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 680ad803cba7d..e73ef522496e1 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -49,7 +49,7 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h # that the compiler finds it even with out-of-tree builds (make O=/some/path). CFLAGS_sev-handle-vc.o += -I$(objtree)/arch/x86/lib/ -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info) diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile index a0fb39abc5c86..20bbe1af05acd 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile @@ -65,5 +65,5 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index d3ef0407401f6..ece4ae6dea97d 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -39,7 +39,7 @@ sed-y = -e ':a; s/\*(\([^)]*\)\.text\.unlikely/*(\1.literal.unlikely .{text}.unl -e 's/\.{text}/.text/g' quiet_cmd__cpp_lds_S = LDS $@ -cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ \ +cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa \ -DLINKER_SCRIPT $< | sed $(sed-y) >$@ $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 415f63105b481..d4edc3c0c4556 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -61,7 +61,7 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) # `-fdata-sections` flag from KBUILD_CFLAGS_KERNEL KBUILD_CFLAGS_KERNEL := $(filter-out -fdata-sections, $(KBUILD_CFLAGS_KERNEL)) -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \ file.o mem.o random.o randomalloc.o pci.o \ diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index 00e9b7ee1e012..4233143534465 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -57,7 +57,7 @@ $(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE $(call if_changed,m68kld_bin_o) quiet_cmd_m68kas_o_S = M68KAS $@ - cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< + cmd_m68kas_o_S = $(M68KCC) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< $(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE $(call if_changed_dep,m68kas_o_S) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6127feb970c65..0b7c1e273f0cb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -465,7 +465,7 @@ targets += $(lib-y) $(always-y) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \ - -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< + -DLINKER_SCRIPT -o $@ $< $(obj)/%.lds: $(src)/%.lds.S FORCE $(call if_changed_dep,cpp_lds_S) diff --git a/scripts/gfp-translate b/scripts/gfp-translate index 8385ae0d5af93..f6353795fdca3 100755 --- a/scripts/gfp-translate +++ b/scripts/gfp-translate @@ -73,7 +73,7 @@ echo Parsing: $GFPMASK #include // Try to fool compiler.h into not including extra stuff -#define __ASSEMBLY__ 1 +#define __ASSEMBLER__ 1 #include #include diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 2f1d1767ca267..9c15e748761c4 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -36,7 +36,6 @@ sed -E -e ' s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @ - s/__ASSEMBLY__/__ASSEMBLER__/g ' $INFILE > $TMPFILE || exit 1 scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE diff --git a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py index 93787a1cd1566..8d9ae35764040 100644 --- a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py +++ b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py @@ -152,7 +152,7 @@ class TestSavedCmdParser(unittest.TestCase): self._assert_parsing(cmd, expected) def test_clang(self): - cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -D__ASSEMBLY__ -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S""" + cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S""" expected = "../arch/x86/entry/entry_64_compat.S" self._assert_parsing(cmd, expected) diff --git a/tools/testing/selftests/kvm/lib/riscv/handlers.S b/tools/testing/selftests/kvm/lib/riscv/handlers.S index b787b982e922a..c8cc2d695f483 100644 --- a/tools/testing/selftests/kvm/lib/riscv/handlers.S +++ b/tools/testing/selftests/kvm/lib/riscv/handlers.S @@ -3,10 +3,6 @@ * Copyright (c) 2023 Intel Corporation */ -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ -#endif - #include .macro save_context diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testing/selftests/vDSO/vgetrandom-chacha.S index 16f985b089d45..42839c5cf5ec4 100644 --- a/tools/testing/selftests/vDSO/vgetrandom-chacha.S +++ b/tools/testing/selftests/vDSO/vgetrandom-chacha.S @@ -3,8 +3,6 @@ * Copyright (C) 2024 Jason A. Donenfeld . All Rights Reserved. */ -#define __ASSEMBLY__ - #if defined(__aarch64__) #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" #elif defined(__loongarch__) -- 2.56.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D76E5606A32E for ; Fri, 23 Oct 2026 06:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=lqlIIDpj; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TgL02ohh DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=UjExueHJ1/LXPGvLeJUrkgoFUQF3+zAQsxpuJN4CXSI=; b=lqlIIDpjZMoVl+sDzi6qrx6BSK cGB4ToqOERmskJma9kToSWqpNp3m6qyaorMEI9hN42ekQQSe51DSAJNedRHiuAo5yYndnkE31ZMMw 8QXSRJCfZs8KDSkLLLzilA4Y3Dm5fbsX2Qo3tVEyFtQBvc8RUbzqE+fTfMcKVdi/wDizPkglU4+cn tUf2HPFrqBu2A5ljB/ywjD09js157u+OShqgj/0EVr6Pvy/qqDqzTrRfU5pUcSddLp6ehNFdeifHh XkbmjUu0xoCi0MByq2URIlovb4xccqVIV9YwWgadV5IoMGpSkYJNV3saURpP3/cJhK5C0DpLbMHJ/ h/rXKPJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xK97E-0000000FeIx-1ycG; Fri, 23 Oct 2026 06:51:00 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xK97B-0000000FeHI-0dZJ for kvm-riscv@lists.infradead.org; Fri, 23 Oct 2026 06:50:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792738256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F6+noPVYF4kQP6smbqYTSV7WwZHDrBWE8Us7MYDz21A=; b=TgL02ohhN6XMdSY/1sfozfbO3OyP9HXXMH9ydAI24D3EeR9sXtbVXG1eXS6zE0GL4zNyON sB/xt0k/RuyOjlQeN6rCZBNxr/BnmuMFouORX2edJuhVha6o0DVqfLwnKlZukTSG31eN+x R7ZzNs3gF8H/c6yHJgl4I8n/bvIumyM= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-btsU4HnaOfiLk5Dw5-cjHg-1; Fri, 23 Oct 2026 02:50:54 -0400 X-MC-Unique: btsU4HnaOfiLk5Dw5-cjHg-1 X-Mimecast-MFC-AGG-ID: btsU4HnaOfiLk5Dw5-cjHg_1792738249 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E21B51800660; Fri, 23 Oct 2026 06:50:47 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.48.42]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7EFCD1956095; Fri, 23 Oct 2026 06:50:27 +0000 (UTC) From: Thomas Huth To: Arnd Bergmann , Nathan Chancellor , Nicolas Schier , Richard Henderson , Matt Turner , Magnus Lindholm , Catalin Marinas , Will Deacon , Huacai Chen , Thomas Bogendoerfer , Madhavan Srinivasan , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Chris Zankel , Max Filippov , Ard Biesheuvel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Luis Augenstein , Maximilian Huber , Anup Patel , Paolo Bonzini , Shuah Khan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andy Lutomirski , Vincenzo Frascino Cc: soc@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Mark Rutland , WANG Xuerui , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , "Ritesh Harjani (IBM)" , Shrikanth Hegde , Christian Borntraeger , Sven Schnelle , "H. Peter Anvin" , Ilias Apalodimas , Atish Patra , Sean Christopherson , Alexandre Ghiti , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-efi@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Date: Fri, 23 Oct 2026 08:48:50 +0200 Message-ID: <20261023064908.66707-14-thuth@redhat.com> In-Reply-To: <20261023064908.66707-1-thuth@redhat.com> References: <20261023064908.66707-1-thuth@redhat.com> X-Archived-By: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 5RKuwad20HhQyROHVEu33bX0JfmZVoSj9tohBg-s4v8_1792738249 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261022_235057_345406_675744E4 X-CRM114-Status: GOOD ( 14.36 ) X-Spam-Score: -2.8 (--) X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 All spots have been changed to __ASSEMBLER__ (i.e. the macro that gets defined by the compiler), so we don't have to manually define __ASSEMBLY__ anymore. Signed-off-by: Thomas Huth --- Makefile | 2 +- arch/alpha/boot/compressed/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 1 - arch/loongarch/vdso/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/platforms/cell/spufs/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/x86/boot/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 2 +- arch/xtensa/kernel/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/net/wan/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- scripts/headers_install.sh | 1 - scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py | 2 +- tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 21 files changed, 17 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 0319cd716d73b..98bffdd9cf2d6 100644 --- a/Makefile +++ b/Makefile @@ -606,7 +606,7 @@ LINUXINCLUDE := \ -I$(objtree)/include \ $(USERINCLUDE) -KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE +KBUILD_AFLAGS := -fno-PIE KBUILD_CFLAGS := KBUILD_CFLAGS += -fshort-wchar diff --git a/arch/alpha/boot/compressed/Makefile b/arch/alpha/boot/compressed/Makefile index eb930f01b4be4..16119a13e53a3 100644 --- a/arch/alpha/boot/compressed/Makefile +++ b/arch/alpha/boot/compressed/Makefile @@ -22,7 +22,7 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += -pipe -mcpu=ev4 -mno-fp-regs -ffixed-8 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS KBUILD_CFLAGS += $(CC_FLAGS_DIALECT) -KBUILD_AFLAGS := -D__ASSEMBLY__ $(KBUILD_CFLAGS) +KBUILD_AFLAGS := $(KBUILD_CFLAGS) # The stub has no sanitizer or coverage runtime. arch/alpha/lib/lib.a is # built with the kernel's instrumentation and -mcpu=, so build private diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 00efdc5d23543..0ba0b4bb3e013 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -77,7 +77,6 @@ VDSO_CFLAGS += -marm endif VDSO_AFLAGS := $(VDSO_CAFLAGS) -VDSO_AFLAGS += -D__ASSEMBLY__ # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1 diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile index 0b84892d084b6..c2b73fd3781c0 100644 --- a/arch/loongarch/vdso/Makefile +++ b/arch/loongarch/vdso/Makefile @@ -32,7 +32,7 @@ cflags-vdso := $(ccflags-vdso) \ $(call cc-option, -fasynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index 2684540758a8d..3e3803b2db48f 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -30,7 +30,7 @@ endif KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ +KBUILD_AFLAGS := $(KBUILD_AFLAGS) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index 00d3ba2c482ac..4d04987e995de 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -33,7 +33,7 @@ cflags-vdso := $(ccflags-vdso) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) aflags-vdso := $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 ifneq ($(c-gettimeofday-y),) obj-vdso-y += vgettimeofday.o diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 7ee0fa2d3371e..5dca91ec9f4aa 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -80,7 +80,7 @@ BOOTCFLAGS := $(BOOTTARGETFLAGS) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \ -fomit-frame-pointer -fno-builtin -fPIC -BOOTAFLAGS := $(BOOTTARGETFLAGS) -D__ASSEMBLY__ +BOOTAFLAGS := $(BOOTTARGETFLAGS) BOOTARFLAGS := -crD diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile index 60319d4ff25a6..959617c4ee89c 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile @@ -15,7 +15,7 @@ SPU_AS := $(SPU_CROSS)gcc SPU_LD := $(SPU_CROSS)ld SPU_OBJCOPY := $(SPU_CROSS)objcopy SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -D__KERNEL__ -SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__ +SPU_AFLAGS := -c -I$(srctree)/include -D__KERNEL__ SPU_LDFLAGS := -N -Ttext=0x0 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 8b712cd85fcd3..83ecc702f7146 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -17,7 +17,7 @@ KBUILD_CFLAGS += -fPIC LDFLAGS_vmlinux := $(call ld-option,-no-pie) extra_tools := relocs aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 4a9bce32586d3..69d75072888d1 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -52,7 +52,7 @@ targets += cpustr.h # --------------------------------------------------------------------------- KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 680ad803cba7d..e73ef522496e1 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -49,7 +49,7 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h # that the compiler finds it even with out-of-tree builds (make O=/some/path). CFLAGS_sev-handle-vc.o += -I$(objtree)/arch/x86/lib/ -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info) diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile index a0fb39abc5c86..20bbe1af05acd 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile @@ -65,5 +65,5 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index d3ef0407401f6..ece4ae6dea97d 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -39,7 +39,7 @@ sed-y = -e ':a; s/\*(\([^)]*\)\.text\.unlikely/*(\1.literal.unlikely .{text}.unl -e 's/\.{text}/.text/g' quiet_cmd__cpp_lds_S = LDS $@ -cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ \ +cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa \ -DLINKER_SCRIPT $< | sed $(sed-y) >$@ $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 415f63105b481..d4edc3c0c4556 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -61,7 +61,7 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) # `-fdata-sections` flag from KBUILD_CFLAGS_KERNEL KBUILD_CFLAGS_KERNEL := $(filter-out -fdata-sections, $(KBUILD_CFLAGS_KERNEL)) -KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS := $(KBUILD_CFLAGS) lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \ file.o mem.o random.o randomalloc.o pci.o \ diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index 00e9b7ee1e012..4233143534465 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -57,7 +57,7 @@ $(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE $(call if_changed,m68kld_bin_o) quiet_cmd_m68kas_o_S = M68KAS $@ - cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< + cmd_m68kas_o_S = $(M68KCC) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< $(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE $(call if_changed_dep,m68kas_o_S) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6127feb970c65..0b7c1e273f0cb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -465,7 +465,7 @@ targets += $(lib-y) $(always-y) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \ - -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< + -DLINKER_SCRIPT -o $@ $< $(obj)/%.lds: $(src)/%.lds.S FORCE $(call if_changed_dep,cpp_lds_S) diff --git a/scripts/gfp-translate b/scripts/gfp-translate index 8385ae0d5af93..f6353795fdca3 100755 --- a/scripts/gfp-translate +++ b/scripts/gfp-translate @@ -73,7 +73,7 @@ echo Parsing: $GFPMASK #include // Try to fool compiler.h into not including extra stuff -#define __ASSEMBLY__ 1 +#define __ASSEMBLER__ 1 #include #include diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 2f1d1767ca267..9c15e748761c4 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -36,7 +36,6 @@ sed -E -e ' s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @ - s/__ASSEMBLY__/__ASSEMBLER__/g ' $INFILE > $TMPFILE || exit 1 scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE diff --git a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py index 93787a1cd1566..8d9ae35764040 100644 --- a/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py +++ b/scripts/sbom/tests/cmd_graph/test_savedcmd_parser.py @@ -152,7 +152,7 @@ class TestSavedCmdParser(unittest.TestCase): self._assert_parsing(cmd, expected) def test_clang(self): - cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -D__ASSEMBLY__ -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S""" + cmd = """clang -Wp,-MMD,arch/x86/entry/.entry_64_compat.o.d -nostdinc -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/compiler-version.h -include ../include/linux/kconfig.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument -fmacro-prefix-map=../= -Werror -fno-PIE -m64 -I../arch/x86/entry -Iarch/x86/entry -DKBUILD_MODFILE='"arch/x86/entry/entry_64_compat"' -DKBUILD_MODNAME='"entry_64_compat"' -D__KBUILD_MODNAME=kmod_entry_64_compat -c -o arch/x86/entry/entry_64_compat.o ../arch/x86/entry/entry_64_compat.S""" expected = "../arch/x86/entry/entry_64_compat.S" self._assert_parsing(cmd, expected) diff --git a/tools/testing/selftests/kvm/lib/riscv/handlers.S b/tools/testing/selftests/kvm/lib/riscv/handlers.S index b787b982e922a..c8cc2d695f483 100644 --- a/tools/testing/selftests/kvm/lib/riscv/handlers.S +++ b/tools/testing/selftests/kvm/lib/riscv/handlers.S @@ -3,10 +3,6 @@ * Copyright (c) 2023 Intel Corporation */ -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ -#endif - #include .macro save_context diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testing/selftests/vDSO/vgetrandom-chacha.S index 16f985b089d45..42839c5cf5ec4 100644 --- a/tools/testing/selftests/vDSO/vgetrandom-chacha.S +++ b/tools/testing/selftests/vDSO/vgetrandom-chacha.S @@ -3,8 +3,6 @@ * Copyright (C) 2024 Jason A. Donenfeld . All Rights Reserved. */ -#define __ASSEMBLY__ - #if defined(__aarch64__) #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" #elif defined(__loongarch__) -- 2.56.0 -- kvm-riscv mailing list kvm-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kvm-riscv