From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [patch] powerpc: remove do-nothing cpu setup routines From: Benjamin Herrenschmidt To: Geoff Levand In-Reply-To: <445FDF62.2030008@am.sony.com> References: <445FDF62.2030008@am.sony.com> Content-Type: text/plain Date: Tue, 09 May 2006 10:28:34 +1000 Message-Id: <1147134514.4777.287.camel@localhost.localdomain> Mime-Version: 1.0 Cc: Arnd Bergmann , linuxppc-dev@ozlabs.org, Paul Mackerras , cbe-oss-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.