aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-04 11:37:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-04 11:37:45 -0400
commitd7c764c4c7b782c660b4600b0bff2e3509892a4d (patch)
tree94e7540f4996e15f717001eb08e21dd59c42c0fd /arch/x86/kernel/cpu
parent148086bb64694cc91624bab2a550d50f800eb4b7 (diff)
parent818987e9a19c52240ba9b1c20f28f047eef76072 (diff)
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, UV: Fix kdump reboot x86, amd-nb: Rename CPU PCI id define for F4 sound: Add delay.h to sound/soc/codecs/sn95031.c x86, mtrr, pat: Fix one cpu getting out of sync during resume x86, microcode: Unregister syscore_ops after microcode unloaded x86: Stop including <linux/delay.h> in two asm header files
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 307dfbbf4a8e..929739a653d1 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -293,14 +293,24 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ
293 293
294 /* 294 /*
295 * HACK! 295 * HACK!
296 * We use this same function to initialize the mtrrs on boot. 296 *
297 * The state of the boot cpu's mtrrs has been saved, and we want 297 * We use this same function to initialize the mtrrs during boot,
298 * to replicate across all the APs. 298 * resume, runtime cpu online and on an explicit request to set a
299 * If we're doing that @reg is set to something special... 299 * specific MTRR.
300 *
301 * During boot or suspend, the state of the boot cpu's mtrrs has been
302 * saved, and we want to replicate that across all the cpus that come
303 * online (either at the end of boot or resume or during a runtime cpu
304 * online). If we're doing that, @reg is set to something special and on
305 * this cpu we still do mtrr_if->set_all(). During boot/resume, this
306 * is unnecessary if at this point we are still on the cpu that started
307 * the boot/resume sequence. But there is no guarantee that we are still
308 * on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be
309 * sure that we are in sync with everyone else.
300 */ 310 */
301 if (reg != ~0U) 311 if (reg != ~0U)
302 mtrr_if->set(reg, base, size, type); 312 mtrr_if->set(reg, base, size, type);
303 else if (!mtrr_aps_delayed_init) 313 else
304 mtrr_if->set_all(); 314 mtrr_if->set_all();
305 315
306 /* Wait for the others */ 316 /* Wait for the others */