From 4f2d1bbc2c92a32fd612e6c3b51832d5c1c3678e Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 1 Apr 2025 15:34:20 +0200 Subject: [PATCH] x86/boot: Move the EFI mixed mode startup code back under arch/x86, into startup/ Linus expressed a strong preference for arch-specific asm code (i.e., virtually all of it) to reside under arch/ rather than anywhere else. So move the EFI mixed mode startup code back, and put it under arch/x86/boot/startup/ where all shared x86 startup code is going to live. Suggested-by: Linus Torvalds Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: David Woodhouse Cc: H. Peter Anvin Cc: Kees Cook Link: https://lore.kernel.org/r/20250401133416.1436741-11-ardb+git@google.com --- arch/x86/boot/startup/Makefile | 3 +++ .../libstub/x86-mixed.S => arch/x86/boot/startup/efi-mixed.S | 0 drivers/firmware/efi/libstub/Makefile | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) rename drivers/firmware/efi/libstub/x86-mixed.S => arch/x86/boot/startup/efi-mixed.S (100%) diff --git a/arch/x86/boot/startup/Makefile b/arch/x86/boot/startup/Makefile index 03519ef4869d3..73946a3f6b3ba 100644 --- a/arch/x86/boot/startup/Makefile +++ b/arch/x86/boot/startup/Makefile @@ -1,3 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +KBUILD_AFLAGS += -D__DISABLE_EXPORTS + lib-$(CONFIG_X86_64) += la57toggle.o +lib-$(CONFIG_EFI_MIXED) += efi-mixed.o diff --git a/drivers/firmware/efi/libstub/x86-mixed.S b/arch/x86/boot/startup/efi-mixed.S similarity index 100% rename from drivers/firmware/efi/libstub/x86-mixed.S rename to arch/x86/boot/startup/efi-mixed.S diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index d23a1b9fed75c..2f173391b63d2 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -85,7 +85,6 @@ lib-$(CONFIG_EFI_GENERIC_STUB) += efi-stub.o string.o intrinsics.o systable.o \ lib-$(CONFIG_ARM) += arm32-stub.o lib-$(CONFIG_ARM64) += kaslr.o arm64.o arm64-stub.o smbios.o lib-$(CONFIG_X86) += x86-stub.o smbios.o -lib-$(CONFIG_EFI_MIXED) += x86-mixed.o lib-$(CONFIG_X86_64) += x86-5lvl.o lib-$(CONFIG_RISCV) += kaslr.o riscv.o riscv-stub.o lib-$(CONFIG_LOONGARCH) += loongarch.o loongarch-stub.o -- 2.47.2