From a6291ddc6751fd36e37d3fcec2db4a8ae0477147 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 24 Dec 2014 16:54:34 +0000 Subject: [PATCH] [arm64] Enable pstore, efi-pstore, etc. (Closes: #773309) Enable PSTORE as built-in and EFI_VARS_PSTORE as module. Auto-load efivars and efi-pstore: - Replace features/all/efi-autoload-efivars.patch with the version that was committed upstream, which is not x86-specific. - Add a separate patch to make efi-pstore auto-load, as this was not included in the upstream commit. svn path=/dists/sid/linux/; revision=22227 --- debian/changelog | 2 + debian/config/arm64/config | 5 ++ .../all/efi-autoload-efi-pstore.patch | 16 +++++ .../features/all/efi-autoload-efivars.patch | 59 ++++++++++--------- debian/patches/series | 1 + 5 files changed, 56 insertions(+), 27 deletions(-) create mode 100644 debian/patches/features/all/efi-autoload-efi-pstore.patch diff --git a/debian/changelog b/debian/changelog index 204f7267d..c5d2be6ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) * iov: Revert unwanted ABI 'fix' in 3.16.7-ckt2-1 * Ignore ABI changes in mm, of functions not really used by modules + * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; + ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/arm64/config b/debian/config/arm64/config index 9eb461960..b49853933 100644 --- a/debian/config/arm64/config +++ b/debian/config/arm64/config @@ -126,3 +126,8 @@ CONFIG_USB_OHCI_HCD_PLATFORM=m ## CONFIG_VIRTIO_MMIO=m +## +## file: fs/pstore/Kconfig +## +CONFIG_PSTORE=y + diff --git a/debian/patches/features/all/efi-autoload-efi-pstore.patch b/debian/patches/features/all/efi-autoload-efi-pstore.patch new file mode 100644 index 000000000..27672c9e0 --- /dev/null +++ b/debian/patches/features/all/efi-autoload-efi-pstore.patch @@ -0,0 +1,16 @@ +From: Ben Hutchings +Subject: x86/efi: Autoload efi-pstore +Date: Wed, 24 Dec 2014 17:44:06 +0100 +Bug-Debian: https://bugs.debian.org/703363 +Bug-Debian: https://bugs.debian.org/773309 +Forwarded: no + +efi-pstore should be auto-loaded on EFI systems, same as efivars. + +--- a/drivers/firmware/efi/efi-pstore.c ++++ b/drivers/firmware/efi/efi-pstore.c +@@ -400,3 +400,4 @@ module_exit(efivars_pstore_exit); + + MODULE_DESCRIPTION("EFI variable backend for pstore"); + MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:efivars"); diff --git a/debian/patches/features/all/efi-autoload-efivars.patch b/debian/patches/features/all/efi-autoload-efivars.patch index 758605e78..8892af1c2 100644 --- a/debian/patches/features/all/efi-autoload-efivars.patch +++ b/debian/patches/features/all/efi-autoload-efivars.patch @@ -1,32 +1,44 @@ -From: Ben Hutchings -Subject: x86/efi: Autoload efivars -Date: Mon, 18 Mar 2013 22:59:14 +0000 +From: "Lee, Chun-Yi" +Date: Wed, 9 Jul 2014 18:39:29 +0800 +Subject: efi: Autoload efivars Bug-Debian: https://bugs.debian.org/703363 -Forwarded: no +Origin: https://git.kernel.org/linus/28d54022e6ff9c16bf4dacb5f64a97443a38caa9 + +The original patch is from Ben Hutchings's contribution to debian +kernel. Got Ben's permission to remove the code of efi-pstore.c and +send to linux-efi: +https://github.com/BlankOn/linux-debian/blob/master/debian/patches/features/all/efi-autoload-efivars.patch efivars is generally useful to have on EFI systems, and in some cases it may be impossible to load it after a kernel upgrade in order to -complete a boot loader update. efi-pstore is similarly useful though -less critical. At the same time we don't want to waste memory on -non-EFI systems by making them built-in. +complete a boot loader update. At the same time we don't want to waste +memory on non-EFI systems by making them built-in. Instead, give them module aliases as if they are platform drivers, and register a corresponding platform device whenever EFI runtime services are available. This should trigger udev to load them. +Signed-off-by: Lee, Chun-Yi +Cc: Ben Hutchings +Tested-by: Ard Biesheuvel +Signed-off-by: Matt Fleming --- ---- a/arch/x86/platform/efi/efi.c -+++ b/arch/x86/platform/efi/efi.c -@@ -42,6 +42,7 @@ + drivers/firmware/efi/efi.c | 15 +++++++++++++++ + drivers/firmware/efi/efivars.c | 1 + + 2 files changed, 16 insertions(+) + +--- a/drivers/firmware/efi/efi.c ++++ b/drivers/firmware/efi/efi.c +@@ -23,6 +23,7 @@ + #include + #include #include - #include - #include +#include - #include - #include -@@ -783,6 +784,20 @@ void __init efi_late_init(void) - efi_bgrt_init(); + struct efi __read_mostly efi = { + .mps = EFI_INVALID_TABLE_ADDR, +@@ -321,6 +322,20 @@ int __init efi_config_init(efi_config_ta + return 0; } +#ifdef CONFIG_EFI_VARS_MODULE @@ -43,12 +55,12 @@ are available. This should trigger udev to load them. +device_initcall(efi_load_efivars); +#endif + - void __init efi_set_executable(efi_memory_desc_t *md, bool executable) - { - u64 addr, npages; + #ifdef CONFIG_EFI_PARAMS_FROM_FDT + + #define UEFI_PARAM(name, prop, field) \ --- a/drivers/firmware/efi/efivars.c +++ b/drivers/firmware/efi/efivars.c -@@ -77,6 +77,7 @@ MODULE_AUTHOR("Matt Domsch