perf: ti_k3_ddr: Add TI K3 DDR performance monitor driver
Subsystems (2)
RFC PATCH 7/22 perf: ti_k3_ddr: Add TI K3 DDR performance monitor driver
From: Aarya Chaumal <[email protected]>
Add a PMU driver for the DDR subsystem performance counters on TI K3 SoCs (J721E, J721S2, J7200, J784S4, AM62, AM62A, AM62P, AM64).
The Cadence DDR controller provides 4 hardware counters, each programmable to count one of 36 events: read/write commands, activates, refreshes, precharges, power-down/self-refresh cycles, bus turnarounds, address collisions, and FIFO utilization cycles.
Each DDR controller registers as a separate PMU named k3_ddr<N> and exposes an identifier sysfs attribute that jevents uses to select the correct JSON event table for the SoC.
--- drivers/perf/Kconfig | 11 + drivers/perf/Makefile | 1 + drivers/perf/ti_k3_ddr_perf.c | 532 ++++++++++++++++++++++++++++++++++ 3 files changed, 544 insertions(+) create mode 100644 drivers/perf/ti_k3_ddr_perf.c
drivers/perf/Kconfig +11 -0
@@ -273,6 +273,17 @@ config ALIBABA_UNCORE_DRW_PMU source "drivers/perf/hisilicon/Kconfig" +config TI_K3_DDR_PMU + tristate "Texas Instruments K3 DDR perf monitor" + depends on MFD_TI_DDRSS + help + Say Y here to enable the DDR performance monitor on TI K3 SoCs. + Exposes DDR read/write and other memory throughput events via perf. + Supports J721E, J721S2, J7200, J784S4, AM62, AM62A, AM62P, AM64. + + To compile this driver as a module, choose M here: the module + will be called ti_k3_ddr_perf. + config MARVELL_CN10K_DDR_PMU tristate "Enable MARVELL CN10K DRAM Subsystem(DSS) PMU Support" depends on ARCH_THUNDER || (COMPILE_TEST && 64BIT)
drivers/perf/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_ARM_DMC620_PMU) += arm_dmc620_pmu.o obj-$(CONFIG_MARVELL_CN10K_TAD_PMU) += marvell_cn10k_tad_pmu.o obj-$(CONFIG_MARVELL_CN10K_DDR_PMU) += marvell_cn10k_ddr_pmu.o obj-$(CONFIG_MARVELL_PEM_PMU) += marvell_pem_pmu.o +obj-$(CONFIG_TI_K3_DDR_PMU) += ti_k3_ddr_perf.o obj-$(CONFIG_APPLE_M1_CPU_PMU) += apple_m1_cpu_pmu.o obj-$(CONFIG_ALIBABA_UNCORE_DRW_PMU) += alibaba_uncore_drw_pmu.o obj-$(CONFIG_DWC_PCIE_PMU) += dwc_pcie_pmu.o
drivers/perf/ti_k3_ddr_perf.c new file +532 -0
532 lines not on this page · raw message
Signature · 1 line
2.34.1
RFC PATCH 8/22 docs: perf: Add TI K3 DDR PMU documentation
From: Aarya Chaumal <[email protected]>
Add documentation for the TI K3 DDR PMU driver describing the counter layout, supported events and perf tool usage examples.
--- Documentation/admin-guide/perf/index.rst | 1 + Documentation/admin-guide/perf/k3-ddr.rst | 57 +++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Documentation/admin-guide/perf/k3-ddr.rst
Documentation/admin-guide/perf/index.rst +1 -0
@@ -31,3 +31,4 @@ Performance monitor support ampere_cspmu mrvl-pem-pmu fujitsu_uncore_pmu + k3-ddr
Documentation/admin-guide/perf/k3-ddr.rst new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
2.34.1