Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1286,6 +1286,7 @@ static void krait_pmu_disable_event(struct perf_event *event)
	unsigned long flags;
	struct hw_perf_event *hwc = &event->hw;
	int idx = hwc->idx;
	struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu);
	struct pmu_hw_events *events = cpu_pmu->get_hw_events();

	/* Disable counter and interrupt */
@@ -1311,6 +1312,7 @@ static void krait_pmu_enable_event(struct perf_event *event)
	unsigned long flags;
	struct hw_perf_event *hwc = &event->hw;
	int idx = hwc->idx;
	struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu);
	struct pmu_hw_events *events = cpu_pmu->get_hw_events();

	/*