mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>, Andi Kleen <ak@suse.de>,
	Ian Campbell <ijc@hellion.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section
Date: Thu, 21 Feb 2008 20:18:33 +0800	[thread overview]
Message-ID: <1203596313.14838.62.camel@cinder.waste.org> (raw)
In-Reply-To: <20080221095301.GA29361@elte.hu>


On Thu, 2008-02-21 at 10:53 +0100, Ingo Molnar wrote:
> * Huang, Ying <ying.huang@intel.com> wrote:
> 
> > > > -int __initdata early_ioremap_debug;
> > > > +int __initbss early_ioremap_debug;
> > > 
> > > will we get some sort of build error if we accidentally do:
> > > 
> > >    int __initbss early_ioremap_debug = 1;
> > > 
> > > ?
> > 
> > I tested it just now, and there is no build error.
> 
> well, that's bad. We'd silently ignore the " = 1" and boot up with that 
> value at 0, right? At minimum we need some really prominent build-time 
> _errors_ (i.e. aborted builds) if this ever happens. But ideally, 
> shouldnt this whole thing be done at link time? Couldnt the linker sort 
> the variables that are zero initialized into the right section, and move 
> this constant maintenance pressure off the programmer's shoulder?

I'm not sure if it's possible currently. But it might be possible to
instead tag objects as "init" with an attribute other than section and
then move such objects into init sections "by hand" late in the build.

-- 
Mathematics is the supreme nostalgia of our time.


  reply	other threads:[~2008-02-21 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21  8:15 Huang, Ying
2008-02-21  9:05 ` Ingo Molnar
2008-02-21  9:28   ` Huang, Ying
2008-02-21  9:53     ` Ingo Molnar
2008-02-21 12:18       ` Matt Mackall [this message]
2008-02-21 18:34       ` H. Peter Anvin
2008-02-22  2:38       ` Huang, Ying
2008-02-22  2:42         ` H. Peter Anvin

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=1203596313.14838.62.camel@cinder.waste.org \
    --to=mpm@selenic.com \
    --cc=ak@suse.de \
    --cc=hpa@zytor.com \
    --cc=ijc@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=ying.huang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®