android_kernel_xiaomi_sm8450/drivers/perf
Robin Murphy 23f6efd226 perf/arm-cmn: Fix DTC reset
[ Upstream commit 71746c995cac92fcf6a65661b51211cf2009d7f0 ]

It turns out that my naive DTC reset logic fails to work as intended,
since, after checking with the hardware designers, the PMU actually
needs to be fully enabled in order to correctly clear any pending
overflows. Therefore, invert the sequence to start with turning on both
enables so that we can reliably get the DTCs into a known state, then
moving to our normal counters-stopped state from there. Since all the
DTM counters have already been unpaired during the initial discovery
pass, we just need to additionally reset the cycle counters to ensure
that no other unexpected overflows occur during this period.

Fixes: 0ba64770a2 ("perf: Add Arm CMN-600 PMU driver")
Reported-by: Geoff Blake <blakgeof@amazon.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/0ea4559261ea394f827c9aee5168c77a60aaee03.1684946389.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-27 08:43:33 +02:00
..
hisilicon drivers/perf: hisi: Add missing include of linux/module.h 2020-09-07 14:05:11 +01:00
arm_dsu_pmu.c perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init() 2023-01-14 10:15:12 +01: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/arm_pmu_platform: fix tests for platform_get_irq() failure 2022-09-20 12:38:32 +02:00
arm_pmu.c arm_pmu: Validate single/group leader events 2022-04-27 13:53:55 +02:00
arm_smmuv3_pmu.c perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init() 2023-01-14 10:15:12 +01:00
arm_spe_pmu.c drivers/perf: arm_spe: Fix consistency of SYS_PMSCR_EL1.CX 2022-08-21 15:15:36 +02: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 DTC reset 2023-07-27 08:43:33 +02:00
fsl_imx8_ddr_perf.c perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant 2022-04-20 09:23:24 +02:00
Kconfig perf: Add Arm CMN-600 PMU driver 2020-09-28 18:50:20 +01:00
Makefile perf: Add Arm CMN-600 PMU driver 2020-09-28 18:50:20 +01:00
qcom_l2_pmu.c perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator 2022-04-13 21:01:09 +02: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