aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/init_64.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-29 08:53:58 +0100
committerDan Williams <dan.j.williams@intel.com>2018-01-08 11:46:23 -0800
commita8fc357b2875da8732c91eb085862a0648d82767 (patch)
treef0c78fe50e93716475f91968dcbba9ff0d3166b4 /arch/powerpc/mm/init_64.c
parentmm: pass the vmem_altmap to memmap_init_zone (diff)
downloadlinux-dev-a8fc357b2875da8732c91eb085862a0648d82767.tar.xz
linux-dev-a8fc357b2875da8732c91eb085862a0648d82767.zip
mm: split altmap memory map allocation from normal case
No functional changes, just untangling the call chain and document why the altmap is passed around the hotplug code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch/powerpc/mm/init_64.c')
-rw-r--r--arch/powerpc/mm/init_64.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index db7d4e092157..7a2251d99ed3 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -200,7 +200,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
if (vmemmap_populated(start, page_size))
continue;
- p = __vmemmap_alloc_block_buf(page_size, node, altmap);
+ if (altmap)
+ p = altmap_alloc_block_buf(page_size, altmap);
+ else
+ p = vmemmap_alloc_block_buf(page_size, node);
if (!p)
return -ENOMEM;