]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: ete: Always save state on power down
authorJames Clark <james.clark@linaro.org>
Tue, 5 May 2026 16:51:25 +0000 (17:51 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 7 May 2026 13:40:25 +0000 (14:40 +0100)
commit2ab4645fe4206c142a5f1491e191c906279686cf
tree92855c1046d465aeaca4189a4d1507ceb2f04e61
parentf195d54deef1bc6dd3326394975baff02c7ae487
coresight: ete: Always save state on power down

System register ETMs and ETE are unlikely to be preserved on CPU power
down. The ETE DT binding also never documented
"arm,coresight-loses-context-with-cpu" so nobody would have legitimately
been able to use that binding to fix it and ACPI has no such binding at
all.

Fix it by hard coding the setting for sysreg ETMs (ETE is always sysreg)
or ACPI boots. Use a local variable when setting up save_state so that
it's immune to concurrent probing when devices have different
configurations which is an issue with modifying the global.

This fixes the following error when using Coresight with ACPI on the FVP
which supports CPU PM:

  coresight ete0: External agent took claim tag
  WARNING: drivers/hwtracing/coresight/coresight-core.c:248 at coresight_disclaim_device_unlocked+0xe0/0xe8, CPU#0: perf/117

Fixes: 35e1c9163e02 ("coresight: ete: Add support for ETE tracing")
Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20260505-james-cs-ete-pm_save_enable-v3-1-485d21dd79b8@linaro.org
drivers/hwtracing/coresight/coresight-etm4x-core.c