[kvm-ppc-devel] [PATCH] [v2] Add idle wait support for 44x platforms

Josh Boyer jwboyer at linux.vnet.ibm.com
Tue Apr 8 12:35:58 EST 2008


On Tue, 8 Apr 2008 04:21:44 +0200
Arnd Bergmann <arnd at arndb.de> wrote:

> On Friday 04 April 2008, Jerone Young wrote:
> > > > +int __init ppc44x_idle_init(void)
> > > > +{
> > > > +   void *func = modes[current_mode].entry;
> > > > +   struct device_node *node;
> > > > +
> > > > +   node = of_find_node_by_path("/hypervisor");
> > > > +   if (node) {
> > > > +           /* if we find /hypervisor node is in device tree,
> > > > +              set idle mode to wait */
> > > > +           func = &ppc44x_idle; /* wait */
> > > > +           of_node_put(node);
> > > > +   }
> > > > +
> > > > +   ppc_md.power_save = func;
> > > > +   return 0;
> > > > +}
> > > > +
> > > > +arch_initcall(ppc44x_idle_init);
> > > 
> > > IIRC, this would over-ride the idle_param() below, is that the  
> > > intended behavior?
> > 
> > Yes. At the moment if it detects a hypervisor in the kernel tree it
> > overrides what the command line says.
> > 
> 
> This is unusual behavior. Normally, we try to come up with reasonable
> defaults and give the user the chance to override it.

The /hypervisor check is going away completely in the next version of
the patch.  I've spoken to the HW guys and am more comfortable with
wait being the default.  The spin version should still be an option,
specified by the kernel parameter.

josh



More information about the Linuxppc-dev mailing list