coresight: trbe: Fix handling of spurious interrupts
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 23 Sep 2021 14:39:16 +0000 (15:39 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 27 Oct 2021 17:45:28 +0000 (11:45 -0600)
commit7037a39d379733f5352af5e04a202dad35562ef3
tree682942993a15f0c90da29ec4ca3694c9b6feb456
parent85fb92353e0dece18048bdb35c7e6b682129deff
coresight: trbe: Fix handling of spurious interrupts

On a spurious IRQ, right now we disable the TRBE and then re-enable
it back, resetting the "buffer" pointers(i.e BASE, LIMIT and more
importantly WRITE) to the original pointers from the AUX handle.
This implies that we overwrite any trace that was written so far,
(by overwriting TRBPTR) while we should have ignored the IRQ.

On detecting a spurious IRQ after examining the TRBSR we simply
re-enable the TRBE without touching the other parameters.

Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20210923143919.2944311-3-suzuki.poulose@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/hwtracing/coresight/coresight-trbe.c