diff options
author | Shaohua Li <shaohua.li@intel.com> | 2006-06-23 05:04:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:00 -0400 |
commit | 55b2355eefc2f160246226d4d69fed431173a4d5 (patch) | |
tree | b5ed6dbf3d045443a12de412f9937a6b8dc20840 /arch/i386 | |
parent | 968808b8956e332e556b1eae9b4f7df77518f53b (diff) |
[PATCH] don't use flush_tlb_all in suspend time
flush_tlb_all uses on_each_cpu, which will disable/enable interrupt.
In suspend/resume time, this will make interrupt wrongly enabled.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/acpi/sleep.c | 19 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/wakeup.S | 2 | ||||
-rw-r--r-- | arch/i386/mm/init.c | 3 |
3 files changed, 5 insertions, 19 deletions
diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c index 1cb2b186a3af..4ee83577bf61 100644 --- a/arch/i386/kernel/acpi/sleep.c +++ b/arch/i386/kernel/acpi/sleep.c | |||
@@ -8,30 +8,17 @@ | |||
8 | #include <linux/acpi.h> | 8 | #include <linux/acpi.h> |
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/dmi.h> | 10 | #include <linux/dmi.h> |
11 | #include <linux/cpumask.h> | ||
12 | |||
11 | #include <asm/smp.h> | 13 | #include <asm/smp.h> |
12 | #include <asm/tlbflush.h> | ||
13 | 14 | ||
14 | /* address in low memory of the wakeup routine. */ | 15 | /* address in low memory of the wakeup routine. */ |
15 | unsigned long acpi_wakeup_address = 0; | 16 | unsigned long acpi_wakeup_address = 0; |
16 | unsigned long acpi_video_flags; | 17 | unsigned long acpi_video_flags; |
17 | extern char wakeup_start, wakeup_end; | 18 | extern char wakeup_start, wakeup_end; |
18 | 19 | ||
19 | extern void zap_low_mappings(void); | ||
20 | |||
21 | extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); | 20 | extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); |
22 | 21 | ||
23 | static void init_low_mapping(pgd_t * pgd, int pgd_limit) | ||
24 | { | ||
25 | int pgd_ofs = 0; | ||
26 | |||
27 | while ((pgd_ofs < pgd_limit) | ||
28 | && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) { | ||
29 | set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD)); | ||
30 | pgd_ofs++, pgd++; | ||
31 | } | ||
32 | flush_tlb_all(); | ||
33 | } | ||
34 | |||
35 | /** | 22 | /** |
36 | * acpi_save_state_mem - save kernel state | 23 | * acpi_save_state_mem - save kernel state |
37 | * | 24 | * |
@@ -42,7 +29,6 @@ int acpi_save_state_mem(void) | |||
42 | { | 29 | { |
43 | if (!acpi_wakeup_address) | 30 | if (!acpi_wakeup_address) |
44 | return 1; | 31 | return 1; |
45 | init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD); | ||
46 | memcpy((void *)acpi_wakeup_address, &wakeup_start, | 32 | memcpy((void *)acpi_wakeup_address, &wakeup_start, |
47 | &wakeup_end - &wakeup_start); | 33 | &wakeup_end - &wakeup_start); |
48 | acpi_copy_wakeup_routine(acpi_wakeup_address); | 34 | acpi_copy_wakeup_routine(acpi_wakeup_address); |
@@ -55,7 +41,6 @@ int acpi_save_state_mem(void) | |||
55 | */ | 41 | */ |
56 | void acpi_restore_state_mem(void) | 42 | void acpi_restore_state_mem(void) |
57 | { | 43 | { |
58 | zap_low_mappings(); | ||
59 | } | 44 | } |
60 | 45 | ||
61 | /** | 46 | /** |
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index 7c74fe0dc93c..dcb4d3c68ebb 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S | |||
@@ -56,7 +56,7 @@ wakeup_code: | |||
56 | 1: | 56 | 1: |
57 | 57 | ||
58 | # set up page table | 58 | # set up page table |
59 | movl $swapper_pg_dir-__PAGE_OFFSET, %eax | 59 | movl $swsusp_pg_dir-__PAGE_OFFSET, %eax |
60 | movl %eax, %cr3 | 60 | movl %eax, %cr3 |
61 | 61 | ||
62 | testl $1, real_efer_save_restore - wakeup_code | 62 | testl $1, real_efer_save_restore - wakeup_code |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 3df1371d4520..bf19513f0cea 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/efi.h> | 29 | #include <linux/efi.h> |
30 | #include <linux/memory_hotplug.h> | 30 | #include <linux/memory_hotplug.h> |
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | #include <linux/cpumask.h> | ||
32 | 33 | ||
33 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
@@ -384,7 +385,7 @@ static void __init pagetable_init (void) | |||
384 | #endif | 385 | #endif |
385 | } | 386 | } |
386 | 387 | ||
387 | #ifdef CONFIG_SOFTWARE_SUSPEND | 388 | #if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP) |
388 | /* | 389 | /* |
389 | * Swap suspend & friends need this for resume because things like the intel-agp | 390 | * Swap suspend & friends need this for resume because things like the intel-agp |
390 | * driver might have split up a kernel 4MB mapping. | 391 | * driver might have split up a kernel 4MB mapping. |