summaryrefslogtreecommitdiff
path: root/drivers/perf/fsl_imx9_ddr_perf.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2025-06-11 14:39:17 +0100
committerWill Deacon <will@kernel.org>2025-07-04 18:05:47 +0100
commitb6e37b27bf6802fd4ec1446e05058da4e1ddce64 (patch)
treed58f00e88c6a239711a08560671fa4bb195c73c2 /drivers/perf/fsl_imx9_ddr_perf.c
parent8b177e9a4ecd09f2ae15b952cd88a0a3344ee5a0 (diff)
perf: imx9_perf: make the read-only array mask static const
Don't populate the read-only array mask on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250611133917.170888-1-colin.i.king@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/fsl_imx9_ddr_perf.c')
-rw-r--r--drivers/perf/fsl_imx9_ddr_perf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c
index 843f163e6c33..267754fdf581 100644
--- a/drivers/perf/fsl_imx9_ddr_perf.c
+++ b/drivers/perf/fsl_imx9_ddr_perf.c
@@ -461,9 +461,11 @@ static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int event,
int counter, int axi_id, int axi_mask)
{
u32 pmcfg1, pmcfg2;
- u32 mask[] = { MX93_PMCFG1_RD_TRANS_FILT_EN,
- MX93_PMCFG1_WR_TRANS_FILT_EN,
- MX93_PMCFG1_RD_BT_FILT_EN };
+ static const u32 mask[] = {
+ MX93_PMCFG1_RD_TRANS_FILT_EN,
+ MX93_PMCFG1_WR_TRANS_FILT_EN,
+ MX93_PMCFG1_RD_BT_FILT_EN
+ };
pmcfg1 = readl_relaxed(pmu->base + PMCFG1);