linux-mips
[Top] [All Lists]

Re: [PATCH][MIPS] fix section mismatch prom_free_prom_memory()

To: yoichi_yuasa@tripeaks.co.jp
Subject: Re: [PATCH][MIPS] fix section mismatch prom_free_prom_memory()
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sun, 22 Jul 2007 23:44:20 +0900 (JST)
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
In-reply-to: <20070722130046.085e0f8d.yoichi_yuasa@tripeaks.co.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070722130046.085e0f8d.yoichi_yuasa@tripeaks.co.jp>
Sender: linux-mips-bounce@linux-mips.org
On Sun, 22 Jul 2007 13:00:46 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> 
wrote:
> Fix section mismatch prom_free_prom_memory().
> 
> WARNING: vmlinux.o(.text+0xbf20): Section mismatch: reference to
> .init.text:prom_free_prom_memory (between 'free_initmem' and 
> 'copy_from_user_page')

prom_free_prom_memory() is called _before_ freeing init sections, so
it is false positive.  __init_refok can be used for such cases.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 4c80528..b8cb0dd 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -484,7 +484,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
 }
 #endif
 
-void free_initmem(void)
+void __init_refok free_initmem(void)
 {
        prom_free_prom_memory();
        free_init_pages("unused kernel memory",

<Prev in Thread] Current Thread [Next in Thread>