Re: [patch 05/34] idle: Implement generic idle function

Thomas Gleixner
2013-11-22T22:32:46Z

On Mon, 18 Nov 2013, Viresh Kumar wrote:

> On Fri, Mar 22, 2013 at 3:23 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > --- linux-2.6.orig/kernel/cpu/idle.c
> > +++ linux-2.6/kernel/cpu/idle.c
>
> > +void cpu_startup_entry(enum cpuhp_state state)
> > +{
> > + current_set_polling();
> > + arch_cpu_idle_prepare();
> > + cpu_idle_loop();
> > +}
> > +#endif
>
> Hi Thomas..
>
> Manish (cc'd) recently asked me purpose of _state_ argument in this
> routine, As this is unused here..
>
> Was this reserved for future use?

Yep, if you dig the mail archives you'll find my cpu hotplug series
which tries to convert it to a full state machine. So the state
argument is due to that, because the boot cpu will call into that with
a certain state and we want to allow archs to skip some states even on
secondary cpus. So yes, it's unused, but its there on purpose. It's
going to be used when my work backlog drops down to the cpuhotplug
mess again. About 2 lightyears from now ....

Thanks,

tglx