Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7eff93b7 authored by Dan Williams's avatar Dan Williams
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 7c683941
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {