* [PATCH] perf,x86: Fix Userspace RDPMC switch
@ 2014-02-05 10:28 Peter Zijlstra
0 siblings, 0 replies; only message in thread
From: Peter Zijlstra @ 2014-02-05 10:28 UTC (permalink / raw)
To: junk; +Cc: fweisbec, Ingo Molnar, linux-kernel
Subject: perf,x86: Fix Userspace RDPMC switch
From: Peter Zijlstra <peterz@infradead.org>
Date: Wed Feb 5 11:19:56 CET 2014
The current code forgets to change the CR4 state on the current CPU.
User on_each_cpu() instead of smp_call_function().
Cc: fweisbec@gmail.com
Reported-by: Mark Davies <junk@eslaf.co.uk>
Suggested-by: Mark Davies <junk@eslaf.co.uk>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
---
arch/x86/kernel/cpu/perf_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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 dev
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-05 10:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-05 10:28 [PATCH] perf,x86: Fix Userspace RDPMC switch Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome