git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
x86_64
/
kernel
/
acpi
/
sleep.c
diff --git
a/arch/x86_64/kernel/acpi/sleep.c
b/arch/x86_64/kernel/acpi/sleep.c
index
20e9266
..
5ebf62c
100644
(file)
--- a/
arch/x86_64/kernel/acpi/sleep.c
+++ b/
arch/x86_64/kernel/acpi/sleep.c
@@
-26,7
+26,6
@@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.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/slab.h>
#include <linux/pci.h>
#include <linux/bootmem.h>
-#include <linux/irq.h>
#include <linux/acpi.h>
#include <linux/acpi.h>
+#include <linux/cpumask.h>
+
#include <asm/mpspec.h>
#include <asm/io.h>
#include <asm/apic.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>
#include <asm/proto.h>
#include <asm/tlbflush.h>
-
/* --------------------------------------------------------------------------
Low-Level Sleep Support
-------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
Low-Level Sleep Support
-------------------------------------------------------------------------- */
@@
-61,10
+60,15
@@
extern char wakeup_start, wakeup_end;
extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
+static pgd_t low_ptr;
+
static void init_low_mapping(void)
{
static void init_low_mapping(void)
{
- cpu_pda[0].level4_pgt[0] = cpu_pda[0].level4_pgt[pml4_index(PAGE_OFFSET)];
- flush_tlb_all();
+ pgd_t *slot0 = pgd_offset(current->mm, 0UL);
+ low_ptr = *slot0;
+ set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET));
+ WARN_ON(num_online_cpus() != 1);
+ local_flush_tlb();
}
/**
}
/**
@@
-73,32
+77,24
@@
static void init_low_mapping(void)
* Create an identity mapped page table and copy the wakeup routine to
* low memory.
*/
* 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();
{
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;
}
acpi_copy_wakeup_routine(acpi_wakeup_address);
return 0;
}
-/**
- * acpi_save_state_disk - save kernel state to disk
- *
- */
-int acpi_save_state_disk (void)
-{
- return 1;
-}
-
/*
* acpi_restore_state
*/
/*
* acpi_restore_state
*/
-void acpi_restore_state_mem
(void)
+void acpi_restore_state_mem(void)
{
{
-
cpu_pda[0].level4_pgt[0] = 0
;
-
flush_tlb_all
();
+
set_pgd(pgd_offset(current->mm, 0UL), low_ptr)
;
+
local_flush_tlb
();
}
/**
}
/**
@@
-113,8
+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)
{
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_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address
);
+ printk(KERN_CRIT
+
"ACPI: Wakeup code way too big, will crash on attempt to suspend\n"
);
}
static int __init acpi_sleep_setup(char *str)
}
static int __init acpi_sleep_setup(char *str)
@@
-133,6
+129,8
@@
static int __init acpi_sleep_setup(char *str)
__setup("acpi_sleep=", acpi_sleep_setup);
__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)
+{
+}