Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: Fix Suspend to RAM freeze on Acer Aspire 1511Lmi laptop

Move the trampoline and accessors back out of .cpuinit.* for the
case of 64-bits+ACPI_SLEEP.

This solves s2ram hangs reported in:

http://bugzilla.kernel.org/show_bug.cgi?id=14279

Reported-and-bisected-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: <bugzilla-daemon@bugzilla.kernel.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Jan Beulich and committed by
Ingo Molnar
7a4b7e5e d0153ca3

+14 -2
+10 -2
arch/x86/kernel/trampoline.c
··· 3 3 #include <asm/trampoline.h> 4 4 #include <asm/e820.h> 5 5 6 + #if defined(CONFIG_X86_64) && defined(CONFIG_ACPI_SLEEP) 7 + #define __trampinit 8 + #define __trampinitdata 9 + #else 10 + #define __trampinit __cpuinit 11 + #define __trampinitdata __cpuinitdata 12 + #endif 13 + 6 14 /* ready for x86_64 and x86 */ 7 - unsigned char *__cpuinitdata trampoline_base = __va(TRAMPOLINE_BASE); 15 + unsigned char *__trampinitdata trampoline_base = __va(TRAMPOLINE_BASE); 8 16 9 17 void __init reserve_trampoline_memory(void) 10 18 { ··· 34 26 * bootstrap into the page concerned. The caller 35 27 * has made sure it's suitably aligned. 36 28 */ 37 - unsigned long __cpuinit setup_trampoline(void) 29 + unsigned long __trampinit setup_trampoline(void) 38 30 { 39 31 memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE); 40 32 return virt_to_phys(trampoline_base);
+4
arch/x86/kernel/trampoline_64.S
··· 32 32 #include <asm/segment.h> 33 33 #include <asm/processor-flags.h> 34 34 35 + #ifdef CONFIG_ACPI_SLEEP 36 + .section .rodata, "a", @progbits 37 + #else 35 38 /* We can free up the trampoline after bootup if cpu hotplug is not supported. */ 36 39 __CPUINITRODATA 40 + #endif 37 41 .code16 38 42 39 43 ENTRY(trampoline_data)