From: Yinghai Lu Date: Tue, 19 Feb 2008 10:21:45 +0000 (-0800) Subject: x86: fix dma_alloc_pages X-Git-Tag: v3.12-rc1~22316 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6721fc0a0d87019b08384ac798ca7d51bc5fda4e;p=kernel%2Fkernel-generic.git 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 Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c index a82473d..375cb2b 100644 --- a/arch/x86/kernel/pci-dma_64.c +++ b/arch/x86/kernel/pci-dma_64.c @@ -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;