From: Nathan Lynch Date: Fri, 28 Mar 2008 22:10:30 +0000 Subject: Re: [kvm-ppc-devel] [PATCH 1 of 2] Add MSR Wait state to cpu_idle Message-Id: <20080328221030.GM7137@localdomain> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Jerone Young wrote: > On Fri, 2008-03-28 at 16:43 -0500, Hollis Blanchard wrote: > > > #ifdef CONFIG_HOTPLUG_CPU > > > /* this is used for software suspend, and that shuts down > > > @@ -88,6 +90,10 @@ void cpu_idle(void) > > > HMT_low(); > > > HMT_very_low(); > > > } > > > + > > > + /* set wait state MSR */ > > > + msr_save = mfmsr(); > > > + mtmsr(msr_save|MSR_WE); > > > } > > > > > > HMT_medium(); > > > > The code you are modifying is common to all PowerPC kernels. Why didn't > > you use the power_save() hook provided to you? > > > > power_save() is called with interrupts disabled. So we would never wake > up. MSR_WE/POW is implementation-dependent and modifying it in generic code is not okay. You can re-enable interrupts in your power_save implementation before setting MSR_WE (in fact power4_idle does this). ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel