diff options
| author | Leo Yan <leo.yan@arm.com> | 2025-11-11 21:58:40 +0300 |
|---|---|---|
| committer | Suzuki K Poulose <suzuki.poulose@arm.com> | 2025-11-12 00:47:58 +0300 |
| commit | 1fdc2cd347a7bc58acacb6144404ee892cea6c2e (patch) | |
| tree | b37bceeb4c00c3c0e64b4a3a5b3043816d1600ad /scripts | |
| parent | 64eb04ae545294e105ad91714dc3167a0b660731 (diff) | |
| download | linux-1fdc2cd347a7bc58acacb6144404ee892cea6c2e.tar.xz | |
coresight: etm4x: Properly control filter in CPU idle with FEAT_TRF
If a CPU supports FEAT_TRF, as described in the section K5.5 "Context
switching", Arm ARM (ARM DDI 0487 L.a), it defines a flow to prohibit
program-flow trace, execute a TSB CSYNC instruction for flushing,
followed by clearing TRCPRGCTLR.EN bit.
To restore the state, the reverse sequence is required.
This differs from the procedure described in the section 3.4.1 "The
procedure when powering down the PE" of ARM IHI0064H.b, which involves
the OS Lock to prevent external debugger accesses and implicitly
disables trace.
To be compatible with different ETM versions, explicitly control trace
unit using etm4_disable_trace_unit() and etm4_enable_trace_unit()
during CPU idle to comply with FEAT_TRF.
As a result, the save states for TRFCR_ELx and trcprgctlr are redundant,
remove them.
Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states")
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Tested-by: James Clark <james.clark@linaro.org>
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20251111-arm_coresight_power_management_fix-v6-6-f55553b6c8b3@arm.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
