diff options
author | Steve Clevenger <scclevenger@os.amperecomputing.com> | 2023-02-27 16:54:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 12:10:28 +0200 |
commit | 6facabb4d0695ca7d4a2ebab6db460be388c9dc8 (patch) | |
tree | 47b809469afd3220e21a3b161a3e2d620c9ce89e | |
parent | 7b78445bce52ec0345cb7da1a9beaf47ffa8e9ea (diff) | |
download | linux-stable-6facabb4d0695ca7d4a2ebab6db460be388c9dc8.tar.gz linux-stable-6facabb4d0695ca7d4a2ebab6db460be388c9dc8.tar.bz2 linux-stable-6facabb4d0695ca7d4a2ebab6db460be388c9dc8.zip |
coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug
commit bf84937e882009075f57fd213836256fc65d96bc upstream.
In etm4_enable_hw, fix for() loop range to represent address comparator pairs.
Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver")
Cc: stable@vger.kernel.org
Signed-off-by: Steve Clevenger <scclevenger@os.amperecomputing.com>
Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/4a4ee61ce8ef402615a4528b21a051de3444fb7b.1677540079.git.scclevenger@os.amperecomputing.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 99df453575f5..059c09a925cc 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -179,7 +179,7 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata) writel_relaxed(config->ss_pe_cmp[i], drvdata->base + TRCSSPCICRn(i)); } - for (i = 0; i < drvdata->nr_addr_cmp; i++) { + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) { writeq_relaxed(config->addr_val[i], drvdata->base + TRCACVRn(i)); writeq_relaxed(config->addr_acc[i], |