[PATCH] Add idle wait support for 44x platforms

Josh Boyer jwboyer at linux.vnet.ibm.com
Tue Apr 8 12:31:27 EST 2008


On Tue, 8 Apr 2008 04:17:36 +0200
Arnd Bergmann <arnd at arndb.de> wrote:

> On Friday 04 April 2008, Josh Boyer wrote:
> > On Fri, 04 Apr 2008 01:12:38 -0500
> > Jerone Young <jyoung5 at us.ibm.com> wrote: 
> > > > 
> > > > > +static int current_mode = 0;
> > > > 
> > > > Leave this as: static int current_mode;, so it'll end up in the bss
> > > 
> > > The problem here is that this defines the default case. Is there really
> > > a benefit having this in bss ?
> > 
> > It's still defined to 0 if it's in the BSS, as that is all initialized
> > to 0.
> 
> Actually, a static assignment to 0 has not caused the symbol to end up
> in .data for many gcc versions, it always goes into .bss now unless you
> assign it a value other than 0 or use explicit section attributes.

IIRC, gcc 3.2 is still supported and it didn't do that.  Old toolchains
still exist.

> Whether or not you write the "= 0" is purely stylistic sugar and does
> not have any impact the generated binary.

Only if you're using a newer gcc version...

josh



More information about the Linuxppc-dev mailing list