coresight: etm4x: Safe access for TRCQCLTR
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Fri, 12 Apr 2024 14:27:01 +0000 (15:27 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 22 Apr 2024 10:23:51 +0000 (11:23 +0100)
commit46bf8d7cd8530eca607379033b9bc4ac5590a0cd
tree4563b0573bdd3912631031fe40d807d58d94fbef
parent5eb3a0c2c52368cb9902e9a6ea04888e093c487d
coresight: etm4x: Safe access for TRCQCLTR

ETM4x implements TRCQCLTR only when the Q elements are supported
and the Q element filtering is supported (TRCIDR0.QFILT). Access
to the register otherwise could be fatal. Fix this by tracking the
availability, like the others.

Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states")
Reported-by: Yabin Cui <yabinc@google.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Tested-by: Yabin Cui <yabinc@google.com>
Link: https://lore.kernel.org/r/20240412142702.2882478-4-suzuki.poulose@arm.com
drivers/hwtracing/coresight/coresight-etm4x-core.c
drivers/hwtracing/coresight/coresight-etm4x.h