perf: imx9_perf: make the read-only array mask static const
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/perf/fsl_imx9_ddr_perf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/perf/fsl_imx9_ddr_perf.c +5 -3
@@ -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 );
Signature · 1 line
2.49.0
Quoted 4 lines · Colin Ian King
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 <[email protected]>
Reviewed-by Frank Li <[email protected]>
Quoted 26 lines
--- drivers/perf/fsl_imx9_ddr_perf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/perf/fsl_imx9_ddr_perf.c +5
-4@@ -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 ); --2.49.0
Quoted 4 lines · Colin Ian King
Don't populate the read-only array mask on the stack at run time, instead make it static const.
Applied to will (for-next/perf), thanks!
[1/1] perf: imx9_perf: make the read-only array mask static const
https://git.kernel.org/will/c/b6e37b27bf68
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev