mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 06:15:12 +00:00
coresight: etm4x: Handle TRCVIPCSSCTLR accesses
TRCVIPCSSCTLR is not present if the TRCIDR4.NUMPC > 0. Thus we should only access the register if it is present, preventing any undesired behavior. Cc: stable@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20201127175256.1092685-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6288b4ceca
commit
60c519c5d3
@ -141,8 +141,9 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)
|
||||
writel_relaxed(config->viiectlr, drvdata->base + TRCVIIECTLR);
|
||||
writel_relaxed(config->vissctlr,
|
||||
drvdata->base + TRCVISSCTLR);
|
||||
writel_relaxed(config->vipcssctlr,
|
||||
drvdata->base + TRCVIPCSSCTLR);
|
||||
if (drvdata->nr_pe_cmp)
|
||||
writel_relaxed(config->vipcssctlr,
|
||||
drvdata->base + TRCVIPCSSCTLR);
|
||||
for (i = 0; i < drvdata->nrseqstate - 1; i++)
|
||||
writel_relaxed(config->seq_ctrl[i],
|
||||
drvdata->base + TRCSEQEVRn(i));
|
||||
@ -1202,7 +1203,8 @@ static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
|
||||
state->trcvictlr = readl(drvdata->base + TRCVICTLR);
|
||||
state->trcviiectlr = readl(drvdata->base + TRCVIIECTLR);
|
||||
state->trcvissctlr = readl(drvdata->base + TRCVISSCTLR);
|
||||
state->trcvipcssctlr = readl(drvdata->base + TRCVIPCSSCTLR);
|
||||
if (drvdata->nr_pe_cmp)
|
||||
state->trcvipcssctlr = readl(drvdata->base + TRCVIPCSSCTLR);
|
||||
state->trcvdctlr = readl(drvdata->base + TRCVDCTLR);
|
||||
state->trcvdsacctlr = readl(drvdata->base + TRCVDSACCTLR);
|
||||
state->trcvdarcctlr = readl(drvdata->base + TRCVDARCCTLR);
|
||||
@ -1310,7 +1312,8 @@ static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
||||
writel_relaxed(state->trcvictlr, drvdata->base + TRCVICTLR);
|
||||
writel_relaxed(state->trcviiectlr, drvdata->base + TRCVIIECTLR);
|
||||
writel_relaxed(state->trcvissctlr, drvdata->base + TRCVISSCTLR);
|
||||
writel_relaxed(state->trcvipcssctlr, drvdata->base + TRCVIPCSSCTLR);
|
||||
if (drvdata->nr_pe_cmp)
|
||||
writel_relaxed(state->trcvipcssctlr, drvdata->base + TRCVIPCSSCTLR);
|
||||
writel_relaxed(state->trcvdctlr, drvdata->base + TRCVDCTLR);
|
||||
writel_relaxed(state->trcvdsacctlr, drvdata->base + TRCVDSACCTLR);
|
||||
writel_relaxed(state->trcvdarcctlr, drvdata->base + TRCVDARCCTLR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user