dma-direct: use node local allocations for coherent memory
To preserve the x86 behavior.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
diff --git a/lib/dma-direct.c b/lib/dma-direct.c
index a9ae98b..f04a424 100644
--- a/lib/dma-direct.c
+++ b/lib/dma-direct.c
@@ -38,7 +38,7 @@
if (gfpflags_allow_blocking(gfp))
page = dma_alloc_from_contiguous(dev, count, page_order, gfp);
if (!page)
- page = alloc_pages(gfp, page_order);
+ page = alloc_pages_node(dev_to_node(dev), gfp, page_order);
if (!page)
return NULL;