Skip to content

Commit 341e42c

Browse files
bebarinowildea01
authored andcommitted
ARM: perf: Add support for Scorpion PMUs
Scorpion supports a set of local performance monitor event selection registers (LPM) sitting behind a cp15 based interface that extend the architected PMU events to include Scorpion CPU and Venum VFP specific events. To use these events the user is expected to program the lpm register with the event code shifted into the group they care about and then point the PMNx event at that region+group combo by writing a LPMn_GROUPx event. Add support for this hardware. Note: the raw event number is a pure software construct that allows us to map the multi-dimensional number space of regions, groups, and event codes into a flat event number space suitable for use by the perf framework. This is based on code originally written by Sheetal Sahasrabudhe, Ashwin Chaugule, and Neil Leeder [1]. [1] https://www.codeaurora.org/cgit/quic/la/kernel/msm/tree/arch/arm/kernel/perf_event_msm.c?h=msm-3.4 Cc: Mark Rutland <mark.rutland@arm.com> Cc: Neil Leeder <nleeder@codeaurora.org> Cc: Ashwin Chaugule <ashwinc@codeaurora.org> Cc: Sheetal Sahasrabudhe <sheetals@codeaurora.org> Cc: <devicetree@vger.kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 9349991 commit 341e42c

File tree

3 files changed

+418
-0
lines changed

3 files changed

+418
-0
lines changed

Documentation/devicetree/bindings/arm/pmu.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Required properties:
1818
"arm,arm11mpcore-pmu"
1919
"arm,arm1176-pmu"
2020
"arm,arm1136-pmu"
21+
"qcom,scorpion-pmu"
22+
"qcom,scorpion-mp-pmu"
2123
"qcom,krait-pmu"
2224
- interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu
2325
interrupt (PPI) then 1 interrupt should be specified.

arch/arm/kernel/perf_event_cpu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ static const struct of_device_id cpu_pmu_of_device_ids[] = {
243243
{.compatible = "arm,arm1176-pmu", .data = armv6_1176_pmu_init},
244244
{.compatible = "arm,arm1136-pmu", .data = armv6_1136_pmu_init},
245245
{.compatible = "qcom,krait-pmu", .data = krait_pmu_init},
246+
{.compatible = "qcom,scorpion-pmu", .data = scorpion_pmu_init},
247+
{.compatible = "qcom,scorpion-mp-pmu", .data = scorpion_mp_pmu_init},
246248
{},
247249
};
248250

0 commit comments

Comments
 (0)