+ x86-acpi-fix-breakage-of-resume-on-64-bit-up-systems-with-smp-kernel.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     x86 acpi: fix breakage of resume on 64-bit UP systems with SMP kernel
has been added to the -mm tree.  Its filename is
     x86-acpi-fix-breakage-of-resume-on-64-bit-up-systems-with-smp-kernel.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: x86 acpi: fix breakage of resume on 64-bit UP systems with SMP kernel
From: Rafael J. Wysocki <rjw@xxxxxxx>

We are now using per CPU GDT tables in head_64.S and the original
early_gdt_descr.address is invalidated after boot by
setup_per_cpu_areas().  This breaks resume from suspend to RAM on x86_64
UP systems using SMP kernels, because this part of head_64.S is also
executed during the resume and the invalid GDT address causes the system
to crash.  It doesn't break on 'true' SMP systems, because
early_gdt_descr.address is modified every time native_cpu_up() runs. 
However, during resume it should point to the GDT of the boot CPU rather
than to another CPU's GDT.

For this reason, during suspend to RAM always make early_gdt_descr.address
point to the boot CPU's GDT.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=11568, which is a
regression from 2.6.26.

Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
Reported-and-tested-by: Andy Wettstein <ajw1980@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Acked-by: Pavel Machek <pavel@xxxxxxx>
Cc: <stable@xxxxxxxxxx>		[2.6.27.x]
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/x86/kernel/acpi/sleep.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN arch/x86/kernel/acpi/sleep.c~x86-acpi-fix-breakage-of-resume-on-64-bit-up-systems-with-smp-kernel arch/x86/kernel/acpi/sleep.c
--- a/arch/x86/kernel/acpi/sleep.c~x86-acpi-fix-breakage-of-resume-on-64-bit-up-systems-with-smp-kernel
+++ a/arch/x86/kernel/acpi/sleep.c
@@ -10,6 +10,7 @@
 #include <linux/dmi.h>
 #include <linux/cpumask.h>
 #include <asm/segment.h>
+#include <asm/desc.h>
 
 #include "realmode/wakeup.h"
 #include "sleep.h"
@@ -98,6 +99,8 @@ int acpi_save_state_mem(void)
 	header->trampoline_segment = setup_trampoline() >> 4;
 #ifdef CONFIG_SMP
 	stack_start.sp = temp_stack + sizeof(temp_stack);
+	early_gdt_descr.address =
+			(unsigned long)get_cpu_gdt_table(smp_processor_id());
 #endif
 	initial_code = (unsigned long)wakeup_long64;
 	saved_magic = 0x123456789abcdef0;
_

Patches currently in -mm which might be from rjw@xxxxxxx are

origin.patch
linux-next.patch
x86-acpi-fix-breakage-of-resume-on-64-bit-up-systems-with-smp-kernel.patch
skge-adapt-skge-to-use-reworked-pci-pm.patch
e100-adapt-to-the-reworked-pci-pm.patch
shrink_slab-handle-bad-shrinkers.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux