coresight: trbe: irq handler: Do not disable TRBE if no action is needed
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 23 Sep 2021 14:39:15 +0000 (15:39 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 27 Oct 2021 17:45:27 +0000 (11:45 -0600)
commit85fb92353e0dece18048bdb35c7e6b682129deff
treec929709398367b88c277e4086acad201b637a61e
parent04a37a174e5697d90c129c286bdb6bbcb516058f
coresight: trbe: irq handler: Do not disable TRBE if no action is needed

The IRQ handler of the TRBE driver could race against the update_buffer()
in consuming the  IRQ. So, if the update_buffer() gets to processing the
TRBE irq, the TRBSR will be cleared. Thus by the time IRQ handler is
triggered, there is nothing to do there. Handle these cases and do not
disable the TRBE unnecessarily. Since the TRBSR can be read without
stopping the TRBE, we can check that before disabling the TRBE.

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