diff options
author | Shaohua Li <shaohua.li@intel.com> | 2005-07-07 20:56:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:23:42 -0400 |
commit | 3b520b238e018ef0e9d11c9115d5e7d9419c4ef9 (patch) | |
tree | 8b9bf3ccf2dd13dbbbcb4a3ff5028a351817b657 /arch/x86_64/kernel | |
parent | 01d299367fe868851a632cfbdb606845f57682aa (diff) |
[PATCH] MTRR suspend/resume cleanup
There has been some discuss about solving the SMP MTRR suspend/resume
breakage, but I didn't find a patch for it. This is an intent for it. The
basic idea is moving mtrr initializing into cpu_identify for all APs (so it
works for cpu hotplug). For BP, restore_processor_state is responsible for
restoring MTRR.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/suspend.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index b02d921da4f7..5fd03225058a 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -1076,6 +1076,10 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
1076 | #ifdef CONFIG_X86_MCE | 1076 | #ifdef CONFIG_X86_MCE |
1077 | mcheck_init(c); | 1077 | mcheck_init(c); |
1078 | #endif | 1078 | #endif |
1079 | if (c == &boot_cpu_data) | ||
1080 | mtrr_bp_init(); | ||
1081 | else | ||
1082 | mtrr_ap_init(); | ||
1079 | #ifdef CONFIG_NUMA | 1083 | #ifdef CONFIG_NUMA |
1080 | if (c != &boot_cpu_data) | 1084 | if (c != &boot_cpu_data) |
1081 | numa_add_cpu(c - cpu_data); | 1085 | numa_add_cpu(c - cpu_data); |
diff --git a/arch/x86_64/kernel/suspend.c b/arch/x86_64/kernel/suspend.c index 6c0f402e3a88..0612640d91b1 100644 --- a/arch/x86_64/kernel/suspend.c +++ b/arch/x86_64/kernel/suspend.c | |||
@@ -119,6 +119,7 @@ void __restore_processor_state(struct saved_context *ctxt) | |||
119 | fix_processor_context(); | 119 | fix_processor_context(); |
120 | 120 | ||
121 | do_fpu_end(); | 121 | do_fpu_end(); |
122 | mtrr_ap_init(); | ||
122 | } | 123 | } |
123 | 124 | ||
124 | void restore_processor_state(void) | 125 | void restore_processor_state(void) |