]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix dma_alloc_pages
authorYinghai Lu <Yinghai.Lu@Sun.COM>
Tue, 19 Feb 2008 10:21:45 +0000 (02:21 -0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 21 Mar 2008 16:06:14 +0000 (17:06 +0100)
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>
arch/x86/kernel/pci-dma_64.c

index a82473d192a31b830eea331c07fb043dd9849343..375cb2bc45be9a1f6bbf42c4666a739002d88c4e 100644 (file)
@@ -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;