Skip to content

Commit 55691f9

Browse files
Xu Yangwilldeacon
authored andcommitted
drivers/perf: imx_ddr: Add support for NXP i.MX9 SoC DDRC PMU driver
Add ddr performance monitor support for i.MX93. There are 11 counters for ddr performance events. - Counter 0 is a 64-bit counter that counts only clock cycles. - Counter 1-10 are 32-bit counters that can monitor counter-specific events in addition to counting reference events. For example: perf stat -a -e imx9_ddr0/ddrc_pm_1,counter=1/,imx9_ddr0/ddrc_pm_2,counter=2/ ls Besides, this ddr pmu support AXI filter capability. It's implemented as counter-specific events. It now supports read transaction, write transaction and read beat events which corresponding respecitively to counter 2, 3 and 4. axi_mask and axi_id need to be as event parameters. For example: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_trans_filt,counter=2,axi_mask=ID_MASK,axi_id=ID/ perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_trans_filt,counter=3,axi_mask=ID_MASK,axi_id=ID/ perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt,counter=4,axi_mask=ID_MASK,axi_id=ID/ Signed-off-by: Xu Yang <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] [will: Remove redundant error message on platform_get_irq() failure] Signed-off-by: Will Deacon <[email protected]>
1 parent d2e3bb5 commit 55691f9

File tree

3 files changed

+720
-0
lines changed

3 files changed

+720
-0
lines changed

drivers/perf/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ config FSL_IMX8_DDR_PMU
127127
can give information about memory throughput and other related
128128
events.
129129

130+
config FSL_IMX9_DDR_PMU
131+
tristate "Freescale i.MX9 DDR perf monitor"
132+
depends on ARCH_MXC
133+
help
134+
Provides support for the DDR performance monitor in i.MX9, which
135+
can give information about memory throughput and other related
136+
events.
137+
130138
config QCOM_L2_PMU
131139
bool "Qualcomm Technologies L2-cache PMU"
132140
depends on ARCH_QCOM && ARM64 && ACPI

drivers/perf/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
88
obj-$(CONFIG_ARM_PMUV3) += arm_pmuv3.o
99
obj-$(CONFIG_ARM_SMMU_V3_PMU) += arm_smmuv3_pmu.o
1010
obj-$(CONFIG_FSL_IMX8_DDR_PMU) += fsl_imx8_ddr_perf.o
11+
obj-$(CONFIG_FSL_IMX9_DDR_PMU) += fsl_imx9_ddr_perf.o
1112
obj-$(CONFIG_HISI_PMU) += hisilicon/
1213
obj-$(CONFIG_QCOM_L2_PMU) += qcom_l2_pmu.o
1314
obj-$(CONFIG_QCOM_L3_PMU) += qcom_l3_pmu.o

0 commit comments

Comments
 (0)