aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-09-17 05:28:49 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-17 06:48:48 -0400
commit917bdd1c9b7b0f4c22f2504c2f0c1074c8ab9df7 (patch)
tree63b408a2b5951580d5c1bba7d64932ddee2c6d12
parentb04243ef7006cda301819f54ee7ce0a3632489e3 (diff)
perf: Fix perf_event_exit_cpu_context()
Use the right cpu-context.. spotted by preempt warning on hot-unplug Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Robert Richter <robert.richter@amd.com> LKML-Reference: <20100917093009.461794357@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/perf_event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 6d7eef5f3c41..27332e5f51a7 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -6269,14 +6269,13 @@ static void perf_event_exit_cpu_context(int cpu)
6269 6269
6270 idx = srcu_read_lock(&pmus_srcu); 6270 idx = srcu_read_lock(&pmus_srcu);
6271 list_for_each_entry_rcu(pmu, &pmus, entry) { 6271 list_for_each_entry_rcu(pmu, &pmus, entry) {
6272 ctx = &this_cpu_ptr(pmu->pmu_cpu_context)->ctx; 6272 ctx = &per_cpu_ptr(pmu->pmu_cpu_context, cpu)->ctx;
6273 6273
6274 mutex_lock(&ctx->mutex); 6274 mutex_lock(&ctx->mutex);
6275 smp_call_function_single(cpu, __perf_event_exit_context, ctx, 1); 6275 smp_call_function_single(cpu, __perf_event_exit_context, ctx, 1);
6276 mutex_unlock(&ctx->mutex); 6276 mutex_unlock(&ctx->mutex);
6277 } 6277 }
6278 srcu_read_unlock(&pmus_srcu, idx); 6278 srcu_read_unlock(&pmus_srcu, idx);
6279
6280} 6279}
6281 6280
6282static void perf_event_exit_cpu(int cpu) 6281static void perf_event_exit_cpu(int cpu)