coresight: etm4x: Fix accesses to TRCSEQRSTEVR and TRCSEQSTR
authorJunhao He <hejunhao3@huawei.com>
Sat, 14 Jan 2023 09:16:32 +0000 (17:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:36 +0000 (09:39 +0100)
commit4f125de654c4b96a033bc704b55034efdf6453ea
tree5b6cc791f7997cdf098f442a55063dcb3eba3db7
parent4ff283009f55f18bbc2a6db04def9e512b8a03d4
coresight: etm4x: Fix accesses to TRCSEQRSTEVR and TRCSEQSTR

[ Upstream commit 589d928248b72f8377d45904a14bcf686aa8bbeb ]

The TRCSEQRSTEVR and TRCSEQSTR registers are not implemented if the
TRCIDR5.NUMSEQSTATE == 0. Skip accessing the registers in such cases.

Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver")
Signed-off-by: Junhao He <hejunhao3@huawei.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230114091632.60095-1-hejunhao3@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-etm4x-core.c