[PATCH v6 10/11] coresight: etm4x: Retain sequencer state

Mike Leach mike.leach at linaro.org
Wed Nov 12 01:05:22 PST 2025


On Tue, 11 Nov 2025 at 18:59, Leo Yan <leo.yan at arm.com> wrote:
>
> Retain sequencer state in the disable flow and will be restored in the
> enable flow.
>
> As a result, the flow will be reused by CPU suspend and resume in
> sequential change.
>
> Tested-by: James Clark <james.clark at linaro.org>
> Signed-off-by: Leo Yan <leo.yan at arm.com>
> ---
>  drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> index 8b85a73e29f407a8d5e26a25f4dceaadaeed05ed..afee54ac0aec0c0e521fa1885a95f48555a369de 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> @@ -1034,6 +1034,10 @@ static void etm4_disable_hw(struct etmv4_drvdata *drvdata)
>                         etm4x_relaxed_read32(csa, TRCCNTVRn(i));
>         }
>
> +       /* read back the sequencer state */
> +       if (drvdata->nrseqstate)
> +               config->seq_state = etm4x_relaxed_read32(csa, TRCSEQSTR);
> +
>         coresight_disclaim_device_unlocked(csdev);
>         etm4_cs_lock(drvdata, csa);
>
>
> --
> 2.34.1
>

Reviewed-by: Mike Leach <mike.leach at linaro.org>

--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK



More information about the linux-arm-kernel mailing list