From: Dan Williams Date: Tue, 6 Oct 2015 00:35:55 +0000 (-0400) Subject: devm_memremap_pages: use numa_mem_id X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7eff93b7c99f5d0024aee677c6c92e32af22e1d2;p=openwrt%2Fstaging%2Fblogic.git devm_memremap_pages: use numa_mem_id Hint to closest numa node for the placement of newly allocated pages. As that is where the device's other allocations will originate by default when it does not specify a NUMA node. Cc: Ross Zwisler Reviewed-by: Tejun Heo Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- diff --git a/kernel/memremap.c b/kernel/memremap.c index 0d818ce04129..56fc4783879c 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -174,7 +174,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res) nid = dev_to_node(dev); if (nid < 0) - nid = 0; + nid = numa_mem_id(); error = arch_add_memory(nid, res->start, resource_size(res), true); if (error) {