mm: pass the vmem_altmap to vmemmap_populate
We can just pass this on instead of having to do a radix tree lookup without proper locking a few levels into the callchain. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:

committed by
Dan Williams

parent
24e6d5a59a
commit
7b73d978a5
@@ -278,7 +278,8 @@ int __meminit vmemmap_populate_basepages(unsigned long start,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct page * __meminit sparse_mem_map_populate(unsigned long pnum, int nid)
|
||||
struct page * __meminit sparse_mem_map_populate(unsigned long pnum, int nid,
|
||||
struct vmem_altmap *altmap)
|
||||
{
|
||||
unsigned long start;
|
||||
unsigned long end;
|
||||
@@ -288,7 +289,7 @@ struct page * __meminit sparse_mem_map_populate(unsigned long pnum, int nid)
|
||||
start = (unsigned long)map;
|
||||
end = (unsigned long)(map + PAGES_PER_SECTION);
|
||||
|
||||
if (vmemmap_populate(start, end, nid))
|
||||
if (vmemmap_populate(start, end, nid, altmap))
|
||||
return NULL;
|
||||
|
||||
return map;
|
||||
@@ -318,7 +319,7 @@ void __init sparse_mem_maps_populate_node(struct page **map_map,
|
||||
if (!present_section_nr(pnum))
|
||||
continue;
|
||||
|
||||
map_map[pnum] = sparse_mem_map_populate(pnum, nodeid);
|
||||
map_map[pnum] = sparse_mem_map_populate(pnum, nodeid, NULL);
|
||||
if (map_map[pnum])
|
||||
continue;
|
||||
ms = __nr_to_section(pnum);
|
||||
|
Reference in New Issue
Block a user