From: mathieu.poirier@linaro.org (Mathieu Poirier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] coresight: tmc: Fix byte-address alignment for RRP
Date: Tue, 11 Sep 2018 13:54:51 -0600 [thread overview]
Message-ID: <20180911195451.GB17613@xps15> (raw)
In-Reply-To: <1536652366-17119-2-git-send-email-leo.yan@linaro.org>
On Tue, Sep 11, 2018 at 03:52:45PM +0800, Leo Yan wrote:
> From the comment in the code, it claims the requirement for byte-address
> alignment for RRP register: 'for 32-bit, 64-bit and 128-bit wide trace
> memory, the four LSBs must be 0s. For 256-bit wide trace memory, the
> five LSBs must be 0s'. This isn't consistent with the program, the
> program sets five LSBs as zeros for 32/64/128-bit wide trace memory and
> set six LSBs zeros for 256-bit wide trace memory.
>
> After checking with the CoreSight Trace Memory Controller technical
> reference manual (ARM DDI 0461B, section 3.3.4 RAM Read Pointer
> Register), it proves the comment is right and the program does wrong
> setting.
>
> This patch fixes byte-address alignment for RRP by following correct
> definition in the technical reference manual.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Mike Leach <mike.leach@linaro.org>
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
> drivers/hwtracing/coresight/coresight-tmc-etf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
> index 4bf3bfd..b54a3db 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c
> @@ -417,10 +417,10 @@ static unsigned long tmc_update_etf_buffer(struct coresight_device *csdev,
> case TMC_MEM_INTF_WIDTH_32BITS:
> case TMC_MEM_INTF_WIDTH_64BITS:
> case TMC_MEM_INTF_WIDTH_128BITS:
> - mask = GENMASK(31, 5);
> + mask = GENMASK(31, 4);
> break;
> case TMC_MEM_INTF_WIDTH_256BITS:
> - mask = GENMASK(31, 6);
> + mask = GENMASK(31, 5);
> break;
> }
>
> --
> 2.7.4
>
Applied.
Thanks,
Mathieu
next prev parent reply other threads:[~2018-09-11 19:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 7:52 [PATCH v2 0/2] CoreSight: tmc-etf: Fixes for updating buffer Leo Yan
2018-09-11 7:52 ` [PATCH v2 1/2] coresight: tmc: Fix byte-address alignment for RRP Leo Yan
2018-09-11 19:54 ` Mathieu Poirier [this message]
2018-09-11 7:52 ` [PATCH v2 2/2] coresight: tmc: Fix writing barrier packets for ring buffer Leo Yan
2018-09-11 19:54 ` Mathieu Poirier
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=20180911195451.GB17613@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.