x86, acpi: cleanup, temp_stack is used only when CONFIG_SMP is set
[safe/jmp/linux-2.6] / arch / x86 / kernel / acpi / sleep.c
index 41bb130..81e5ab6 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/bootmem.h>
 #include <linux/dmi.h>
 #include <linux/cpumask.h>
+#include <asm/segment.h>
 
 #include "realmode/wakeup.h"
 #include "sleep.h"
@@ -19,19 +20,10 @@ unsigned long acpi_realmode_flags;
 /* address in low memory of the wakeup routine. */
 static unsigned long acpi_realmode;
 
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_SMP) && defined(CONFIG_64BIT)
 static char temp_stack[10240];
 #endif
 
-/* XXX: this macro should move to asm-x86/segment.h and be shared with the
-   boot code... */
-#define GDT_ENTRY(flags, base, limit)          \
-       (((u64)(base & 0xff000000) << 32) |     \
-        ((u64)flags << 40) |                   \
-        ((u64)(limit & 0x00ff0000) << 32) |    \
-        ((u64)(base & 0x00ffffff) << 16) |     \
-        ((u64)(limit & 0x0000ffff)))
-
 /**
  * acpi_save_state_mem - save kernel state
  *
@@ -104,7 +96,9 @@ int acpi_save_state_mem(void)
        saved_magic = 0x12345678;
 #else /* CONFIG_64BIT */
        header->trampoline_segment = setup_trampoline() >> 4;
-       init_rsp = (unsigned long)temp_stack + 4096;
+#ifdef CONFIG_SMP
+       stack_start.sp = temp_stack + 4096;
+#endif
        initial_code = (unsigned long)wakeup_long64;
        saved_magic = 0x123456789abcdef0;
 #endif /* CONFIG_64BIT */
@@ -156,6 +150,12 @@ static int __init acpi_sleep_setup(char *str)
                        acpi_realmode_flags |= 2;
                if (strncmp(str, "s3_beep", 7) == 0)
                        acpi_realmode_flags |= 4;
+#ifdef CONFIG_HIBERNATION
+               if (strncmp(str, "s4_nohwsig", 10) == 0)
+                       acpi_no_s4_hw_signature();
+#endif
+               if (strncmp(str, "old_ordering", 12) == 0)
+                       acpi_old_suspend_ordering();
                str = strchr(str, ',');
                if (str != NULL)
                        str += strspn(str, ", \t");