Commit 7a4b7e5e authored by Jan Beulich's avatar Jan Beulich Committed by Ingo Molnar

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=14279Reported-and-bisected-by: default avatarChristian Casteyde <casteyde.christian@free.fr>
Signed-off-by: default avatarJan 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: default avatarIngo Molnar <mingo@elte.hu>
parent d0153ca3
...@@ -3,8 +3,16 @@ ...@@ -3,8 +3,16 @@
#include <asm/trampoline.h> #include <asm/trampoline.h>
#include <asm/e820.h> #include <asm/e820.h>
#if defined(CONFIG_X86_64) && defined(CONFIG_ACPI_SLEEP)
#define __trampinit
#define __trampinitdata
#else
#define __trampinit __cpuinit
#define __trampinitdata __cpuinitdata
#endif
/* ready for x86_64 and x86 */ /* ready for x86_64 and x86 */
unsigned char *__cpuinitdata trampoline_base = __va(TRAMPOLINE_BASE); unsigned char *__trampinitdata trampoline_base = __va(TRAMPOLINE_BASE);
void __init reserve_trampoline_memory(void) void __init reserve_trampoline_memory(void)
{ {
...@@ -26,7 +34,7 @@ void __init reserve_trampoline_memory(void) ...@@ -26,7 +34,7 @@ void __init reserve_trampoline_memory(void)
* bootstrap into the page concerned. The caller * bootstrap into the page concerned. The caller
* has made sure it's suitably aligned. * has made sure it's suitably aligned.
*/ */
unsigned long __cpuinit setup_trampoline(void) unsigned long __trampinit setup_trampoline(void)
{ {
memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE); memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE);
return virt_to_phys(trampoline_base); return virt_to_phys(trampoline_base);
......
...@@ -32,8 +32,12 @@ ...@@ -32,8 +32,12 @@
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/processor-flags.h> #include <asm/processor-flags.h>
#ifdef CONFIG_ACPI_SLEEP
.section .rodata, "a", @progbits
#else
/* We can free up the trampoline after bootup if cpu hotplug is not supported. */ /* We can free up the trampoline after bootup if cpu hotplug is not supported. */
__CPUINITRODATA __CPUINITRODATA
#endif
.code16 .code16
ENTRY(trampoline_data) ENTRY(trampoline_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment