]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
coresight: etm4x: Correct polling IDLE bit
authorLeo Yan <leo.yan@arm.com>
Tue, 11 Nov 2025 18:58:38 +0000 (18:58 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 11 Nov 2025 21:47:58 +0000 (21:47 +0000)
Since commit 4ff6039ffb79 ("coresight-etm4x: add isb() before reading
the TRCSTATR"), the code has incorrectly been polling the PMSTABLE bit
instead of the IDLE bit.

This commit corrects the typo.

Fixes: 4ff6039ffb79 ("coresight-etm4x: add isb() before reading the TRCSTATR")
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-4-f55553b6c8b3@arm.com
drivers/hwtracing/coresight/coresight-etm4x-core.c

index 1324b40d54210078b70a760ac1b084a4b20e8770..c562f82985192ad71e181be1b570c9a2f334f29f 100644 (file)
@@ -1924,7 +1924,7 @@ static int __etm4_cpu_save(struct etmv4_drvdata *drvdata)
                state->trcpdcr = etm4x_read32(csa, TRCPDCR);
 
        /* wait for TRCSTATR.IDLE to go up */
-       if (etm4x_wait_status(csa, TRCSTATR_PMSTABLE_BIT, 1)) {
+       if (etm4x_wait_status(csa, TRCSTATR_IDLE_BIT, 1)) {
                dev_err(etm_dev,
                        "timeout while waiting for Idle Trace Status\n");
                etm4_os_unlock(drvdata);