[PATCH] compile error of register_memory()
authorYasunori Goto <y-goto@jp.fujitsu.com>
Fri, 22 Dec 2006 09:09:54 +0000 (01:09 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 22 Dec 2006 16:55:49 +0000 (08:55 -0800)
register_memory() becomes double definition in 2.6.20-rc1.  It is defined
in arch/i386/kernel/setup.c as static definition in 2.6.19.  But it is
moved to arch/i386/kernel/e820.c in 2.6.20-rc1.  And same name function is
defined in driver/base/memory.c too.  So, it becomes cause of compile error
of duplicate definition if memory hotplug option is on.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/e820.c
arch/i386/kernel/setup.c
include/asm-i386/e820.h

index 2f7d0a92fd7cbbb53d5eabc34c8ce5e6e7be8557..f391abcf7da901d2b4320eb2618dc53feddf63c1 100644 (file)
@@ -668,7 +668,7 @@ void __init register_bootmem_low_pages(unsigned long max_low_pfn)
        }
 }
 
-void __init register_memory(void)
+void __init e820_register_memory(void)
 {
        unsigned long gapstart, gapsize, round;
        unsigned long long last;
index 79df6e612dbd03a20bfcc959dbb1ceba7158c1dd..6f6cb7b31d18a6384f7debe36040fd4ae80ff07e 100644 (file)
@@ -639,7 +639,7 @@ void __init setup_arch(char **cmdline_p)
                get_smp_config();
 #endif
 
-       register_memory();
+       e820_register_memory();
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
index 395077aba583000b5a22fe55f6dad22b04938c48..c5b8fc6109d6cc0bc4214a347cc2c7583cbe0029 100644 (file)
@@ -40,7 +40,7 @@ extern int e820_all_mapped(unsigned long start, unsigned long end,
                           unsigned type);
 extern void find_max_pfn(void);
 extern void register_bootmem_low_pages(unsigned long max_low_pfn);
-extern void register_memory(void);
+extern void e820_register_memory(void);
 extern void limit_regions(unsigned long long size);
 extern void print_memory_map(char *who);