Re: [PATCH 01/12] arm64: hibernate.c: create a new function to handle cpu_up(sleep_cpu)

From: Thomas Gleixner
Date: Tue Nov 19 2019 - 18:01:32 EST


On Tue, 19 Nov 2019, Qais Yousef wrote:
> On 11/19/19 23:31, Thomas Gleixner wrote:
> > On Wed, 30 Oct 2019, Qais Yousef wrote:
> > >
> > > +int hibernation_bringup_sleep_cpu(unsigned int sleep_cpu)
> >
> > That function name is horrible. Aside of that I really have to ask how you
> > end up hibernating on an offline CPU?
>
> James Morse can probably explain better.
>
> But AFAIU we could sleep on any CPU, but on the next cold boot that CPU could
> become offline as a side effect of using maxcpus= for example.
>
> How about bringup_hibernate_cpu() as a name? I could add the above as an
> explanation of why we need this call too.
>
> It does seem to me that this is a generic problem that we might be able to
> handle generically, but I'm not sure how.

Don't know about other architectures, but x86 does not have that issue as
we force hibernation on CPU0 for historical reasons (Broken BIOSes etc.).

Thanks,

tglx