aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/perf/arm_pmu.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2017-04-11 09:39:48 +0100
committerWill Deacon <will.deacon@arm.com>2017-04-11 16:29:53 +0100
commit3a5a89d30ee3d5d8b55490e3c63bf533b196e1c8 (patch)
treeffef1680e6e4aa6bf5db7c938e0a975306073394 /drivers/perf/arm_pmu.c
parentdrivers/perf: arm_pmu: factor out pmu registration (diff)
downloadlinux-dev-3a5a89d30ee3d5d8b55490e3c63bf533b196e1c8.tar.xz
linux-dev-3a5a89d30ee3d5d8b55490e3c63bf533b196e1c8.zip
drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs()
The ARM PMU framework code always uses armpmu_dispatch_irq as its common IRQ handler. Passing this down from cpu_pmu_init() is somewhat pointless, and gets in the way of refactoring. This patch makes cpu_pmu_request_irqs() always use armpmu_dispatch_irq as the handler when requesting IRQs, and removes the handler parameter from its prototype. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/perf/arm_pmu.c')
-rw-r--r--drivers/perf/arm_pmu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index 985bd081f3e7..183c6fd786b2 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -543,10 +543,11 @@ static void cpu_pmu_free_irqs(struct arm_pmu *cpu_pmu)
}
}
-static int cpu_pmu_request_irqs(struct arm_pmu *cpu_pmu, irq_handler_t handler)
+static int cpu_pmu_request_irqs(struct arm_pmu *cpu_pmu)
{
int cpu, err;
struct pmu_hw_events __percpu *hw_events = cpu_pmu->hw_events;
+ const irq_handler_t handler = armpmu_dispatch_irq;
for_each_cpu(cpu, &cpu_pmu->supported_cpus) {
int irq = per_cpu(hw_events->irq, cpu);
@@ -735,7 +736,7 @@ static int cpu_pmu_init(struct arm_pmu *cpu_pmu)
{
int err;
- err = cpu_pmu_request_irqs(cpu_pmu, armpmu_dispatch_irq);
+ err = cpu_pmu_request_irqs(cpu_pmu);
if (err)
goto out;