fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / x86_64 / kernel / acpi / sleep.c
index 7a275de..5ebf62c 100644 (file)
@@ -26,7 +26,6 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -34,8 +33,9 @@
 #include <linux/slab.h>
 #include <linux/pci.h>
 #include <linux/bootmem.h>
-#include <linux/irq.h>
 #include <linux/acpi.h>
+#include <linux/cpumask.h>
+
 #include <asm/mpspec.h>
 #include <asm/io.h>
 #include <asm/apic.h>
@@ -47,7 +47,6 @@
 #include <asm/proto.h>
 #include <asm/tlbflush.h>
 
-
 /* --------------------------------------------------------------------------
                               Low-Level Sleep Support
    -------------------------------------------------------------------------- */
@@ -68,7 +67,8 @@ static void init_low_mapping(void)
        pgd_t *slot0 = pgd_offset(current->mm, 0UL);
        low_ptr = *slot0;
        set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET));
-       flush_tlb_all();
+       WARN_ON(num_online_cpus() != 1);
+       local_flush_tlb();
 }
 
 /**
@@ -77,11 +77,12 @@ static void init_low_mapping(void)
  * Create an identity mapped page table and copy the wakeup routine to
  * low memory.
  */
-int acpi_save_state_mem (void)
+int acpi_save_state_mem(void)
 {
        init_low_mapping();
 
-       memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start);
+       memcpy((void *)acpi_wakeup_address, &wakeup_start,
+              &wakeup_end - &wakeup_start);
        acpi_copy_wakeup_routine(acpi_wakeup_address);
 
        return 0;
@@ -90,10 +91,10 @@ int acpi_save_state_mem (void)
 /*
  * acpi_restore_state
  */
-void acpi_restore_state_mem (void)
+void acpi_restore_state_mem(void)
 {
        set_pgd(pgd_offset(current->mm, 0UL), low_ptr);
-       flush_tlb_all();
+       local_flush_tlb();
 }
 
 /**
@@ -108,7 +109,8 @@ void __init acpi_reserve_bootmem(void)
 {
        acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
        if ((&wakeup_end - &wakeup_start) > PAGE_SIZE)
-               printk(KERN_CRIT "ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
+               printk(KERN_CRIT
+                      "ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
 }
 
 static int __init acpi_sleep_setup(char *str)
@@ -127,6 +129,8 @@ static int __init acpi_sleep_setup(char *str)
 
 __setup("acpi_sleep=", acpi_sleep_setup);
 
-#endif /*CONFIG_ACPI_SLEEP*/
+#endif                         /*CONFIG_ACPI_SLEEP */
 
-void acpi_pci_link_exit(void) {}
+void acpi_pci_link_exit(void)
+{
+}