mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mm: pass the vmem_altmap to arch_add_memory and __add_pages
We can just pass this on instead of having to do a radix tree lookup without proper locking 2 levels into the callchain. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
55ce6e23eb
commit
24e6d5a59a
10 changed files with 39 additions and 29 deletions
|
|
@ -382,6 +382,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,
|
|||
if (altmap) {
|
||||
memcpy(&page_map->altmap, altmap, sizeof(*altmap));
|
||||
pgmap->altmap = &page_map->altmap;
|
||||
altmap = pgmap->altmap;
|
||||
}
|
||||
pgmap->ref = ref;
|
||||
pgmap->res = &page_map->res;
|
||||
|
|
@ -427,7 +428,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,
|
|||
goto err_pfn_remap;
|
||||
|
||||
mem_hotplug_begin();
|
||||
error = arch_add_memory(nid, align_start, align_size, false);
|
||||
error = arch_add_memory(nid, align_start, align_size, altmap, false);
|
||||
if (!error)
|
||||
move_pfn_range_to_zone(&NODE_DATA(nid)->node_zones[ZONE_DEVICE],
|
||||
align_start >> PAGE_SHIFT,
|
||||
|
|
|
|||
Loading…
Reference in a new issue