2.6.19 randconfig build error
CONFIG_HOTPLUG=yCONFIG_X86_NUMAQ=yCONFIG_NUMA=yCONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_HOTPLUG_CPU=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
# Power management options (ACPI, APM)
# ACPI (Advanced Configuration and Power Interface) Support
==>
mm/built-in.o: In function `add_memory':
(.text+0x24235): undefined reference to arch_add_memory' drivers/built-in.o: In function memory_block_change_state':
memory.c:(.text+0x75a1d): undefined reference to `remove_memory'
make: *** [.tmp_vmlinux1] Error 1
Full config attached.
---
~Randy
Quoted 6 lines
mm/built-in.o: In function `add_memory':
(.text+0x24235): undefined reference toarch_add_memory' drivers/built-in.o: In functionmemory_block_change_state':
memory.c:(.text+0x75a1d): undefined reference to `remove_memory'
make: *** [.tmp_vmlinux1] Error 1
Hmmm. True cause was i386's memory hotplug code didn't support NUMA code. This compile error is fixed by this patch.
But, if CONFIG_ACPI is on, memory_add_physaddr_to_nid() will be cause of another compile error yet, because there is no definition of it. I'll fix it later.
Thanks.
-------------
This patch is to fix compile error when CONFIG_NEED_MULTIPLE_NODES=y and config MEMORY_HOTPLUG=y as followings.
mm/built-in.o: In function `add_memory':
(.text+0x24235): undefined reference to arch_add_memory' drivers/built-in.o: In function memory_block_change_state':
memory.c:(.text+0x75a1d): undefined reference to `remove_memory'
make: *** [.tmp_vmlinux1] Error 1
This is for 2.6.19, and I tested no compile error of it.
--- arch/i386/mm/init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/i386/mm/init.c +1 -3
@@ -681,10 +681,9 @@* memory to the highmem for now. */ #ifdef CONFIG_MEMORY_HOTPLUG -#ifndef CONFIG_NEED_MULTIPLE_NODESint arch_add_memory (int nid,u64 start,u64 size) { - struct pglist_data *pgdata = &contig_page_data; +struct pglist_data *pgdata =NODE_DATA (nid);struct zone *zone = pgdata->node_zones +ZONE_HIGHMEM ;unsigned long start_pfn = start >>PAGE_SHIFT ;unsigned long nr_pages = size >>PAGE_SHIFT ;
@@ -697,7 +696,6 @@ return -EINVAL; }#endif -#endif kmem_cache_t *pgd_cache;kmem_cache_t *pmd_cache;
Signature · 8 lines
Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>