diff options
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 88b0941ce51e..5bb91bf3d47f 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -59,8 +59,7 @@ armpmu_get_pmu_id(void) | |||
59 | } | 59 | } |
60 | EXPORT_SYMBOL_GPL(armpmu_get_pmu_id); | 60 | EXPORT_SYMBOL_GPL(armpmu_get_pmu_id); |
61 | 61 | ||
62 | int | 62 | int perf_num_counters(void) |
63 | armpmu_get_max_events(void) | ||
64 | { | 63 | { |
65 | int max_events = 0; | 64 | int max_events = 0; |
66 | 65 | ||
@@ -69,12 +68,6 @@ armpmu_get_max_events(void) | |||
69 | 68 | ||
70 | return max_events; | 69 | return max_events; |
71 | } | 70 | } |
72 | EXPORT_SYMBOL_GPL(armpmu_get_max_events); | ||
73 | |||
74 | int perf_num_counters(void) | ||
75 | { | ||
76 | return armpmu_get_max_events(); | ||
77 | } | ||
78 | EXPORT_SYMBOL_GPL(perf_num_counters); | 71 | EXPORT_SYMBOL_GPL(perf_num_counters); |
79 | 72 | ||
80 | #define HW_OP_UNSUPPORTED 0xFFFF | 73 | #define HW_OP_UNSUPPORTED 0xFFFF |
@@ -380,6 +373,8 @@ armpmu_release_hardware(struct arm_pmu *armpmu) | |||
380 | { | 373 | { |
381 | int i, irq, irqs; | 374 | int i, irq, irqs; |
382 | struct platform_device *pmu_device = armpmu->plat_device; | 375 | struct platform_device *pmu_device = armpmu->plat_device; |
376 | struct arm_pmu_platdata *plat = | ||
377 | dev_get_platdata(&pmu_device->dev); | ||
383 | 378 | ||
384 | irqs = min(pmu_device->num_resources, num_possible_cpus()); | 379 | irqs = min(pmu_device->num_resources, num_possible_cpus()); |
385 | 380 | ||
@@ -387,8 +382,11 @@ armpmu_release_hardware(struct arm_pmu *armpmu) | |||
387 | if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs)) | 382 | if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs)) |
388 | continue; | 383 | continue; |
389 | irq = platform_get_irq(pmu_device, i); | 384 | irq = platform_get_irq(pmu_device, i); |
390 | if (irq >= 0) | 385 | if (irq >= 0) { |
386 | if (plat && plat->disable_irq) | ||
387 | plat->disable_irq(irq); | ||
391 | free_irq(irq, armpmu); | 388 | free_irq(irq, armpmu); |
389 | } | ||
392 | } | 390 | } |
393 | 391 | ||
394 | release_pmu(armpmu->type); | 392 | release_pmu(armpmu->type); |
@@ -448,7 +446,8 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu) | |||
448 | irq); | 446 | irq); |
449 | armpmu_release_hardware(armpmu); | 447 | armpmu_release_hardware(armpmu); |
450 | return err; | 448 | return err; |
451 | } | 449 | } else if (plat && plat->enable_irq) |
450 | plat->enable_irq(irq); | ||
452 | 451 | ||
453 | cpumask_set_cpu(i, &armpmu->active_irqs); | 452 | cpumask_set_cpu(i, &armpmu->active_irqs); |
454 | } | 453 | } |