summaryrefslogtreecommitdiffstats
path: root/kernel/memremap.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-10-05 20:35:55 -0400
committerDan Williams <dan.j.williams@intel.com>2015-10-09 17:00:33 -0400
commit7eff93b7c99f5d0024aee677c6c92e32af22e1d2 (patch)
treeef6c1fd1eebdb64c742cf73fa575e0088f8933af /kernel/memremap.c
parent7c683941f30a977c10ec6be174ec5f16939c7ce5 (diff)
downloadlinux-7eff93b7c99f5d0024aee677c6c92e32af22e1d2.tar.bz2
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 <ross.zwisler@linux.intel.com> Reviewed-by: Tejun Heo <tj@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'kernel/memremap.c')
-rw-r--r--kernel/memremap.c2
1 files changed, 1 insertions, 1 deletions
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) {