Ubuntu-focal-kernel/drivers/perf
Xu Yang 592817adf1 perf/imx_ddr: don't enable counter0 if none of 4 counters are used
BugLink: https://bugs.launchpad.net/bugs/2040284

[ Upstream commit f4e2bd91ddf5e8543cbe7ad80b3fba3d2dc63fa3 ]

In current driver, counter0 will be enabled after ddr_perf_pmu_enable()
is called even though none of the 4 counters are used. This will cause
counter0 continue to count until ddr_perf_pmu_disabled() is called. If
pmu is not disabled all the time, the pmu interrupt will be asserted
from time to time due to counter0 will overflow and irq handler will
clear it. It's not an expected behavior. This patch will not enable
counter0 if none of 4 counters are used.

Fixes: 9a66d36cc7 ("drivers/perf: imx_ddr: Add DDR performance counter support to perf")
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20230811015438.1999307-2-xu.yang_2@nxp.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2023-10-30 11:42:07 +01:00
..
hisilicon
Kconfig
Makefile
arm-cci.c
arm-ccn.c
arm_dsu_pmu.c perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init() 2023-02-01 15:22:08 +01:00
arm_pmu.c
arm_pmu_acpi.c
arm_pmu_platform.c perf/arm_pmu_platform: fix tests for platform_get_irq() failure 2022-11-24 10:28:20 +01:00
arm_smmuv3_pmu.c perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init() 2023-02-01 15:22:08 +01:00
arm_spe_pmu.c
fsl_imx8_ddr_perf.c perf/imx_ddr: don't enable counter0 if none of 4 counters are used 2023-10-30 11:42:07 +01:00
qcom_l2_pmu.c
qcom_l3_pmu.c
thunderx2_pmu.c
xgene_pmu.c