RE: [PATCH 2/2] firmware: arm_scmi: power_control: Set SCMI_SYSPOWER_IDLE in pm resume

Peng Fan
2025-06-24T01:25:53Z

Hi Sudeep,

> Subject: Re: [PATCH 2/2] firmware: arm_scmi: power_control: Set
> SCMI_SYSPOWER_IDLE in pm resume
>
> On Mon, Jun 23, 2025 at 10:29:57PM +0800, Peng Fan wrote:
> >
> > One more example is
> > Linux suspended, other agent send reboot linux message, Linux
> should
> > wakeup and reboot itself.
> >
> > Same to suspend
> > Linux suspended, other agent send suspend Linux message, Linux
> wakeup
> > and suspend again.
> >
>
> These are very valid requirements and if this is not supported or not
> working as expected, it is a BUG in the current implementation.
>
> As lots of details were discussed in private unfortunately, I suggest you
> to repost the patch with all the additional information discussed there
> for the benefits of all the people following this list or this thread in
> particular. It is unfair to not provide full context on the list.

I will collect the private discussion and post v2 later.

>
> Just to summarise my understanding here at very high level, the issue
> exists as the second notification by an agent to the Linux to suspend
> the system wakes up the system from suspend state. Since the
> interrupts are enabled before the thaw_processes() (which eventually
> continues the execution of scmi_suspend_work_func() to set the state
> to SCMI_SYSPOWER_IDLE, the scmi_userspace_notifier() is executed
> much before and ends up ignoring the request as the state is still not
> set to SCMI_SYSPOWER_IDLE. There is a race which your patch is
> addressing.

Thanks for writing this down, It is very correct and clear.

Thanks,
Peng.

>
> --
> Regards,
> Sudeep