All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: kvm-ppc-devel@lists.sourceforge.net
Subject: Re: [kvm-ppc-devel] [PATCH] Add idle wait support for 44x platforms
Date: Tue, 08 Apr 2008 02:17:36 +0000	[thread overview]
Message-ID: <200804080417.37272.arnd@arndb.de> (raw)
In-Reply-To: <20080404064741.69f8669b@zod.rchland.ibm.com>

On Friday 04 April 2008, Josh Boyer wrote:
> On Fri, 04 Apr 2008 01:12:38 -0500
> Jerone Young <jyoung5@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.

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

	Arnd <><

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: kvm-ppc-devel@lists.sourceforge.net
Subject: Re: [PATCH] Add idle wait support for 44x platforms
Date: Tue, 8 Apr 2008 04:17:36 +0200	[thread overview]
Message-ID: <200804080417.37272.arnd@arndb.de> (raw)
In-Reply-To: <20080404064741.69f8669b@zod.rchland.ibm.com>

On Friday 04 April 2008, Josh Boyer wrote:
> On Fri, 04 Apr 2008 01:12:38 -0500
> Jerone Young <jyoung5@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.

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

	Arnd <><

  reply	other threads:[~2008-04-08  2:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03 22:43 [kvm-ppc-devel] [PATCH] Add idle wait support for 44x platforms Jerone Young
2008-04-03 22:43 ` Jerone Young
2008-04-03 23:03 ` [kvm-ppc-devel] " Tony Breeds
2008-04-03 23:03   ` Tony Breeds
2008-04-04  1:59   ` [kvm-ppc-devel] " Josh Boyer
2008-04-04  1:59     ` Josh Boyer
2008-04-04  6:12   ` [kvm-ppc-devel] " Jerone Young
2008-04-04  6:12     ` Jerone Young
2008-04-04 11:47     ` [kvm-ppc-devel] " Josh Boyer
2008-04-04 11:47       ` Josh Boyer
2008-04-08  2:17       ` Arnd Bergmann [this message]
2008-04-08  2:17         ` Arnd Bergmann
2008-04-08  2:31         ` [kvm-ppc-devel] " Josh Boyer
2008-04-08  2:31           ` Josh Boyer
2008-04-08  2:41           ` [kvm-ppc-devel] " Arnd Bergmann
2008-04-08  2:41             ` Arnd Bergmann
2008-04-08  2:44             ` [kvm-ppc-devel] " Josh Boyer
2008-04-08  2:44               ` Josh Boyer
2008-04-03 23:13 ` [kvm-ppc-devel] " Hollis Blanchard
2008-04-03 23:13   ` Hollis Blanchard
2008-04-04  0:17   ` Scott Wood
2008-04-04  0:17     ` Scott Wood
2008-04-04  6:15   ` Jerone Young
2008-04-04  6:15     ` Jerone Young
2008-04-04  2:00 ` Josh Boyer
2008-04-04  2:00   ` Josh Boyer
2008-04-04  5:59   ` [kvm-ppc-devel] " Jerone Young
2008-04-04  5:59     ` Jerone Young
2008-04-04 14:33     ` [kvm-ppc-devel] " Hollis Blanchard
2008-04-04 14:33       ` Hollis Blanchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200804080417.37272.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=kvm-ppc-devel@lists.sourceforge.net \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.