@@ -1582,6 +1582,7 @@ config EFI
bool "EFI runtime service support"
depends on ACPI
select UCS2_STRING
+ select ARCH_USES_EFI_FACILITY
---help---
This enables the kernel to use EFI runtime services that are
available (such as the EFI variable services).
@@ -40,3 +40,6 @@ endmenu
config UEFI_CPER
bool
+
+config ARCH_USES_EFI_FACILITY
+ bool
@@ -655,7 +655,7 @@ extern int __init efi_setup_pcdp_console(char *);
#define EFI_64BIT 5 /* Is the firmware 64-bit? */
#ifdef CONFIG_EFI
-# ifdef CONFIG_X86
+# ifdef CONFIG_ARCH_USES_EFI_FACILITY
extern int efi_enabled(int facility);
# else
static inline int efi_enabled(int facility)
Currently, efi_enabled() is defined to be a dummy macro always returning 1 unless CONFIG_X86. Change this logic to use a CONFIG_ARCH_USES_EFI_FACILITY to enable use by other architectures. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> --- arch/x86/Kconfig | 1 + drivers/firmware/efi/Kconfig | 3 +++ include/linux/efi.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)