From nobody Thu Dec 18 07:30:29 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 819C71FC7DD for ; Fri, 14 Mar 2025 07:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741936408; cv=none; b=HrMejaQOC0ibVGzjWcU4fHQnAPo+dzZV/DLAkHYypcFMY3/pq8CCT0Vd2CK1wggcImi28u4HDCvWVus/lee3PwJMTwSMGA8SJaeaNoyjrUJHOu2LDl6Rx9xfDnA1t6KSSIOMN5DRLI9qi5rKx3Wj8oecYbz+W7XYSNOwDHE/XbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741936408; c=relaxed/simple; bh=DID8ahspXvMdAsIMMLmbsgn7rcxSktB7ZURhISF3ch0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VxYr5e9DpRolKEo7ieKZMZinmPKT7XBeUDzgxBcInmcpCyu2w/RAMvnQnyBwRZl0enuSnx7lf/lX9c1vl02WZXB4D/VZtiIObZWHDZmFLx6J47HQmI/c9dTJ0NS7oy7CfjBSB3K5ai/aqOueBGJKk+6LSj1QCsR26RbBGUESM00= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OhNzJF8J; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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) header.d=redhat.com header.i=@redhat.com header.b="OhNzJF8J" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741936405; 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=Yt0IGn8657fgY46bIl1eIEnpinKG1Vnp6VXMqFsLyAY=; b=OhNzJF8JpkJ9yp3u4b8jUBI4rL8BEar5nTFVorg3D2jIQi9WgZxglxbJSImoxzkIT0L66E l0OBWYwssUNlZk5BMOPdUUwAl0J/QTtMtFpQjdWZ+Vjm/xKmgaf4BSTco3Z7cfN8XCCie/ 7kSNaBDUletRh3yFlCTbkwKqfIFoWHY= Received: from mx-prod-mc-06.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-605-0CRuZXtUPCSuciMMgF00qg-1; Fri, 14 Mar 2025 03:13:23 -0400 X-MC-Unique: 0CRuZXtUPCSuciMMgF00qg-1 X-Mimecast-MFC-AGG-ID: 0CRuZXtUPCSuciMMgF00qg_1741936403 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F0F11180025A; Fri, 14 Mar 2025 07:13:22 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.82]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3B89D18001D4; Fri, 14 Mar 2025 07:13:20 +0000 (UTC) From: Thomas Huth To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , linux-arch@vger.kernel.org, Thomas Huth Subject: [PATCH 41/41] treewide: Stop defining __ASSEMBLY__ for assembler files Date: Fri, 14 Mar 2025 08:10:12 +0100 Message-ID: <20250314071013.1575167-42-thuth@redhat.com> In-Reply-To: <20250314071013.1575167-1-thuth@redhat.com> References: <20250314071013.1575167-1-thuth@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" 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__ now anymore. Signed-off-by: Thomas Huth --- 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/net/wan/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/gfp-translate | 2 +- tools/testing/selftests/kvm/lib/riscv/handlers.S | 4 ---- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 -- 17 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 1d6a9ec8a2ace..b95210e975836 100644 --- a/Makefile +++ b/Makefile @@ -573,7 +573,7 @@ LINUXINCLUDE :=3D \ -I$(objtree)/include \ $(USERINCLUDE) =20 -KBUILD_AFLAGS :=3D -D__ASSEMBLY__ -fno-PIE +KBUILD_AFLAGS :=3D -fno-PIE =20 KBUILD_CFLAGS :=3D KBUILD_CFLAGS +=3D -std=3Dgnu11 diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/M= akefile index 25a2cb6317f35..a10a6a7eb9fed 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -93,7 +93,6 @@ VDSO_CFLAGS +=3D -marm endif =20 VDSO_AFLAGS :=3D $(VDSO_CAFLAGS) -VDSO_AFLAGS +=3D -D__ASSEMBLY__ =20 # From arm vDSO Makefile VDSO_LDFLAGS +=3D -Bsymbolic --no-undefined -soname=3Dlinux-vdso.so.1 diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile index fdde1bcd4e266..00ce65ef6150b 100644 --- a/arch/loongarch/vdso/Makefile +++ b/arch/loongarch/vdso/Makefile @@ -24,7 +24,7 @@ cflags-vdso :=3D $(ccflags-vdso) \ $(call cc-option, -fno-asynchronous-unwind-tables) \ $(call cc-option, -fno-stack-protector) aflags-vdso :=3D $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 =20 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o +=3D -include $(c-gettimeofday-y) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed= /Makefile index e0b8ec9a95162..41ec115d4795b 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -30,7 +30,7 @@ endif KBUILD_CFLAGS :=3D $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ -DBOOT_HEAP_SIZE=3D$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=3D$(VMLI= NUX_LOAD_ADDRESS)ull" =20 -KBUILD_AFLAGS :=3D $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ +KBUILD_AFLAGS :=3D $(KBUILD_AFLAGS) \ -DBOOT_HEAP_SIZE=3D$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=3D$(VMLINUX_ENTRY_ADDRESS) =20 diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index b289b2c1b2946..edff6c01506f1 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -32,7 +32,7 @@ cflags-vdso :=3D $(ccflags-vdso) \ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \ $(call cc-option, -fno-asynchronous-unwind-tables) aflags-vdso :=3D $(ccflags-vdso) \ - -D__ASSEMBLY__ -Wa,-gdwarf-2 + -Wa,-gdwarf-2 =20 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o =3D -include $(c-gettimeofday-y) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 1ff6ad4f6cd27..5cecf0ca22599 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -79,7 +79,7 @@ BOOTCFLAGS :=3D $(BOOTTARGETFLAGS) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=3Dno) \ -fomit-frame-pointer -fno-builtin -fPIC =20 -BOOTAFLAGS :=3D $(BOOTTARGETFLAGS) -D__ASSEMBLY__ +BOOTAFLAGS :=3D $(BOOTTARGETFLAGS) =20 BOOTARFLAGS :=3D -crD =20 diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/plat= forms/cell/spufs/Makefile index 52e4c80ec8d03..c13928aea20c6 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile @@ -16,7 +16,7 @@ SPU_AS :=3D $(SPU_CROSS)gcc SPU_LD :=3D $(SPU_CROSS)ld SPU_OBJCOPY :=3D $(SPU_CROSS)objcopy SPU_CFLAGS :=3D -O2 -Wall -I$(srctree)/include -D__KERNEL__ -SPU_AFLAGS :=3D -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__ +SPU_AFLAGS :=3D -c -I$(srctree)/include -D__KERNEL__ SPU_LDFLAGS :=3D -N -Ttext=3D0x0 =20 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 5fae311203c26..f024e39bfc13f 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -18,7 +18,7 @@ KBUILD_CFLAGS +=3D -fPIC LDFLAGS_vmlinux :=3D -no-pie --emit-relocs --discard-none extra_tools :=3D relocs aflags_dwarf :=3D -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR :=3D $(CLANG_FLAGS) -m64 ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR +=3D $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 9cc0ff6e9067d..350d9c176c468 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -53,7 +53,7 @@ targets +=3D cpustr.h # ------------------------------------------------------------------------= --- =20 KBUILD_CFLAGS :=3D $(REALMODE_CFLAGS) -D_SETUP -KBUILD_AFLAGS :=3D $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS :=3D $(KBUILD_CFLAGS) KBUILD_CFLAGS +=3D $(call cc-option,-fmacro-prefix-map=3D$(srctree)/=3D) KBUILD_CFLAGS +=3D -fno-asynchronous-unwind-tables KBUILD_CFLAGS +=3D $(CONFIG_CC_IMPLICIT_FALLTHROUGH) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/M= akefile index 606c74f274593..7816033203207 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -50,7 +50,7 @@ KBUILD_CFLAGS +=3D -include $(srctree)/include/linux/hidd= en.h # that the compiler finds it even with out-of-tree builds (make O=3D/some/= path). CFLAGS_sev.o +=3D -I$(objtree)/arch/x86/lib/ =20 -KBUILD_AFLAGS :=3D $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS :=3D $(KBUILD_CFLAGS) =20 KBUILD_LDFLAGS :=3D -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS +=3D $(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 =20 KBUILD_CFLAGS :=3D $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ -I$(srctree)/arch/x86/boot -KBUILD_AFLAGS :=3D $(KBUILD_CFLAGS) -D__ASSEMBLY__ +KBUILD_AFLAGS :=3D $(KBUILD_CFLAGS) KBUILD_CFLAGS +=3D -fno-asynchronous-unwind-tables diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index f28b8e3d717ee..b0ba47cdce5e3 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -39,7 +39,7 @@ sed-y =3D -e ':a; s/\*(\([^)]*\)\.text\.unlikely/*(\1.lit= eral.unlikely .{text}.unl -e 's/\.{text}/.text/g' =20 quiet_cmd__cpp_lds_S =3D LDS $@ -cmd__cpp_lds_S =3D $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ \ +cmd__cpp_lds_S =3D $(CPP) $(cpp_flags) -P -C -Uxtensa \ -DLINKER_SCRIPT $< | sed $(sed-y) >$@ =20 $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 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) =20 quiet_cmd_m68kas_o_S =3D M68KAS $@ - cmd_m68kas_o_S =3D $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(s= rctree)/include/uapi -c -o $@ $< + cmd_m68kas_o_S =3D $(M68KCC) -Wp,-MD,$(depfile) -I$(srctree)/include= /uapi -c -o $@ $< =20 $(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 993708d118745..89f8606a7dea0 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -346,7 +346,7 @@ targets +=3D $(lib-y) $(always-y) # ------------------------------------------------------------------------= --- quiet_cmd_cpp_lds_S =3D LDS $@ cmd_cpp_lds_S =3D $(CPP) $(cpp_flags) -P -U$(ARCH) \ - -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< + -DLINKER_SCRIPT -o $@ $< =20 $(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 =20 // Try to fool compiler.h into not including extra stuff -#define __ASSEMBLY__ 1 +#define __ASSEMBLER__ 1 =20 #include #include diff --git a/tools/testing/selftests/kvm/lib/riscv/handlers.S b/tools/testi= ng/selftests/kvm/lib/riscv/handlers.S index aa0abd3f35bb0..f6d43979032df 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 */ =20 -#ifndef __ASSEMBLY__ -#define __ASSEMBLY__ -#endif - #include =20 .macro save_context diff --git a/tools/testing/selftests/vDSO/vgetrandom-chacha.S b/tools/testi= ng/selftests/vDSO/vgetrandom-chacha.S index d6e09af7c0a92..fffe3c700bba9 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 Res= erved. */ =20 -#define __ASSEMBLY__ - #if defined(__aarch64__) #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" #elif defined(__loongarch__) --=20 2.48.1