diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-06-14 02:49:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-09-09 14:46:29 -0400 |
commit | 33696fc0d141bbbcb12f75b69608ea83282e3117 (patch) | |
tree | 72e08dba377d57eb7dd8c08a937a6de10e8af9c4 /arch/arm/kernel/perf_event.c | |
parent | 24cd7f54a0d47e1d5b3de29e2456bfbd2d8447b7 (diff) |
perf: Per PMU disable
Changes perf_disable() into perf_pmu_disable().
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus <paulus@samba.org>
Cc: stephane eranian <eranian@googlemail.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Yanmin <yanmin_zhang@linux.intel.com>
Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: David Miller <davem@davemloft.net>
Cc: Michael Cree <mcree@orcon.net.nz>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index afc92c580d18..3343f3f4b973 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -277,7 +277,7 @@ armpmu_enable(struct perf_event *event) | |||
277 | int idx; | 277 | int idx; |
278 | int err = 0; | 278 | int err = 0; |
279 | 279 | ||
280 | perf_disable(); | 280 | perf_pmu_disable(event->pmu); |
281 | 281 | ||
282 | /* If we don't have a space for the counter then finish early. */ | 282 | /* If we don't have a space for the counter then finish early. */ |
283 | idx = armpmu->get_event_idx(cpuc, hwc); | 283 | idx = armpmu->get_event_idx(cpuc, hwc); |
@@ -305,7 +305,7 @@ armpmu_enable(struct perf_event *event) | |||
305 | perf_event_update_userpage(event); | 305 | perf_event_update_userpage(event); |
306 | 306 | ||
307 | out: | 307 | out: |
308 | perf_enable(); | 308 | perf_pmu_enable(event->pmu); |
309 | return err; | 309 | return err; |
310 | } | 310 | } |
311 | 311 | ||
@@ -534,16 +534,7 @@ static int armpmu_event_init(struct perf_event *event) | |||
534 | return err; | 534 | return err; |
535 | } | 535 | } |
536 | 536 | ||
537 | static struct pmu pmu = { | 537 | static void armpmu_pmu_enable(struct pmu *pmu) |
538 | .event_init = armpmu_event_init, | ||
539 | .enable = armpmu_enable, | ||
540 | .disable = armpmu_disable, | ||
541 | .unthrottle = armpmu_unthrottle, | ||
542 | .read = armpmu_read, | ||
543 | }; | ||
544 | |||
545 | void | ||
546 | hw_perf_enable(void) | ||
547 | { | 538 | { |
548 | /* Enable all of the perf events on hardware. */ | 539 | /* Enable all of the perf events on hardware. */ |
549 | int idx; | 540 | int idx; |
@@ -564,13 +555,22 @@ hw_perf_enable(void) | |||
564 | armpmu->start(); | 555 | armpmu->start(); |
565 | } | 556 | } |
566 | 557 | ||
567 | void | 558 | static void armpmu_pmu_disable(struct pmu *pmu) |
568 | hw_perf_disable(void) | ||
569 | { | 559 | { |
570 | if (armpmu) | 560 | if (armpmu) |
571 | armpmu->stop(); | 561 | armpmu->stop(); |
572 | } | 562 | } |
573 | 563 | ||
564 | static struct pmu pmu = { | ||
565 | .pmu_enable = armpmu_pmu_enable, | ||
566 | .pmu_disable= armpmu_pmu_disable, | ||
567 | .event_init = armpmu_event_init, | ||
568 | .enable = armpmu_enable, | ||
569 | .disable = armpmu_disable, | ||
570 | .unthrottle = armpmu_unthrottle, | ||
571 | .read = armpmu_read, | ||
572 | }; | ||
573 | |||
574 | /* | 574 | /* |
575 | * ARMv6 Performance counter handling code. | 575 | * ARMv6 Performance counter handling code. |
576 | * | 576 | * |