Skip to content

Commit ac9aa29

Browse files
Xu Yangwilldeacon
authored andcommitted
perf: imx_perf: fix counter start and config sequence
In current driver, the counter will start firstly and then be configured. This sequence is not correct for AXI filter events since the correct AXI_MASK and AXI_ID are not set yet. Then the results may be inaccurate. Reviewed-by: Frank Li <[email protected]> Fixes: 55691f9 ("drivers/perf: imx_ddr: Add support for NXP i.MX9 SoC DDRC PMU driver") cc: [email protected] Signed-off-by: Xu Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent fab5e5a commit ac9aa29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/perf/fsl_imx9_ddr_perf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,12 @@ static int ddr_perf_event_add(struct perf_event *event, int flags)
541541
hwc->idx = counter;
542542
hwc->state |= PERF_HES_STOPPED;
543543

544-
if (flags & PERF_EF_START)
545-
ddr_perf_event_start(event, flags);
546-
547544
/* read trans, write trans, read beat */
548545
imx93_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2);
549546

547+
if (flags & PERF_EF_START)
548+
ddr_perf_event_start(event, flags);
549+
550550
return 0;
551551
}
552552

0 commit comments

Comments
 (0)