diff for duplicates of <200804011414.07549.arnd@arndb.de> diff --git a/a/1.txt b/N1/1.txt index 6d75cc8..f6b97ca 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,34 +1,34 @@ On Monday 31 March 2008, Jerone Young wrote: -> > +> >=20 > > > +{ -> > > + unsigned long msr_save; +> > > +=A0=A0=A0unsigned long msr_save; > > > + -> > > + /* set wait state MSR */ -> > > + local_irq_enable(); -> > > + msr_save = mfmsr(); -> > > + mtmsr(msr_save|MSR_WE); -> > +> > > +=A0=A0=A0/* set wait state MSR */ +> > > +=A0=A0=A0local_irq_enable(); +> > > +=A0=A0=A0msr_save =3D mfmsr(); +> > > +=A0=A0=A0mtmsr(msr_save|MSR_WE); +> >=20 > > Why don't you |MSR_WE|MSR_EE at the same time? -> +>=20 > You technically can do this. But the question is do all 4xx cpus use > MSR_EE to enable interrupts? I can assume they do (from what I know), > but figured it would be safer to make the local_irq_enable() call. > I can change it to just set the MSR_EE bit though, since all 4xx cpus > (as far as I know) use it. -For correctness reasons, you actually have to set both EE and WE +=46or correctness reasons, you actually have to set both EE and WE simultaneously. Otherwise, an interrupt can come in between the two mtmsr(), mark some thread as runnable and then go to sleep here without ever checking need_resched() until the next interrupt, which may take an indefinite time. -> > -> > > + local_irq_disable(); +> >=20 +> > > +=A0=A0=A0local_irq_disable(); > > > +} -> > +> >=20 > > None of the other power_save() implementations need this. In fact many > > of them don't even seem to return; they just loop around mtmsr. -> +>=20 > Sure it can be removed. Though with the comment in the mach_dep > structure about power_save. It specifically says that interrupts are off > when it is called. So I was following it here mainly. But I can remove @@ -46,7 +46,7 @@ void ppc4xx_idle() { unsigned long msr_save; - msr_save = mfmsr(); + msr_save =3D mfmsr(); /* enter idle mode */ mtmsr(msr_save|MSR_WE|MSR_EE); /* disable interrupts again */ @@ -54,13 +54,3 @@ void ppc4xx_idle() } Arnd <>< - -------------------------------------------------------------------------- -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 diff --git a/a/content_digest b/N1/content_digest index f564f66..f0d5313 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,7 +3,7 @@ "ref\01206982322.9165.7.camel@thinkpadL\0" "From\0Arnd Bergmann <arnd@arndb.de>\0" "Subject\0Re: [kvm-ppc-devel] [PATCH] Add idle power save for ppc 4xx\0" - "Date\0Tue, 01 Apr 2008 12:14:07 +0000\0" + "Date\0Tue, 1 Apr 2008 14:14:07 +0200\0" "To\0kvm-ppc-devel@lists.sourceforge.net" " jyoung5@us.ibm.com\0" "Cc\0linuxppc-dev@ozlabs.org" @@ -11,36 +11,36 @@ "\00:1\0" "b\0" "On Monday 31 March 2008, Jerone Young wrote:\n" - "> > \n" + "> >=20\n" "> > > +{\n" - "> > > +\302\240\302\240\302\240unsigned long msr_save;\n" + "> > > +=A0=A0=A0unsigned long msr_save;\n" "> > > +\n" - "> > > +\302\240\302\240\302\240/* set wait state MSR */\n" - "> > > +\302\240\302\240\302\240local_irq_enable();\n" - "> > > +\302\240\302\240\302\240msr_save = mfmsr();\n" - "> > > +\302\240\302\240\302\240mtmsr(msr_save|MSR_WE);\n" - "> > \n" + "> > > +=A0=A0=A0/* set wait state MSR */\n" + "> > > +=A0=A0=A0local_irq_enable();\n" + "> > > +=A0=A0=A0msr_save =3D mfmsr();\n" + "> > > +=A0=A0=A0mtmsr(msr_save|MSR_WE);\n" + "> >=20\n" "> > Why don't you |MSR_WE|MSR_EE at the same time?\n" - "> \n" + ">=20\n" "> You technically can do this. But the question is do all 4xx cpus use\n" "> MSR_EE to enable interrupts? I can assume they do (from what I know),\n" "> but figured it would be safer to make the local_irq_enable() call.\n" "> I can change it to just set the MSR_EE bit though, since all 4xx cpus\n" "> (as far as I know) use it.\n" "\n" - "For correctness reasons, you actually have to set both EE and WE\n" + "=46or correctness reasons, you actually have to set both EE and WE\n" "simultaneously. Otherwise, an interrupt can come in between the two\n" "mtmsr(), mark some thread as runnable and then go to sleep here\n" "without ever checking need_resched() until the next interrupt,\n" "which may take an indefinite time.\n" "\n" - "> > \n" - "> > > +\302\240\302\240\302\240local_irq_disable();\n" + "> >=20\n" + "> > > +=A0=A0=A0local_irq_disable();\n" "> > > +}\n" - "> > \n" + "> >=20\n" "> > None of the other power_save() implementations need this. In fact many\n" "> > of them don't even seem to return; they just loop around mtmsr.\n" - "> \n" + ">=20\n" "> Sure it can be removed. Though with the comment in the mach_dep\n" "> structure about power_save. It specifically says that interrupts are off\n" "> when it is called. So I was following it here mainly. But I can remove\n" @@ -58,23 +58,13 @@ "{\n" " unsigned long msr_save;\n" "\n" - " msr_save = mfmsr();\n" + " msr_save =3D mfmsr();\n" "\t/* enter idle mode */\n" " mtmsr(msr_save|MSR_WE|MSR_EE);\n" "\t/* disable interrupts again */\n" " mtmsr(msr_save);\n" "}\n" "\n" - "\tArnd <><\n" - "\n" - "-------------------------------------------------------------------------\n" - "Check out the new SourceForge.net Marketplace.\n" - "It's the best place to buy or sell services for\n" - "just about anything Open Source.\n" - "http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace\n" - "_______________________________________________\n" - "kvm-ppc-devel mailing list\n" - "kvm-ppc-devel@lists.sourceforge.net\n" - https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel + "\tArnd <><" -4db06e75bce45234d3ae69d81e5861b98baa7be5441e23ab1ee9575ac67c3505 +2dcb3c054a8b9fdbba6d9a95ce10910ae19bc0898e53800da8450bb13ff85ffb
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.