]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf: imx9_perf: make the read-only array mask static const
authorColin Ian King <colin.i.king@gmail.com>
Wed, 11 Jun 2025 13:39:17 +0000 (14:39 +0100)
committerWill Deacon <will@kernel.org>
Fri, 4 Jul 2025 17:05:47 +0000 (18:05 +0100)
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>
drivers/perf/fsl_imx9_ddr_perf.c

index 843f163e6c339e93f5f2fab794cc9cb52d19418b..267754fdf581469642c4485c28a2b00050fe785f 100644 (file)
@@ -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);