]> git.ipfire.org Git - thirdparty/linux.git/commit
coresight: etm4x: Remove the state_needs_restore flag
authorLeo Yan <leo.yan@arm.com>
Tue, 11 Nov 2025 18:58:42 +0000 (18:58 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 12 Nov 2025 16:53:19 +0000 (16:53 +0000)
commit9e9182cab5ebc3ee7544e60ef08ba19fdf216920
treebfea171354a02b05ea98b23a4ce886e22eaad724
parenta5e6f584dab0c450e27616433d41cc38fc062ecd
coresight: etm4x: Remove the state_needs_restore flag

When the restore flow is invoked, it means no error occurred during the
save phase. Otherwise, if any errors happened while saving the context,
the function would return an error and abort the suspend sequence.

Therefore, the state_needs_restore flag is unnecessary. The save and
restore functions are changed to check two conditions:

1) The global flag pm_save_enable is SELF_HOSTED mode;
2) The device is in active mode (non DISABLED).

Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
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-8-f55553b6c8b3@arm.com
drivers/hwtracing/coresight/coresight-etm4x-core.c
drivers/hwtracing/coresight/coresight-etm4x.h