[x86] efi: Fix ABI change for introduction of efi_enabled() function in 3.2.38 (Closes: #701690)
svn path=/dists/sid/linux/; revision=19864
This commit is contained in:
parent
691ede6006
commit
7cdeea9fb4
|
@ -8,6 +8,8 @@ linux (3.2.39-2) UNRELEASED; urgency=high
|
|||
- printk: Fix rq->lock vs logbuf_lock unlock lock inversion
|
||||
- wait-simple: Simple waitqueue implementation
|
||||
- rcutiny: Use simple waitqueue
|
||||
* [x86] efi: Fix ABI change for introduction of efi_enabled() function
|
||||
in 3.2.38 (Closes: #701690)
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Tue, 26 Feb 2013 02:19:28 +0000
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ ignore-changes:
|
|||
vring_*
|
||||
# No-one should depend on staging from OOT
|
||||
module:drivers/staging/*
|
||||
# Doesn't appear to be used OOT
|
||||
efi_enabled
|
||||
|
||||
[base]
|
||||
arches:
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Subject: [x86] efi: Avoid ABI change in 3.2.38
|
||||
Date: Tue, 26 Feb 2013 13:56:01 +0000
|
||||
Bug-Debian: http://bugs.debian.org/701690
|
||||
|
||||
"efi: Make 'efi_enabled' a function to query EFI facilities" (commit
|
||||
83e68189745a upstream, backported into 3.2.38) obviously changes ABI,
|
||||
but I thought this symbol wasn't used out-of-tree. Unfortunately
|
||||
nvidia does use it, but its source is packaged up such that
|
||||
codesearch.debian.net didn't show me that.
|
||||
|
||||
Restore the efi_enabled variable. Rename the efi_enabled() function
|
||||
and make efi_enabled() a function-macro. This should keep both old
|
||||
and new usage working.
|
||||
|
||||
--- a/arch/x86/platform/efi/efi.c
|
||||
+++ b/arch/x86/platform/efi/efi.c
|
||||
@@ -49,6 +49,9 @@
|
||||
#define EFI_DEBUG 1
|
||||
#define PFX "EFI: "
|
||||
|
||||
+int efi_enabled;
|
||||
+EXPORT_SYMBOL(efi_enabled);
|
||||
+
|
||||
struct efi __read_mostly efi = {
|
||||
.mps = EFI_INVALID_TABLE_ADDR,
|
||||
.acpi = EFI_INVALID_TABLE_ADDR,
|
||||
@@ -77,11 +80,11 @@ unsigned long x86_efi_facility;
|
||||
/*
|
||||
* Returns 1 if 'facility' is enabled, 0 otherwise.
|
||||
*/
|
||||
-int efi_enabled(int facility)
|
||||
+int efi_enabled_facility(int facility)
|
||||
{
|
||||
return test_bit(facility, &x86_efi_facility) != 0;
|
||||
}
|
||||
-EXPORT_SYMBOL(efi_enabled);
|
||||
+EXPORT_SYMBOL(efi_enabled_facility);
|
||||
|
||||
static bool disable_runtime = false;
|
||||
static int __init setup_noefi(char *arg)
|
||||
@@ -576,6 +579,7 @@ void __init efi_init(void)
|
||||
efi.get_time = phys_efi_get_time;
|
||||
|
||||
set_bit(EFI_RUNTIME_SERVICES, &x86_efi_facility);
|
||||
+ efi_enabled = 1;
|
||||
} else
|
||||
printk(KERN_ERR "Could not map the EFI runtime service "
|
||||
"table!\n");
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -503,7 +503,9 @@ extern int __init efi_setup_pcdp_console
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
# ifdef CONFIG_X86
|
||||
-extern int efi_enabled(int facility);
|
||||
+extern int efi_enabled; /* ABI compat; please use efi_enabled() instead */
|
||||
+extern int efi_enabled_facility(int facility);
|
||||
+#define efi_enabled(f) efi_enabled_facility(f)
|
||||
# else
|
||||
static inline int efi_enabled(int facility)
|
||||
{
|
|
@ -628,3 +628,4 @@ bugfix/x86/efi-Clear-EFI_RUNTIME_SERVICES-rather-than-EFI_BOOT-.patch
|
|||
bugfix/x86/x86-efi-Make-noefi-really-disable-EFI-runtime-serivc.patch
|
||||
bugfix/all/mm-fix-pageblock-bitmap-allocation.patch
|
||||
bugfix/all/USB-usb-storage-unusual_devs-update-for-Super-TOP-SA.patch
|
||||
debian/x86-efi-avoid-abi-change-in-3.2.38.patch
|
||||
|
|
Loading…
Reference in New Issue