Skip to content

Commit bf84937

Browse files
SCClevenger-ampereSuzuki K Poulose
authored andcommitted
coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug
In etm4_enable_hw, fix for() loop range to represent address comparator pairs. Fixes: 2e1cdfe ("coresight-etm4x: Adding CoreSight ETM4x driver") Cc: [email protected] Signed-off-by: Steve Clevenger <[email protected]> Reviewed-by: James Clark <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/4a4ee61ce8ef402615a4528b21a051de3444fb7b.1677540079.git.scclevenger@os.amperecomputing.com
1 parent eeac8ed commit bf84937

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwtracing/coresight/coresight-etm4x-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)
472472
if (etm4x_sspcicrn_present(drvdata, i))
473473
etm4x_relaxed_write32(csa, config->ss_pe_cmp[i], TRCSSPCICRn(i));
474474
}
475-
for (i = 0; i < drvdata->nr_addr_cmp; i++) {
475+
for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) {
476476
etm4x_relaxed_write64(csa, config->addr_val[i], TRCACVRn(i));
477477
etm4x_relaxed_write64(csa, config->addr_acc[i], TRCACATRn(i));
478478
}

0 commit comments

Comments
 (0)