Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread H. Peter Anvin
Huang, Ying wrote: I think another method is to add a new attribute into GCC to prepend or append something to section name instead of just to replace it, like the example as follow: #define __initdata __attribute__((section_append(".init"))) Same difference, but less flexible. -hp

Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread Huang, Ying
On Thu, 2008-02-21 at 10:53 +0100, Ingo Molnar wrote: > * Huang, Ying <[EMAIL PROTECTED]> 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_i

Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread H. Peter Anvin
Ingo Molnar wrote: 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 linke

Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread Matt Mackall
On Thu, 2008-02-21 at 10:53 +0100, Ingo Molnar wrote: > * Huang, Ying <[EMAIL PROTECTED]> 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_

Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread Ingo Molnar
* Huang, Ying <[EMAIL PROTECTED]> 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

Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread Huang, Ying
On Thu, 2008-02-21 at 10:05 +0100, Ingo Molnar wrote: > * Huang, Ying <[EMAIL PROTECTED]> wrote: > > > Uninitialized variable in init DATA sections are relocated into init > > BSS sections to reduce kernel image size. Several KB can be reduced. > > > -int __initdata early_ioremap_debug; > > +int

Re: [PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread Ingo Molnar
* Huang, Ying <[EMAIL PROTECTED]> wrote: > Uninitialized variable in init DATA sections are relocated into init > BSS sections to reduce kernel image size. Several KB can be reduced. > -int __initdata early_ioremap_debug; > +int __initbss early_ioremap_debug; will we get some sort of build err

[PATCH 2/2] x86 : relocate uninitialized variable in init DATA section into init BSS section

2008-02-21 Thread Huang, Ying
Uninitialized variable in init DATA sections are relocated into init BSS sections to reduce kernel image size. Several KB can be reduced. Signed-off-by: Huang Ying <[EMAIL PROTECTED]> --- arch/x86/kernel/acpi/boot.c | 14 +++--- arch/x86/kernel/aperture_64.c |6 +++---