[PATCH ] cell: enable pause(0) in cpu_idle

Arnd Bergmann arnd at arndb.de
Fri Dec 16 02:51:52 EST 2005


On Dunnersdag 15 Dezember 2005 16:26, Milton Miller wrote:
> On Dec 15, 2005, at 12:43 AM, Paul Mackerras wrote:
> > Why are you trashing r22 here?  It hasn't been saved.  You probably
> > should use r10 instead, which has been saved.
> 
> I'm just guessing here that they missed the update on
> 
> http://git.kernel.org/git/?p=linux/kernel/git/torvalds/old-2.6- 
> bkcvs.git;a=commitdiff;h=d847914c00b6cef7ad40816a192828cc55fee30d
> [PATCH] ppc64: Optimize exception/syscall entry/exit
> 
> and I missed it because I just looked at the patch and have looked at  
> the old code too much.

Yes, that's right. I never really looked at that code because I did
not understand all of what Max did there, and Max probably did not follow
the commits. I've fixed it now, just need to test it again.

> >> +END_FTR_SECTION_IFSET(CPU_FTR_PAUSE_ZERO)
> >> +	EXCEPTION_PROLOG_COMMON(0x100, PACA_EXGEN);
> >> +	b	fast_exception_return
> >
> > This is a change in behaviour from before the patch.  Instead of doing
> > the EXCEPTION_PROLOG_COMMON and then just returning, you should branch
> > to system_reset_common.
> >
> 
> Actually, this is not the case, as this is only for the MSR_WAKEMT
> case -- they put a bne to the old handler.

No, The change that Paul is referring to is for the case where
CPU_FTR_PAUSE_ZERO is not set. I broke this when I tried to simplify
the branches according to your comments. I now have in there

BEGIN_FTR_SECTION
­·······mr­·····r10,r12    /* r12 has SRR1 saved */
­·······srwi­···r10,r10,16
­·······andi.­··r10,r10,MSR_WAKEMASK
­·······cmpwi­··r10,MSR_WAKEEE
­·······beq­····hardware_interrupt_common
­·······cmpwi­··r10,MSR_WAKEDEC
­·······beq­····decrementer_common
­·······cmpwi­··r10,MSR_WAKEMT
­·······bne­····system_reset_common
­·······EXCEPTION_PROLOG_COMMON(0x100, PACA_EXGEN);
­·······b­······fast_exception_return
END_FTR_SECTION_IFSET(CPU_FTR_PAUSE_ZERO)
­·······b­······system_reset_common

Is there a simpler way to express this?

	Arnd <<<



More information about the Linuxppc64-dev mailing list