[PATCH v10 17/20] coresight: trbe: Save and restore state across CPU low power state

Leo Yan leo.yan at arm.com
Thu Apr 9 08:54:33 PDT 2026


On Thu, Apr 09, 2026 at 11:52:06AM +0100, James Clark wrote:
> On 05/04/2026 4:02 pm, Leo Yan wrote:
> > From: Yabin Cui <yabinc at google.com>
> > 
> > TRBE context can be lost when a CPU enters low power states.  If a trace
> > source is restored while TRBE is not, tracing may run without an active
> > sink, which can lead to hangs on some devices (e.g., Pixel 9).
> 
> Can't this still happen if saving the source times out on "wait for
> TRCSTATR.IDLE to go up"?
> 
> That would make coresight_pm_save() exit early, not saving the active TRBE
> state. Then when coresight_pm_restore() is called it restores a stale
> inactive sink, then enables the source again which is the state that can
> hang.

Hmm... I don't expect this to happen anyway.

If CPU PM enter fails and returns an error, it will bail out early of
the idle flow and the CPU will not proceed entering low power states;
therefore, the restore flow does not exist.

Thanks,
Leo



More information about the linux-arm-kernel mailing list