diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-19 01:55:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-19 01:56:17 -0400 |
commit | 68d2cf25d39324c54b5e42de7915c623a0917abe (patch) | |
tree | ff1291450d7e6630bc77ec1363c3db8d74fa58b0 /arch/x86/kernel/cpu | |
parent | 176fcc5c5f0131504a55e1e1d35389c49a9177c2 (diff) | |
parent | 5d2cd90922c778908bd0cd669e572a5b5eafd737 (diff) |
Merge branch 'perf/urgent' into perf/core
Merge reason: we'll be queueing up dependent changes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 5a05ef63eb4a..3385ea26f684 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -1626,7 +1626,7 @@ out: | |||
1626 | static unsigned int mce_poll(struct file *file, poll_table *wait) | 1626 | static unsigned int mce_poll(struct file *file, poll_table *wait) |
1627 | { | 1627 | { |
1628 | poll_wait(file, &mce_wait, wait); | 1628 | poll_wait(file, &mce_wait, wait); |
1629 | if (rcu_dereference_check_mce(mcelog.next)) | 1629 | if (rcu_access_index(mcelog.next)) |
1630 | return POLLIN | POLLRDNORM; | 1630 | return POLLIN | POLLRDNORM; |
1631 | if (!mce_apei_read_done && apei_check_mce()) | 1631 | if (!mce_apei_read_done && apei_check_mce()) |
1632 | return POLLIN | POLLRDNORM; | 1632 | return POLLIN | POLLRDNORM; |
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 */ |