Re: [PATCH] PM: s2idle: Don't allow s2idle when cpuidle isn't supported

From: Kazuki
Date: Wed Mar 15 2023 - 18:07:33 EST


On Tue, Feb 21, 2023 at 04:40:01PM +0100, Rafael J. Wysocki wrote:
> On Tue, Feb 14, 2023 at 11:04 PM Kazuki Hashimoto <kazukih0205@xxxxxxxxx> wrote:
> >
> > s2idle isn't supported on platforms that don't support cpuidle as of
> > 31a3409065d1 ("cpuidle / sleep: Do sanity checks in cpuidle_enter_freeze()
> > too"), so update the suspend framework to reflect this in order to avoid
> > breakages.
>
Hello, apologies for the late reply.
> Hmm. Doesn't the cpuidle_not_available() check in cpuidle_idle_call()
> trigger then?
>
> The commit mentioned above hasn't changed that AFAICS.
Yes it does, but there's nothing in enter_state() that's preventing the
system from entering s2idle. Both the suspend and cpuidle subsystems
need to be aware that the system is entering s2idle, otherwise it'll
result in breakges.

Thanks,
Kazuki