diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-10-05 20:35:56 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-10-09 17:00:33 -0400 |
commit | 538ea4aa44737127ce2b5c8511c7349d2abdcf9c (patch) | |
tree | 51bd65690420cef7d6eb5bf0348588a39dd8c436 /kernel | |
parent | 7eff93b7c99f5d0024aee677c6c92e32af22e1d2 (diff) | |
download | linux-538ea4aa44737127ce2b5c8511c7349d2abdcf9c.tar.bz2 |
pmem, memremap: convert to numa aware allocations
Given that pmem ranges come with numa-locality hints, arrange for the
resulting driver objects to be obtained from node-local memory.
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')
-rw-r--r-- | kernel/memremap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c index 56fc4783879c..3218e8b1fc28 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -114,7 +114,8 @@ void *devm_memremap(struct device *dev, resource_size_t offset, { void **ptr, *addr; - ptr = devres_alloc(devm_memremap_release, sizeof(*ptr), GFP_KERNEL); + ptr = devres_alloc_node(devm_memremap_release, sizeof(*ptr), GFP_KERNEL, + dev_to_node(dev)); if (!ptr) return ERR_PTR(-ENOMEM); @@ -165,8 +166,8 @@ void *devm_memremap_pages(struct device *dev, struct resource *res) if (is_ram == REGION_INTERSECTS) return __va(res->start); - page_map = devres_alloc(devm_memremap_pages_release, - sizeof(*page_map), GFP_KERNEL); + page_map = devres_alloc_node(devm_memremap_pages_release, + sizeof(*page_map), GFP_KERNEL, dev_to_node(dev)); if (!page_map) return ERR_PTR(-ENOMEM); |