linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Jonathan Zhou <jonathan.zhouwen@huawei.com>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>,
	lizixian@hisilicon.com, Mike Leach <mike.leach@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Suzuki K Poulose <suzuki.poulose@arm.com>
Subject: Re: [PATCH] coresight: etm4x: fix issues on trcseqevr access
Date: Wed, 9 Sep 2020 10:42:46 -0600	[thread overview]
Message-ID: <20200909164246.GD553266@xps15> (raw)
In-Reply-To: <1599043033-57852-1-git-send-email-jonathan.zhouwen@huawei.com>

On Wed, Sep 02, 2020 at 06:37:13PM +0800, Jonathan Zhou wrote:
> The TRCSEQEVR(3) is reserved, using '@nrseqstate - 1' instead to avoid
> accessing the reserved register.
> 
> Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states")
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
> Cc: lizixian@hisilicon.com
> 
> Signed-off-by: Jonathan Zhou <jonathan.zhouwen@huawei.com>
> ---
>  drivers/hwtracing/coresight/coresight-etm4x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I have applied this patch.

Thanks,
Mathieu

> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
> index 96425e818fc2..44e44c817bf8 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x.c
> @@ -1183,7 +1183,7 @@ static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
>  	state->trcvdsacctlr = readl(drvdata->base + TRCVDSACCTLR);
>  	state->trcvdarcctlr = readl(drvdata->base + TRCVDARCCTLR);
>  
> -	for (i = 0; i < drvdata->nrseqstate; i++)
> +	for (i = 0; i < drvdata->nrseqstate - 1; i++)
>  		state->trcseqevr[i] = readl(drvdata->base + TRCSEQEVRn(i));
>  
>  	state->trcseqrstevr = readl(drvdata->base + TRCSEQRSTEVR);
> @@ -1288,7 +1288,7 @@ static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
>  	writel_relaxed(state->trcvdsacctlr, drvdata->base + TRCVDSACCTLR);
>  	writel_relaxed(state->trcvdarcctlr, drvdata->base + TRCVDARCCTLR);
>  
> -	for (i = 0; i < drvdata->nrseqstate; i++)
> +	for (i = 0; i < drvdata->nrseqstate - 1; i++)
>  		writel_relaxed(state->trcseqevr[i],
>  			       drvdata->base + TRCSEQEVRn(i));
>  
> -- 
> 1.9.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2020-09-09 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 10:37 [PATCH] coresight: etm4x: fix issues on trcseqevr access Jonathan Zhou
2020-09-03 17:42 ` Mathieu Poirier
2020-09-07 16:51   ` Mike Leach
2020-09-08  1:39     ` Jonathan Zhou
2020-09-08 17:43     ` Mathieu Poirier
2020-09-09  9:41       ` Mike Leach
2020-09-09 16:32         ` Mathieu Poirier
2020-09-09 16:42 ` Mathieu Poirier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200909164246.GD553266@xps15 \
    --to=mathieu.poirier@linaro.org \
    --cc=jonathan.zhouwen@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lizixian@hisilicon.com \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    --cc=zhangshaokun@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).