From: Greg Kroah-Hartman Date: Tue, 1 Oct 2013 21:02:08 +0000 (-0700) Subject: 3.11-stable patches X-Git-Tag: v3.0.99~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa550e9c4b87b654a7a89d4c33cc912c4cf7286b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.11-stable patches added patches: kernel-reboot.c-re-enable-the-function-of-variable-reboot_default.patch tools-lib-lk-uninclude-linux-magic.h-in-debugfs.c.patch x86-efi-don-t-map-boot-services-on-i386.patch x86-reboot-add-quirk-to-make-dell-c6100-use-reboot-pci-automatically.patch --- diff --git a/queue-3.11/kernel-reboot.c-re-enable-the-function-of-variable-reboot_default.patch b/queue-3.11/kernel-reboot.c-re-enable-the-function-of-variable-reboot_default.patch new file mode 100644 index 00000000000..7b5ca26842f --- /dev/null +++ b/queue-3.11/kernel-reboot.c-re-enable-the-function-of-variable-reboot_default.patch @@ -0,0 +1,46 @@ +From e2f0b88e84eed9cf9797f0a88c8012ee0b885a6d Mon Sep 17 00:00:00 2001 +From: Chuansheng Liu +Date: Tue, 24 Sep 2013 15:27:43 -0700 +Subject: kernel/reboot.c: re-enable the function of variable reboot_default + +From: Chuansheng Liu + +commit e2f0b88e84eed9cf9797f0a88c8012ee0b885a6d upstream. + +Commit 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic +kernel") did some cleanup for reboot= command line, but it made the +reboot_default inoperative. + +The default value of variable reboot_default should be 1, and if command +line reboot= is not set, system will use the default reboot mode. + +[akpm@linux-foundation.org: fix comment layout] +Signed-off-by: Li Fei +Signed-off-by: liu chuansheng +Acked-by: Robin Holt +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/reboot.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/kernel/reboot.c ++++ b/kernel/reboot.c +@@ -32,7 +32,14 @@ EXPORT_SYMBOL(cad_pid); + #endif + enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE; + +-int reboot_default; ++/* ++ * This variable is used privately to keep track of whether or not ++ * reboot_type is still set to its default value (i.e., reboot= hasn't ++ * been set on the command line). This is needed so that we can ++ * suppress DMI scanning for reboot quirks. Without it, it's ++ * impossible to override a faulty reboot quirk without recompiling. ++ */ ++int reboot_default = 1; + int reboot_cpu; + enum reboot_type reboot_type = BOOT_ACPI; + int reboot_force; diff --git a/queue-3.11/series b/queue-3.11/series index cccbe3e0b2d..8f3b0ee67eb 100644 --- a/queue-3.11/series +++ b/queue-3.11/series @@ -9,3 +9,7 @@ bcache-fix-a-dumb-cpu-spinning-bug-in-writeback.patch bcache-fix-a-shrinker-deadlock.patch bcache-fix-for-handling-overlapping-extents-when-reading-in-a-btree-node.patch bcache-fix-flushes-in-writeback-mode.patch +kernel-reboot.c-re-enable-the-function-of-variable-reboot_default.patch +x86-reboot-add-quirk-to-make-dell-c6100-use-reboot-pci-automatically.patch +tools-lib-lk-uninclude-linux-magic.h-in-debugfs.c.patch +x86-efi-don-t-map-boot-services-on-i386.patch diff --git a/queue-3.11/tools-lib-lk-uninclude-linux-magic.h-in-debugfs.c.patch b/queue-3.11/tools-lib-lk-uninclude-linux-magic.h-in-debugfs.c.patch new file mode 100644 index 00000000000..cd411f78391 --- /dev/null +++ b/queue-3.11/tools-lib-lk-uninclude-linux-magic.h-in-debugfs.c.patch @@ -0,0 +1,55 @@ +From ce7eebe5c3deef8e19c177c24ee75843256e69ca Mon Sep 17 00:00:00 2001 +From: Vinson Lee +Date: Wed, 18 Sep 2013 16:16:40 -0700 +Subject: tools lib lk: Uninclude linux/magic.h in debugfs.c + +From: Vinson Lee + +commit ce7eebe5c3deef8e19c177c24ee75843256e69ca upstream. + +The compilation only looks for linux/magic.h from the default include +paths, which does not include the source tree. This results in a build +error if linux/magic.h is not available or not installed. + +For example, this build error occurs on CentOS 5. + +$ make -C tools/lib/lk V=1 +[...] +gcc -o debugfs.o -c -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 +-D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement +-Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations +-Wmissing-prototypes -Wnested-externs -Wno-system-headers +-Wold-style-definition -Wpacked -Wredundant-decls -Wshadow +-Wstrict-aliasing=3 -Wstrict-prototypes -Wswitch-default -Wswitch-enum +-Wundef -Wwrite-strings -Wformat -fPIC -D_LARGEFILE64_SOURCE +-D_FILE_OFFSET_BITS=64 debugfs.c +debugfs.c:8:25: error: linux/magic.h: No such file or directory + +The only symbol from linux/magic.h needed by debugfs.c is DEBUGFS_MAGIC, +and that is already defined in debugfs.h. linux/magic.h isn't providing +any extra symbols and can unincluded. This is similar to the approach by +perf, which has its own magic.h wrapper at +tools/perf/util/include/linux/magic.h + +Signed-off-by: Vinson Lee +Acked-by: Borislav Petkov +Cc: Borislav Petkov +Cc: Vinson Lee +Link: http://lkml.kernel.org/r/1379546200-17028-1-git-send-email-vlee@freedesktop.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman + +--- + tools/lib/lk/debugfs.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/tools/lib/lk/debugfs.c ++++ b/tools/lib/lk/debugfs.c +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include + + #include "debugfs.h" diff --git a/queue-3.11/x86-efi-don-t-map-boot-services-on-i386.patch b/queue-3.11/x86-efi-don-t-map-boot-services-on-i386.patch new file mode 100644 index 00000000000..4f45a30804c --- /dev/null +++ b/queue-3.11/x86-efi-don-t-map-boot-services-on-i386.patch @@ -0,0 +1,88 @@ +From 700870119f49084da004ab588ea2b799689efaf7 Mon Sep 17 00:00:00 2001 +From: Josh Boyer +Date: Thu, 18 Apr 2013 07:51:34 -0700 +Subject: x86, efi: Don't map Boot Services on i386 + +From: Josh Boyer + +commit 700870119f49084da004ab588ea2b799689efaf7 upstream. + +Add patch to fix 32bit EFI service mapping (rhbz 726701) + +Multiple people are reporting hitting the following WARNING on i386, + + WARNING: at arch/x86/mm/ioremap.c:102 __ioremap_caller+0x3d3/0x440() + Modules linked in: + Pid: 0, comm: swapper Not tainted 3.9.0-rc7+ #95 + Call Trace: + [] warn_slowpath_common+0x5f/0x80 + [] ? __ioremap_caller+0x3d3/0x440 + [] ? __ioremap_caller+0x3d3/0x440 + [] warn_slowpath_null+0x1d/0x20 + [] __ioremap_caller+0x3d3/0x440 + [] ? get_usage_chars+0xfb/0x110 + [] ? vprintk_emit+0x147/0x480 + [] ? efi_enter_virtual_mode+0x1e4/0x3de + [] ioremap_cache+0x1a/0x20 + [] ? efi_enter_virtual_mode+0x1e4/0x3de + [] efi_enter_virtual_mode+0x1e4/0x3de + [] start_kernel+0x286/0x2f4 + [] ? repair_env_string+0x51/0x51 + [] i386_start_kernel+0x12c/0x12f + +Due to the workaround described in commit 916f676f8 ("x86, efi: Retain +boot service code until after switching to virtual mode") EFI Boot +Service regions are mapped for a period during boot. Unfortunately, with +the limited size of the i386 direct kernel map it's possible that some +of the Boot Service regions will not be directly accessible, which +causes them to be ioremap()'d, triggering the above warning as the +regions are marked as E820_RAM in the e820 memmap. + +There are currently only two situations where we need to map EFI Boot +Service regions, + + 1. To workaround the firmware bug described in 916f676f8 + 2. To access the ACPI BGRT image + +but since we haven't seen an i386 implementation that requires either, +this simple fix should suffice for now. + +[ Added to changelog - Matt ] + +Reported-by: Bryan O'Donoghue +Acked-by: Tom Zanussi +Acked-by: Darren Hart +Cc: Josh Triplett +Cc: Matthew Garrett +Cc: H. Peter Anvin +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: Greg Kroah-Hartman +Signed-off-by: Josh Boyer +Signed-off-by: Matt Fleming +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/platform/efi/efi.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/arch/x86/platform/efi/efi.c ++++ b/arch/x86/platform/efi/efi.c +@@ -912,10 +912,13 @@ void __init efi_enter_virtual_mode(void) + + for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { + md = p; +- if (!(md->attribute & EFI_MEMORY_RUNTIME) && +- md->type != EFI_BOOT_SERVICES_CODE && +- md->type != EFI_BOOT_SERVICES_DATA) +- continue; ++ if (!(md->attribute & EFI_MEMORY_RUNTIME)) { ++#ifdef CONFIG_X86_64 ++ if (md->type != EFI_BOOT_SERVICES_CODE && ++ md->type != EFI_BOOT_SERVICES_DATA) ++#endif ++ continue; ++ } + + size = md->num_pages << EFI_PAGE_SHIFT; + end = md->phys_addr + size; diff --git a/queue-3.11/x86-reboot-add-quirk-to-make-dell-c6100-use-reboot-pci-automatically.patch b/queue-3.11/x86-reboot-add-quirk-to-make-dell-c6100-use-reboot-pci-automatically.patch new file mode 100644 index 00000000000..77595a62e5f --- /dev/null +++ b/queue-3.11/x86-reboot-add-quirk-to-make-dell-c6100-use-reboot-pci-automatically.patch @@ -0,0 +1,49 @@ +From 4f0acd31c31f03ba42494c8baf6c0465150e2621 Mon Sep 17 00:00:00 2001 +From: Masoud Sharbiani +Date: Fri, 20 Sep 2013 15:59:07 -0700 +Subject: x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically + +From: Masoud Sharbiani + +commit 4f0acd31c31f03ba42494c8baf6c0465150e2621 upstream. + +Dell PowerEdge C6100 machines fail to completely reboot about 20% of the time. + +Signed-off-by: Masoud Sharbiani +Signed-off-by: Vinson Lee +Cc: Robin Holt +Cc: Russell King +Cc: Guan Xuetao +Link: http://lkml.kernel.org/r/1379717947-18042-1-git-send-email-vlee@freedesktop.org +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/reboot.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/arch/x86/kernel/reboot.c ++++ b/arch/x86/kernel/reboot.c +@@ -358,6 +358,22 @@ static struct dmi_system_id __initdata r + DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), + }, + }, ++ { /* Handle problems with rebooting on the Dell PowerEdge C6100. */ ++ .callback = set_pci_reboot, ++ .ident = "Dell PowerEdge C6100", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), ++ }, ++ }, ++ { /* Some C6100 machines were shipped with vendor being 'Dell'. */ ++ .callback = set_pci_reboot, ++ .ident = "Dell PowerEdge C6100", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), ++ }, ++ }, + { } + }; +