From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Date: Tue, 08 Apr 2008 02:21:44 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] [v2] Add idle wait support for 44x Message-Id: <200804080421.45447.arnd@arndb.de> List-Id: References: <835D8B13-CF90-4013-A172-8243BF93DE52@pobox.com> <1207323761.6634.6.camel@thinkpadL> In-Reply-To: <1207323761.6634.6.camel@thinkpadL> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linuxppc-dev@ozlabs.org, jyoung5@us.ibm.com Cc: kvm-ppc-devel@lists.sourceforge.net, Jimi Xenidis On Friday 04 April 2008, Jerone Young wrote: > > > +int __init ppc44x_idle_init(void) > > > +{ > > > +=A0=A0=A0void *func =3D modes[current_mode].entry; > > > +=A0=A0=A0struct device_node *node; > > > + > > > +=A0=A0=A0node =3D of_find_node_by_path("/hypervisor"); > > > +=A0=A0=A0if (node) { > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0/* if we find /hypervisor node is i= n device tree, > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 set idle mode to wait */ > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0func =3D &ppc44x_idle; /* wait */ > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0of_node_put(node); > > > +=A0=A0=A0} > > > + > > > +=A0=A0=A0ppc_md.power_save =3D func; > > > +=A0=A0=A0return 0; > > > +} > > > + > > > +arch_initcall(ppc44x_idle_init); > >=20 > > IIRC, this would over-ride the idle_param() below, is that the =A0 > > intended behavior? >=20 > Yes. At the moment if it detects a hypervisor in the kernel tree it > overrides what the command line says. >=20 This is unusual behavior. Normally, we try to come up with reasonable defaults and give the user the chance to override it. Arnd <>< ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference=20 Register now and save $200. Hurry, offer ends at 11:59 p.m.,=20 Monday, April 7! Use priority code J8TLD2.=20 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java= one _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by ozlabs.org (Postfix) with ESMTP id E28E3DDECF for ; Tue, 8 Apr 2008 12:27:32 +1000 (EST) From: Arnd Bergmann To: linuxppc-dev@ozlabs.org, jyoung5@us.ibm.com Subject: Re: [kvm-ppc-devel] [PATCH] [v2] Add idle wait support for 44x platforms Date: Tue, 8 Apr 2008 04:21:44 +0200 References: <835D8B13-CF90-4013-A172-8243BF93DE52@pobox.com> <1207323761.6634.6.camel@thinkpadL> In-Reply-To: <1207323761.6634.6.camel@thinkpadL> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200804080421.45447.arnd@arndb.de> Cc: kvm-ppc-devel@lists.sourceforge.net, Jimi Xenidis List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 04 April 2008, Jerone Young wrote: > > > +int __init ppc44x_idle_init(void) > > > +{ > > > +=A0=A0=A0void *func =3D modes[current_mode].entry; > > > +=A0=A0=A0struct device_node *node; > > > + > > > +=A0=A0=A0node =3D of_find_node_by_path("/hypervisor"); > > > +=A0=A0=A0if (node) { > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0/* if we find /hypervisor node is i= n device tree, > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 set idle mode to wait */ > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0func =3D &ppc44x_idle; /* wait */ > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0of_node_put(node); > > > +=A0=A0=A0} > > > + > > > +=A0=A0=A0ppc_md.power_save =3D func; > > > +=A0=A0=A0return 0; > > > +} > > > + > > > +arch_initcall(ppc44x_idle_init); > >=20 > > IIRC, this would over-ride the idle_param() below, is that the =A0 > > intended behavior? >=20 > Yes. At the moment if it detects a hypervisor in the kernel tree it > overrides what the command line says. >=20 This is unusual behavior. Normally, we try to come up with reasonable defaults and give the user the chance to override it. Arnd <><