[PATCH 3/3] LoongArch: Always select EFI

From: Guenter Roeck
Date: Fri Jul 01 2022 - 10:50:04 EST


Building loongarch:allnoconfig or loongarch:tinyconfig fails with the
following error.

loongarch64-linux-gnu-ld: arch/loongarch/kernel/env.o: in function `init_environ':
env.c:(.init.text+0xe4): undefined reference to `efi'
loongarch64-linux-gnu-ld: env.c:(.init.text+0xe8): undefined reference to `efi'
loongarch64-linux-gnu-ld: env.c:(.init.text+0xe8): undefined reference to `efi'
loongarch64-linux-gnu-ld: env.c:(.init.text+0x108): undefined reference to `efi_get_fdt_params'
loongarch64-linux-gnu-ld: env.c:(.init.text+0x11c): undefined reference to `efi_memmap_init_early'
loongarch64-linux-gnu-ld: arch/loongarch/kernel/setup.o: in function `platform_init':
setup.c:(.init.text+0x228): undefined reference to `efi_init'
loongarch64-linux-gnu-ld: setup.c:(.init.text+0x250): undefined reference to `efi_runtime_init'
loongarch64-linux-gnu-ld: arch/loongarch/kernel/mem.o: in function `memblock_init':
mem.c:(.init.text+0x24): undefined reference to `efi'
loongarch64-linux-gnu-ld: mem.c:(.init.text+0x28): undefined reference to `efi'
loongarch64-linux-gnu-ld: mem.c:(.init.text+0x28): undefined reference to `efi'

Since it is mandatory, auto-select EFI support to fix the error. Drop the
EFI Kconfig help message since it is not needed.

Fixes: fa96b57c1490 ("LoongArch: Add build infrastructure")
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
arch/loongarch/Kconfig | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 1920d52653b4..4ed8d0916be7 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -50,6 +50,7 @@ config LOONGARCH
select ARCH_WANTS_NO_INSTR
select BUILDTIME_TABLE_SORT
select COMMON_CLK
+ select EFI
select GENERIC_CLOCKEVENTS
select GENERIC_CMOS_UPDATE
select GENERIC_CPU_AUTOPROBE
@@ -296,13 +297,10 @@ config DMI
DMI to identify machine quirks.

config EFI
- bool "EFI runtime service support"
+ bool
select UCS2_STRING
select EFI_PARAMS_FROM_FDT
select EFI_RUNTIME_WRAPPERS
- help
- This enables the kernel to use EFI runtime services that are
- available (such as the EFI variable services).

config SMP
bool "Multi-Processing support"
--
2.35.1