linux/drivers/perf
Joakim Zhang 6b46338f22 perf/imx_ddr: Add stop event counters support for i.MX8MP
DDR Perf driver only supports free-running event counters(counter1/2/3)
now, this patch adds support for stop event counters.

Legacy SoCs:
Cycle counter(counter0) is a special counter, only count cycles. When
cycle counter overflow, it will lock all counters and generate an
interrupt. In ddr_perf_irq_handler, disable cycle counter then all
counters would stop at the same time, update all counters' count, then
enable cycle counter that all counters count again. During this process,
only clear cycle counter, no need to clear event counters since they are
free-running counters. They would continue counting after overflow and
do/while loop from ddr_perf_event_update can handle event counters
overflow case.

i.MX8MP:
Almost all is the same as legacy SoCs, the only difference is that, event
counters are not free-running any more. Like cycle counter, when event
counters overflow, they would stop counting unless clear the counter,
and no interrupt generate for event counters. So we should clear event
counters that let them re-count when cycle counter overflow, which ensure
event counters will not lose data.

This patch adds stop event counters support which would be compatible to
free-running event counters. We use the cycle counter to stop overflow
of the event counters.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Link: https://lore.kernel.org/r/20201027104451.15434-1-qiangqing.zhang@nxp.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-11-25 15:14:41 +00:00
..
hisilicon drivers/perf: hisi: Add identifier sysfs file 2020-11-25 15:10:35 +00:00
arm_dmc620_pmu.c driver/perf: Add PMU driver for the ARM DMC-620 memory controller 2020-11-25 14:51:21 +00:00
arm_dsu_pmu.c perf: remove duplicate check on fwnode 2020-11-25 15:02:08 +00:00
arm_pmu_acpi.c drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer 2020-03-02 12:07:35 +00:00
arm_pmu_platform.c perf: Convert to using %pOFn instead of device_node.name 2018-10-01 11:33:17 +01:00
arm_pmu.c arm_pmu: arm64: Use NMIs for PMU 2020-09-28 19:00:17 +01:00
arm_smmuv3_pmu.c perf/smmuv3: Support sysfs identifier file 2020-11-25 15:10:35 +00:00
arm_spe_pmu.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arm-cci.c drivers/perf: Prevent forced unbinding of PMU drivers 2020-07-17 10:51:44 +01:00
arm-ccn.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arm-cmn.c perf: arm-cmn: Fix conversion specifiers for node type 2020-10-01 22:30:07 +01:00
fsl_imx8_ddr_perf.c perf/imx_ddr: Add stop event counters support for i.MX8MP 2020-11-25 15:14:41 +00:00
Kconfig driver/perf: Add PMU driver for the ARM DMC-620 memory controller 2020-11-25 14:51:21 +00:00
Makefile driver/perf: Add PMU driver for the ARM DMC-620 memory controller 2020-11-25 14:51:21 +00:00
qcom_l2_pmu.c It looks like a smaller batch of clk updates this time around. In the core 2020-08-07 13:35:51 -07:00
qcom_l3_pmu.c drivers/perf: Prevent forced unbinding of PMU drivers 2020-07-17 10:51:44 +01:00
thunderx2_pmu.c drivers/perf: thunderx2_pmu: Fix memory resource error handling 2020-09-18 14:34:51 +01:00
xgene_pmu.c drivers/perf: xgene_pmu: Fix uninitialized resource struct 2020-09-18 14:34:51 +01:00