]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight-etm4x: add isb() before reading the TRCSTATR
authorYuanfang Zhang <quic_yuanfang@quicinc.com>
Thu, 16 Jan 2025 09:04:20 +0000 (17:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:22 +0000 (14:39 +0200)
commit1315b08f609ee17d8ccccd8fa2e384ba6853e373
treec3637dd1e3ed4abb9c9e8e156b28230e037ac919
parent3a19eb3d9818e28f14c818a18dc913344a52ca92
coresight-etm4x: add isb() before reading the TRCSTATR

[ Upstream commit 4ff6039ffb79a4a8a44b63810a8a2f2b43264856 ]

As recommended by section 4.3.7 ("Synchronization when using system
instructions to progrom the trace unit") of ARM IHI 0064H.b, the
self-hosted trace analyzer must perform a Context synchronization
event between writing to the TRCPRGCTLR and reading the TRCSTATR.
Additionally, add an ISB between the each read of TRCSTATR on
coresight_timeout() when using system instructions to program the
trace unit.

Fixes: 1ab3bb9df5e3 ("coresight: etm4x: Add necessary synchronization for sysreg access")
Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250116-etm_sync-v4-1-39f2b05e9514@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-core.c
drivers/hwtracing/coresight/coresight-etm4x-core.c
include/linux/coresight.h