aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2014-05-21 13:06:13 -0400
committerWill Deacon <will.deacon@arm.com>2014-07-02 10:48:26 -0400
commit037e79aa958d325cfb3c733496af64199bba6b49 (patch)
tree651d0110f848459c8fb8610cf32468cbff9059b6
parent253d8c3d2518ca6f58853c9884e8f3cf961c0f15 (diff)
arm: perf: krait: stop using singleton PMU
Currently the krait_pmu_{enable,disable}_event functions use the global cpu_pmu variable while all the other pmu enable/disable functions derive this from the event argument. This patch brings the Krait functions into line with the rest of the PMU backends by deriving the address of the pmu from the event argument. Acked-by: Will Deacon <will.deacon@arm.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Tested-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm/kernel/perf_event_v7.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index d4129bc06402..116758b77f93 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -1286,6 +1286,7 @@ static void krait_pmu_disable_event(struct perf_event *event)
1286 unsigned long flags; 1286 unsigned long flags;
1287 struct hw_perf_event *hwc = &event->hw; 1287 struct hw_perf_event *hwc = &event->hw;
1288 int idx = hwc->idx; 1288 int idx = hwc->idx;
1289 struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu);
1289 struct pmu_hw_events *events = cpu_pmu->get_hw_events(); 1290 struct pmu_hw_events *events = cpu_pmu->get_hw_events();
1290 1291
1291 /* Disable counter and interrupt */ 1292 /* Disable counter and interrupt */
@@ -1311,6 +1312,7 @@ static void krait_pmu_enable_event(struct perf_event *event)
1311 unsigned long flags; 1312 unsigned long flags;
1312 struct hw_perf_event *hwc = &event->hw; 1313 struct hw_perf_event *hwc = &event->hw;
1313 int idx = hwc->idx; 1314 int idx = hwc->idx;
1315 struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu);
1314 struct pmu_hw_events *events = cpu_pmu->get_hw_events(); 1316 struct pmu_hw_events *events = cpu_pmu->get_hw_events();
1315 1317
1316 /* 1318 /*