diff mbox

efi: x86: make "efi facility" use slightly more generic

Message ID 1389721285-32390-1-git-send-email-leif.lindholm@linaro.org
State New
Headers show

Commit Message

Leif Lindholm Jan. 14, 2014, 5:41 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 50e1eab..8c0520d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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).
diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 6aecbc8..1053c8f 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -40,3 +40,6 @@  endmenu
 
 config UEFI_CPER
 	bool
+
+config ARCH_USES_EFI_FACILITY
+	bool
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 11ce678..b74c8a5 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -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)