diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-03-05 07:01:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-10 07:22:24 -0500 |
commit | 3f6da3905398826d85731247e7fbcf53400c18bd (patch) | |
tree | 3e01248974385999fb8e7f8d5daa53b46228f649 /kernel/perf_event.c | |
parent | dc1d628a67a8f042e711ea5accc0beedc3ef0092 (diff) |
perf: Rework and fix the arch CPU-hotplug hooks
Remove the hw_perf_event_*() hotplug hooks in favour of per PMU hotplug
notifiers. This has the advantage of reducing the static weak interface
as well as exposing all hotplug actions to the PMU.
Use this to fix x86 hotplug usage where we did things in ONLINE which
should have been done in UP_PREPARE or STARTING.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <20100305154128.736225361@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 4393b9e73740..73329dedb5ad 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -81,10 +81,6 @@ extern __weak const struct pmu *hw_perf_event_init(struct perf_event *event) | |||
81 | void __weak hw_perf_disable(void) { barrier(); } | 81 | void __weak hw_perf_disable(void) { barrier(); } |
82 | void __weak hw_perf_enable(void) { barrier(); } | 82 | void __weak hw_perf_enable(void) { barrier(); } |
83 | 83 | ||
84 | void __weak hw_perf_event_setup(int cpu) { barrier(); } | ||
85 | void __weak hw_perf_event_setup_online(int cpu) { barrier(); } | ||
86 | void __weak hw_perf_event_setup_offline(int cpu) { barrier(); } | ||
87 | |||
88 | int __weak | 84 | int __weak |
89 | hw_perf_group_sched_in(struct perf_event *group_leader, | 85 | hw_perf_group_sched_in(struct perf_event *group_leader, |
90 | struct perf_cpu_context *cpuctx, | 86 | struct perf_cpu_context *cpuctx, |
@@ -5382,8 +5378,6 @@ static void __cpuinit perf_event_init_cpu(int cpu) | |||
5382 | spin_lock(&perf_resource_lock); | 5378 | spin_lock(&perf_resource_lock); |
5383 | cpuctx->max_pertask = perf_max_events - perf_reserved_percpu; | 5379 | cpuctx->max_pertask = perf_max_events - perf_reserved_percpu; |
5384 | spin_unlock(&perf_resource_lock); | 5380 | spin_unlock(&perf_resource_lock); |
5385 | |||
5386 | hw_perf_event_setup(cpu); | ||
5387 | } | 5381 | } |
5388 | 5382 | ||
5389 | #ifdef CONFIG_HOTPLUG_CPU | 5383 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -5423,20 +5417,11 @@ perf_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) | |||
5423 | perf_event_init_cpu(cpu); | 5417 | perf_event_init_cpu(cpu); |
5424 | break; | 5418 | break; |
5425 | 5419 | ||
5426 | case CPU_ONLINE: | ||
5427 | case CPU_ONLINE_FROZEN: | ||
5428 | hw_perf_event_setup_online(cpu); | ||
5429 | break; | ||
5430 | |||
5431 | case CPU_DOWN_PREPARE: | 5420 | case CPU_DOWN_PREPARE: |
5432 | case CPU_DOWN_PREPARE_FROZEN: | 5421 | case CPU_DOWN_PREPARE_FROZEN: |
5433 | perf_event_exit_cpu(cpu); | 5422 | perf_event_exit_cpu(cpu); |
5434 | break; | 5423 | break; |
5435 | 5424 | ||
5436 | case CPU_DEAD: | ||
5437 | hw_perf_event_setup_offline(cpu); | ||
5438 | break; | ||
5439 | |||
5440 | default: | 5425 | default: |
5441 | break; | 5426 | break; |
5442 | } | 5427 | } |