[PATCH v10 17/20] coresight: trbe: Save and restore state across CPU low power state
James Clark
james.clark at linaro.org
Fri Apr 10 01:45:21 PDT 2026
On 09/04/2026 4:54 pm, Leo Yan wrote:
> 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
Ah ok I missed that that was how it behaved. I didn't realise that an
error here would prevent the restore from being called. That makes my
other comments redundant as well then.
More information about the linux-arm-kernel
mailing list