From: Yasunori Goto This is tiny update for Mel-san's comment about memory hotplug with sparse-vmemmap. - Add __meminit to sparse_mem_map_populate() - Add a comment. Signed-off-by: Yasunori Goto Cc: Andy Whitcroft Cc: Christoph Lameter Cc: Mel Gorman Signed-off-by: Andrew Morton --- mm/sparse-vmemmap.c | 2 +- mm/sparse.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff -puN mm/sparse-vmemmap.c~memory-hotplug-hot-add-with-sparsemem-vmemmap-update mm/sparse-vmemmap.c --- a/mm/sparse-vmemmap.c~memory-hotplug-hot-add-with-sparsemem-vmemmap-update +++ a/mm/sparse-vmemmap.c @@ -137,7 +137,7 @@ int __meminit vmemmap_populate_basepages return 0; } -struct page *sparse_mem_map_populate(unsigned long pnum, int nid) +struct page * __meminit sparse_mem_map_populate(unsigned long pnum, int nid) { struct page *map = pfn_to_page(pnum * PAGES_PER_SECTION); int error = vmemmap_populate(map, PAGES_PER_SECTION, nid); diff -puN mm/sparse.c~memory-hotplug-hot-add-with-sparsemem-vmemmap-update mm/sparse.c --- a/mm/sparse.c~memory-hotplug-hot-add-with-sparsemem-vmemmap-update +++ a/mm/sparse.c @@ -326,6 +326,7 @@ void __init sparse_init(void) static inline struct page *kmalloc_section_memmap(unsigned long pnum, int nid, unsigned long nr_pages) { + /* This will make the necessary allocations eventually. */ return sparse_mem_map_populate(pnum, nid); } static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) _