aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2014-02-05 11:19:56 +0100
committerIngo Molnar <mingo@kernel.org>2014-02-09 13:08:25 +0100
commit0e9f2204cfa6d79abe3e525ddf7c4ab5792cc751 (patch)
tree5024f0c05df026a22ad5f4dbd98402bc4d7e995e
parentperf/x86/intel/p6: Add userspace RDPMC quirk for PPro (diff)
downloadlinux-dev-0e9f2204cfa6d79abe3e525ddf7c4ab5792cc751.tar.xz
linux-dev-0e9f2204cfa6d79abe3e525ddf7c4ab5792cc751.zip
perf/x86: Fix Userspace RDPMC switch
The current code forgets to change the CR4 state on the current CPU. Use on_each_cpu() instead of smp_call_function(). Reported-by: Mark Davies <junk@eslaf.co.uk> Suggested-by: Mark Davies <junk@eslaf.co.uk> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: fweisbec@gmail.com Link: http://lkml.kernel.org/n/tip-69efsat90ibhnd577zy3z9gh@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 1246b853c4e0..895604f2e916 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1826,7 +1826,7 @@ static ssize_t set_attr_rdpmc(struct device *cdev,
if (!!val != !!x86_pmu.attr_rdpmc) {
x86_pmu.attr_rdpmc = !!val;
- smp_call_function(change_rdpmc, (void *)val, 1);
+ on_each_cpu(change_rdpmc, (void *)val, 1);
}
return count;