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





--- Comment #9 from Jan Beulich <jbeul...@novell.com>  2009-10-06 15:32:47 ---
>>> "Rafael J. Wysocki" <r...@sisk.pl> 06.10.09 00:20 >>>
>The trampoline is also used for resuming from suspend to RAM on x86_64.

Ingo, if you didn't already revert the original patch, here's a proper fix,
moving the trampoline and accessors back out of .cpuinit.* for the
case of 64-bits+ACPI_SLEEP.

Signed-off-by: Jan Beulich <jbeul...@novell.com>

---
 arch/x86/kernel/trampoline.c    |   12 ++++++++++--
 arch/x86/kernel/trampoline_64.S |    4 ++++
 2 files changed, 14 insertions(+), 2 deletions(-)

--- linux-2.6.32-rc3/arch/x86/kernel/trampoline.c    2009-10-05
12:02:21.000000000 +0200
+++ 2.6.32-rc3-x86_64-trampoline/arch/x86/kernel/trampoline.c    2009-10-06
16:50:58.000000000 +0200
@@ -3,8 +3,16 @@
 #include <asm/trampoline.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 */
-unsigned char *__cpuinitdata trampoline_base = __va(TRAMPOLINE_BASE);
+unsigned char *__trampinitdata trampoline_base = __va(TRAMPOLINE_BASE);

 void __init reserve_trampoline_memory(void)
 {
@@ -26,7 +34,7 @@ void __init reserve_trampoline_memory(vo
  * bootstrap into the page concerned. The caller
  * 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);
     return virt_to_phys(trampoline_base);
--- linux-2.6.32-rc3/arch/x86/kernel/trampoline_64.S    2009-10-05
12:02:21.000000000 +0200
+++ 2.6.32-rc3-x86_64-trampoline/arch/x86/kernel/trampoline_64.S    2009-10-06
16:30:18.000000000 +0200
@@ -32,8 +32,12 @@
 #include <asm/segment.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.
*/
 __CPUINITRODATA
+#endif
 .code16

 ENTRY(trampoline_data)

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to