Commit 6721fc0a authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: fix dma_alloc_pages

memory-less node support:

this patch uses updated dev_to_node, because dev_to_node already makes sure
it returns an online node.
Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ae51801b
......@@ -53,11 +53,6 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
int node;
node = dev_to_node(dev);
if (node == -1)
node = numa_node_id();
if (node < first_node(node_online_map))
node = first_node(node_online_map);
page = alloc_pages_node(node, gfp, order);
return page ? page_address(page) : NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment