coresight: trbe: Work around the trace data corruption
authorAnshuman Khandual <anshuman.khandual@arm.com>
Tue, 25 Jan 2022 14:20:37 +0000 (19:50 +0530)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 22 Feb 2022 15:57:00 +0000 (15:57 +0000)
commit7f4cd33759066c760cbdf303cb4ca0e9f610604d
tree70ddf0d0dbfc8b43c1539465fc8b55a7b587e5c0
parent0ecf2c7474379568dd99eaa6b07788afa0d23d77
coresight: trbe: Work around the trace data corruption

TRBE implementations affected by Arm erratum #1902691 might corrupt trace
data or deadlock, when it's being written into the memory. Workaround this
problem in the driver, by preventing TRBE initialization on affected cpus.
The firmware must have disabled the access to TRBE for the kernel on such
implementations. This will cover the kernel for any firmware that doesn't
do this already. This just updates the TRBE driver as required.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Cc: linux-doc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/1643120437-14352-8-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
arch/arm64/Kconfig
drivers/hwtracing/coresight/coresight-trbe.c