From: Leif Lindholm <leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
Leif Lindholm
<leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH] efi: x86: make "efi facility" use slightly more generic
Date: Tue, 14 Jan 2014 17:41:25 +0000 [thread overview]
Message-ID: <1389721285-32390-1-git-send-email-leif.lindholm@linaro.org> (raw)
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
next reply other threads:[~2014-01-14 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 17:41 Leif Lindholm [this message]
[not found] ` <1389721285-32390-1-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-15 14:22 ` [PATCH] efi: x86: make "efi facility" use slightly more generic Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389721285-32390-1-git-send-email-leif.lindholm@linaro.org \
--to=leif.lindholm-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).