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: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Yinghai Lu 2008-02-19 02:21:45 -08:00 committed by Ingo Molnar
parent ae51801ba5
commit 6721fc0a0d

View File

@ -53,11 +53,6 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
int node; int node;
node = dev_to_node(dev); 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); page = alloc_pages_node(node, gfp, order);
return page ? page_address(page) : NULL; return page ? page_address(page) : NULL;