Commit 037e79aa authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon

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: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Tested-by: default avatarChristopher Covington <cov@codeaurora.org>
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 253d8c3d
...@@ -1286,6 +1286,7 @@ static void krait_pmu_disable_event(struct perf_event *event) ...@@ -1286,6 +1286,7 @@ static void krait_pmu_disable_event(struct perf_event *event)
unsigned long flags; unsigned long flags;
struct hw_perf_event *hwc = &event->hw; struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx; int idx = hwc->idx;
struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu);
struct pmu_hw_events *events = cpu_pmu->get_hw_events(); struct pmu_hw_events *events = cpu_pmu->get_hw_events();
/* Disable counter and interrupt */ /* Disable counter and interrupt */
...@@ -1311,6 +1312,7 @@ static void krait_pmu_enable_event(struct perf_event *event) ...@@ -1311,6 +1312,7 @@ static void krait_pmu_enable_event(struct perf_event *event)
unsigned long flags; unsigned long flags;
struct hw_perf_event *hwc = &event->hw; struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx; int idx = hwc->idx;
struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu);
struct pmu_hw_events *events = cpu_pmu->get_hw_events(); struct pmu_hw_events *events = cpu_pmu->get_hw_events();
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment