linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi: x86: make "efi facility" use slightly more generic
@ 2014-01-14 17:41 Leif Lindholm
       [not found] ` <1389721285-32390-1-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Leif Lindholm @ 2014-01-14 17:41 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA
  Cc: patches-QSEj5FYQhm4dnm+yROfE0A, Leif Lindholm

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-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 arch/x86/Kconfig             |    1 +
 drivers/firmware/efi/Kconfig |    3 +++
 include/linux/efi.h          |    2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

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)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-15 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 17:41 [PATCH] efi: x86: make "efi facility" use slightly more generic Leif Lindholm
     [not found] ` <1389721285-32390-1-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-15 14:22   ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).