linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] early_pfn_to_nid needs to be __meminit
@ 2007-05-09 16:25 Stephen Rothwell
  2007-05-09 16:51 ` Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit) Gabriel Paubert
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2007-05-09 16:25 UTC (permalink / raw)
  To: LKML; +Cc: ppc-dev, Andrew Morton, paulus

since it is referenced by memmap_init_zone (which is __meminit) via the
early_pfn_in_nid macro when CONFIG_NODES_SPAN_OTHER_NODES is set (which
basically means PowerPC 64).

This removes a section mismatch warning in those circumstances.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/page_alloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6fd0b74..3297fa9 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2298,7 +2298,7 @@ static int __meminit next_active_region_index_in_nid(int index, int nid)
  * was used and there are no special requirements, this is a convenient
  * alternative
  */
-int __init early_pfn_to_nid(unsigned long pfn)
+int __meminit early_pfn_to_nid(unsigned long pfn)
 {
 	int i;
 
-- 
1.5.1.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit)
  2007-05-09 16:25 [PATCH] early_pfn_to_nid needs to be __meminit Stephen Rothwell
@ 2007-05-09 16:51 ` Gabriel Paubert
  2007-05-09 19:45   ` Linas Vepstas
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel Paubert @ 2007-05-09 16:51 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, Andrew Morton, paulus, LKML

On Thu, May 10, 2007 at 02:25:52AM +1000, Stephen Rothwell wrote:
> since it is referenced by memmap_init_zone (which is __meminit) via the
> early_pfn_in_nid macro when CONFIG_NODES_SPAN_OTHER_NODES is set (which
> basically means PowerPC 64).
> 
> This removes a section mismatch warning in those circumstances.

Speaking of this, I just tried to compile an official (Linus' git tree) 
kernel for my old PMac G4 and I get a lot of section mismatch warnings at 
the end of the compilation:

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  MODPOST vmlinux
WARNING: "fee_restarts" [arch/powerpc/kernel/built-in] is COMMON symbol
WARNING: "ee_restarts" [arch/powerpc/kernel/built-in] is COMMON symbol
WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from dt_string_start (offset 0x8)
WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from dt_string_end (offset 0xc)
...
WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from dt_struct_end (offset 0x20c)
WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from disp_BAT (offset 0x234)
WARNING: "primary_pteg_full" [arch/powerpc/mm/built-in] is COMMON symbol
WARNING: "next_slot" [arch/powerpc/mm/built-in] is COMMON symbol
WARNING: "htab_hash_searches" [arch/powerpc/mm/built-in] is COMMON symbol
WARNING: arch/powerpc/mm/built-in.o - Section mismatch: reference to .init.text:early_get_page from .text between 'pte_alloc_one_kernel' (at offset 0xf50) and 'v_mapped_by_bats'
WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init.data:.got2 from  (offset 0x0)
...
WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init.text:pmac_pcibios_after_init from .machine.desc after 'mach_powermac' (at offset 0xc4)
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at
offset 0x1de88) and 'kmem_cache_shrink'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at
offset 0x1dec0) and 'kmem_cache_shrink'

I find these 50 or so warnings so scary that I've not yet tried 
to boot the kernel. Note that this is a non-modular kernel.

	Gabriel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit)
  2007-05-09 16:51 ` Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit) Gabriel Paubert
@ 2007-05-09 19:45   ` Linas Vepstas
  2007-05-09 19:58     ` Josh Boyer
  0 siblings, 1 reply; 5+ messages in thread
From: Linas Vepstas @ 2007-05-09 19:45 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: Stephen Rothwell, Andrew Morton, paulus, LKML, ppc-dev

