]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
coresight: tmc: Fix byte-address alignment for RRP
authorLeo Yan <leo.yan@linaro.org>
Thu, 20 Sep 2018 19:18:02 +0000 (13:18 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:49 +0000 (13:16 +0100)
commit1afc144231c13af1ea1d8c405be3bc978e871916
treed15ca78283f12eab579f71e303b3348a9f8cd904
parentfef142a4dfff5de629c38730a0a1f04435e6696e
coresight: tmc: Fix byte-address alignment for RRP

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit e7753f3937610633a540f2be81be87531f96ff04 ]

>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>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hwtracing/coresight/coresight-tmc-etf.c