From: Peter Zijlstra Date: Fri, 11 Jun 2010 11:35:08 +0000 (+0200) Subject: perf: Fix CPU hotplug X-Git-Tag: submit/tizen_common/20140905.094502~10825^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e11637e2c929e34dcc0fbbfb48bdb638937701a;p=sdk%2Femulator%2Femulator-kernel.git perf: Fix CPU hotplug Since we have UP_PREPARE, we should also have UP_CANCELED. Signed-off-by: Peter Zijlstra Cc: paulus LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 657555a5f30f..db5b56064687 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -5761,15 +5761,15 @@ perf_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { unsigned int cpu = (long)hcpu; - switch (action) { + switch (action & ~CPU_TASKS_FROZEN) { case CPU_UP_PREPARE: - case CPU_UP_PREPARE_FROZEN: + case CPU_DOWN_FAILED: perf_event_init_cpu(cpu); break; + case CPU_UP_CANCELED: case CPU_DOWN_PREPARE: - case CPU_DOWN_PREPARE_FROZEN: perf_event_exit_cpu(cpu); break;