On Wed, May 09, 2007 at 06:51:15PM +0200, Gabriel Paubert wrote:
> On Thu, May 10, 2007 at 02:25:52AM +1000, Stephen Rothwell wrote:
> > This removes a section mismatch warning in those circumstances.
> 
> Speaking of this, I just tried to compile an official (Linus' git tree) 
> kernel for my old PMac G4 and I get a lot of section mismatch warnings at 
> the end of the compilation:
> 
> WARNING: arch/powerpc/mm/built-in.o - Section mismatch: reference to .init.text:early_get_page from .text between 'pte_alloc_one_kernel' (at offset 0xf50) and 'v_mapped_by_bats'
> 
> I find these 50 or so warnings so scary that I've not yet tried 
> to boot the kernel. Note that this is a non-modular kernel.

I'm getting oodles of these on an older -mm2 tree. The kernels seem to
work fine. Yes, they should be fixed but I'm up to my proverbial eyballs
in alligators.

--linas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit)
  2007-05-09 19:45   ` Linas Vepstas
@ 2007-05-09 19:58     ` Josh Boyer
  2007-05-10  5:41       ` Yasunori Goto
  0 siblings, 1 reply; 5+ messages in thread
From: Josh Boyer @ 2007-05-09 19:58 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: Stephen Rothwell, LKML, ppc-dev, paulus, Andrew Morton

On Wed, 2007-05-09 at 14:45 -0500, Linas Vepstas wrote:
> On Wed, May 09, 2007 at 06:51:15PM +0200, Gabriel Paubert wrote:
> > On Thu, May 10, 2007 at 02:25:52AM +1000, Stephen Rothwell wrote:
> > > This removes a section mismatch warning in those circumstances.
> > 
> > Speaking of this, I just tried to compile an official (Linus' git tree) 
> > kernel for my old PMac G4 and I get a lot of section mismatch warnings at 
> > the end of the compilation:
> > 
> > WARNING: arch/powerpc/mm/built-in.o - Section mismatch: reference to .init.text:early_get_page from .text between 'pte_alloc_one_kernel' (at offset 0xf50) and 'v_mapped_by_bats'
> > 
> > I find these 50 or so warnings so scary that I've not yet tried 
> > to boot the kernel. Note that this is a non-modular kernel.
> 
> I'm getting oodles of these on an older -mm2 tree. The kernels seem to
> work fine. Yes, they should be fixed but I'm up to my proverbial eyballs
> in alligators.

Yeah, I see all kinds of this too.  Does anyone have an idea why they're
being spit out?  Or if it's related to a particular binutils version,
etc?

josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit)
  2007-05-09 19:58     ` Josh Boyer
@ 2007-05-10  5:41       ` Yasunori Goto
  0 siblings, 0 replies; 5+ messages in thread
From: Yasunori Goto @ 2007-05-10  5:41 UTC (permalink / raw)
  To: Josh Boyer
  Cc: Stephen Rothwell, Sam Ravnborg, LKML, ppc-dev, paulus,
	Andrew Morton

Add to CC: Sam-san. :-)

> On Wed, 2007-05-09 at 14:45 -0500, Linas Vepstas wrote:
> > On Wed, May 09, 2007 at 06:51:15PM +0200, Gabriel Paubert wrote:
> > > On Thu, May 10, 2007 at 02:25:52AM +1000, Stephen Rothwell wrote:
> > > > This removes a section mismatch warning in those circumstances.
> > > 
> > > Speaking of this, I just tried to compile an official (Linus' git tree) 
> > > kernel for my old PMac G4 and I get a lot of section mismatch warnings at 
> > > the end of the compilation:
> > > 
> > > WARNING: arch/powerpc/mm/built-in.o - Section mismatch: reference to .init.text:early_get_page from .text between 'pte_alloc_one_kernel' (at offset 0xf50) and 'v_mapped_by_bats'
> > > 
> > > I find these 50 or so warnings so scary that I've not yet tried 
> > > to boot the kernel. Note that this is a non-modular kernel.
> > 
> > I'm getting oodles of these on an older -mm2 tree. The kernels seem to
> > work fine. Yes, they should be fixed but I'm up to my proverbial eyballs
> > in alligators.
> 
> Yeah, I see all kinds of this too.  Does anyone have an idea why they're
> being spit out?  Or if it's related to a particular binutils version,
> etc?

These warnings are showed by scripts/mod/modposts.c. 
It checks section mismatch stricter than before.

Some of them are not defined as __init even if it's called at just
boottime. This is simple to fix.

Second case is that the functions judge which functions
should call (boottime or normal) by themselves.
pte_alloc_one_kernel() looks its case.
In this case, they must be registered in whitelist of modpost.c

Other possibility is they are just rare called functions.
It should be investigated....

Bye.

-- 
Yasunori Goto 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-10  6:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-09 16:25 [PATCH] early_pfn_to_nid needs to be __meminit Stephen Rothwell
2007-05-09 16:51 ` Section mismatch warnings (was Re: [PATCH] early_pfn_to_nid needs to be __meminit) Gabriel Paubert
2007-05-09 19:45   ` Linas Vepstas
2007-05-09 19:58     ` Josh Boyer
2007-05-10  5:41       ` Yasunori Goto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).