Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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: KAMEZAWA Hiroyuki <>
Cc: Kamalesh Babulal <>
Cc: Andy Whitcroft <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
  • Loading branch information...
commit e0dc3a53def41efeabb3f39ad8e9f67e81ca1025 1 parent 164e217
KAMEZAWA Hiroyuki authored Linus Torvalds committed
Showing with 11 additions and 1 deletion.
  1. +11 −1 mm/sparse-vmemmap.c
12 mm/sparse-vmemmap.c
@@ -34,6 +34,16 @@
* or to back the page tables that are used to create the mapping.
* 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)
/* 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)
return page_address(page);
return NULL;
} else
- return __alloc_bootmem_node(NODE_DATA(node), size, size,
+ return __earlyonly_bootmem_alloc(node, size, size,
Please sign in to comment.
Something went wrong with that request. Please try again.