From: Peter Zijlstra <peterz@infradead.org>
To: junk@eslaf.co.uk
Cc: fweisbec@gmail.com, Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] perf,x86: Fix Userspace RDPMC switch
Date: Wed, 5 Feb 2014 11:28:15 +0100 [thread overview]
Message-ID: <20140205102815.GG3229@twins.programming.kicks-ass.net> (raw)
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;
reply other threads:[~2014-02-05 10:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140205102815.GG3229@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=fweisbec@gmail.com \
--cc=junk@eslaf.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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