lkml.org 
[lkml]   [2011]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] powerpc, mm: fix section mismatch for mark_reserved_regions_for_nid
On Fri, 9 Dec 2011, Subrata Modak wrote:

> WARNING: vmlinux.o(.text+0x4c760): Section mismatch in reference from
> the function .mark_reserved_regions_for_nid() to the
> function .meminit.text:.early_pfn_to_nid()
> The function .mark_reserved_regions_for_nid() references
> the function __meminit .early_pfn_to_nid().
> This is often because .mark_reserved_regions_for_nid lacks a __meminit
> annotation or the annotation of .early_pfn_to_nid is wrong.
>
> WARNING: vmlinux.o(.text+0x4c780): Section mismatch in reference from
> the function .mark_reserved_regions_for_nid() to the
> function .init.text:.work_with_active_regions()
> The function .mark_reserved_regions_for_nid() references
> the function __init .work_with_active_regions().
> This is often because .mark_reserved_regions_for_nid lacks a __init
> annotation or the annotation of .work_with_active_regions is wrong.
>
> WARNING: vmlinux.o(.text+0x4c7d4): Section mismatch in reference from
> the function .mark_reserved_regions_for_nid() to the
> function .meminit.text:.early_pfn_to_nid()
> The function .mark_reserved_regions_for_nid() references
> the function __meminit .early_pfn_to_nid().
> This is often because .mark_reserved_regions_for_nid lacks a __meminit
> annotation or the annotation of .early_pfn_to_nid is wrong.
>
> WARNING: vmlinux.o(.text+0x4c7f0): Section mismatch in reference from
> the function .mark_reserved_regions_for_nid() to the
> function .init.text:.work_with_active_regions()
> The function .mark_reserved_regions_for_nid() references
> the function __init .work_with_active_regions().
> This is often because .mark_reserved_regions_for_nid lacks a __init
> annotation or the annotation of .work_with_active_regions is wrong.
>
> WARNING: vmlinux.o(.text+0x4c828): Section mismatch in reference from
> the function .mark_reserved_regions_for_nid() to the
> function .init.text:.reserve_bootmem_node()
> The function .mark_reserved_regions_for_nid() references
> the function __init .reserve_bootmem_node().
> This is often because .mark_reserved_regions_for_nid lacks a __init
> annotation or the annotation of .reserve_bootmem_node is wrong.
>

Wow, lots of ibm folks on the cc :) I can only talk about the mm related
section mismatches, but these five can easily be solved with the
following.


powerpc, mm: fix section mismatch for mark_reserved_regions_for_nid

mark_reserved_regions_for_nid() is only called from do_init_bootmem(),
which is in .init.text, so it must be in the same section to avoid a
section mismatch warning.

Reported-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
arch/powerpc/mm/numa.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -969,7 +969,7 @@ static struct notifier_block __cpuinitdata ppc64_numa_nb = {
.priority = 1 /* Must run before sched domains notifier. */
};

-static void mark_reserved_regions_for_nid(int nid)
+static void __init mark_reserved_regions_for_nid(int nid)
{
struct pglist_data *node = NODE_DATA(nid);
struct memblock_region *reg;

\
 
 \ /
  Last update: 2011-12-08 23:35    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog