Commit e0dc3a53 authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds

memory hotplug fix: fix section mismatch in vmammap_allock_block()

Fixes section mismatch below.

WARNING: vmlinux.o(.text+0x946b5): Section mismatch: reference to .init.text:'
__alloc_bootmem_node (between 'vmemmap_alloc_block' and 'vmemmap_pgd_populate')
Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 164e217c
...@@ -34,6 +34,16 @@ ...@@ -34,6 +34,16 @@
* or to back the page tables that are used to create the mapping. * or to back the page tables that are used to create the mapping.
* Uses the main allocators if they are available, else bootmem. * Uses the main allocators if they are available, else bootmem.
*/ */
static void * __init_refok __earlyonly_bootmem_alloc(int node,
unsigned long size,
unsigned long align,
unsigned long goal)
{
return __alloc_bootmem_node(NODE_DATA(node), size, align, goal);
}
void * __meminit vmemmap_alloc_block(unsigned long size, int node) void * __meminit vmemmap_alloc_block(unsigned long size, int node)
{ {
/* If the main allocator is up use that, fallback to bootmem. */ /* If the main allocator is up use that, fallback to bootmem. */
...@@ -44,7 +54,7 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node) ...@@ -44,7 +54,7 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node)
return page_address(page); return page_address(page);
return NULL; return NULL;
} else } else
return __alloc_bootmem_node(NODE_DATA(node), size, size, return __earlyonly_bootmem_alloc(node, size, size,
__pa(MAX_DMA_ADDRESS)); __pa(MAX_DMA_ADDRESS));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment