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 | |
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')
-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 | ||||
-rw-r--r-- | arch/x86_64/kernel/acpi/sleep.c | 7 |
4 files changed, 10 insertions, 21 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. |
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c index 867a0ebee177..091bc79c888f 100644 --- a/arch/x86_64/kernel/acpi/sleep.c +++ b/arch/x86_64/kernel/acpi/sleep.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
36 | #include <linux/bootmem.h> | 36 | #include <linux/bootmem.h> |
37 | #include <linux/acpi.h> | 37 | #include <linux/acpi.h> |
38 | #include <linux/cpumask.h> | ||
39 | |||
38 | #include <asm/mpspec.h> | 40 | #include <asm/mpspec.h> |
39 | #include <asm/io.h> | 41 | #include <asm/io.h> |
40 | #include <asm/apic.h> | 42 | #include <asm/apic.h> |
@@ -66,7 +68,8 @@ static void init_low_mapping(void) | |||
66 | pgd_t *slot0 = pgd_offset(current->mm, 0UL); | 68 | pgd_t *slot0 = pgd_offset(current->mm, 0UL); |
67 | low_ptr = *slot0; | 69 | low_ptr = *slot0; |
68 | set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET)); | 70 | set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET)); |
69 | flush_tlb_all(); | 71 | WARN_ON(num_online_cpus() != 1); |
72 | local_flush_tlb(); | ||
70 | } | 73 | } |
71 | 74 | ||
72 | /** | 75 | /** |
@@ -92,7 +95,7 @@ int acpi_save_state_mem(void) | |||
92 | void acpi_restore_state_mem(void) | 95 | void acpi_restore_state_mem(void) |
93 | { | 96 | { |
94 | set_pgd(pgd_offset(current->mm, 0UL), low_ptr); | 97 | set_pgd(pgd_offset(current->mm, 0UL), low_ptr); |
95 | flush_tlb_all(); | 98 | local_flush_tlb(); |
96 | } | 99 | } |
97 | 100 | ||
98 | /** | 101 | /** |