[patch] powerpc: remove do-nothing cpu setup routines

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue May 9 10:28:34 EST 2006


On Mon, 2006-05-08 at 17:16 -0700, Geoff Levand wrote:
> Segher Boessenkool wrote:
> >>> Removes the processor specific do-nothing routines  
> >>> __setup_cpu_power3 and
> >>> __setup_cpu_power4 with the generic routine __setup_cpu_null.
> >>
> >> Why not just change the caller to test for NULL ?
> 
> OK, I see the 32 bit version already does this, but I'm
> wondering if there is some restriction on the instruction
> sequence between the compare and the branch.  Here's what's
> there:
> 
> 	lwz	r5,CPU_SPEC_SETUP(r4)
> 	cmpi	0,r5,0
> 	add	r5,r5,r3
> 	beqlr
> 	mtctr	r5
> 	bctr
> 
> But, could this also be:
> 
> 	lwz	r5,CPU_SPEC_SETUP(r4)
> 	cmpi	0,r5,0
> 	beqlr
> 	add	r5,r5,r3
> 	mtctr	r5
> 	bctr

Just an optimisation for a code path that doesn't really need any :)
Blame habits...

Ben.





More information about the Linuxppc-dev mailing list