]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: etm4x: Add context synchronization before enabling trace
authorLeo Yan <leo.yan@arm.com>
Tue, 11 Nov 2025 18:58:39 +0000 (18:58 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 11 Nov 2025 21:47:58 +0000 (21:47 +0000)
commit64eb04ae545294e105ad91714dc3167a0b660731
treee6cb0a0cd6c73d42261bba1fc32dc97f890231ed
parent4dc4e22f9536341255f5de6047977a80ff47eaef
coresight: etm4x: Add context synchronization before enabling trace

According to the software usage PKLXF in Arm ARM (ARM DDI 0487 L.a), a
Context synchronization event is required before enabling the trace
unit.

An ISB is added to meet this requirement, particularly for guarding the
operations in the flow:

  etm4x_allow_trace()
   `> kvm_tracing_set_el1_configuration()
`> write_sysreg_s(trfcr_while_in_guest, SYS_TRFCR_EL12)

Improved the barrier comments to provide more accurate information.

Fixes: 1ab3bb9df5e3 ("coresight: etm4x: Add necessary synchronization for sysreg access")
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Yeoreun Yun <yeoreum.yun@arm.com>
Tested-by: James Clark <james.clark@linaro.org>
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-5-f55553b6c8b3@arm.com
drivers/hwtracing/coresight/coresight-etm4x-core.c