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>
Fri, 11 Mar 2022 10:07:11 +0000 (10:07 +0000)
commit3a828845ae35626c2c8de4c46f5c602c25bd122d
tree70ddf0d0dbfc8b43c1539465fc8b55a7b587e5c0
parentf209e9fe5bd7614b30b050f2095e80b77b99c333
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>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
arch/arm64/Kconfig
drivers/hwtracing/coresight/coresight-trbe.c