Skip to content

Commit

Permalink
x86: fix dma_alloc_pages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Mar 21, 2008
1 parent ae51801 commit 6721fc0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/x86/kernel/pci-dma_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6721fc0

Please sign in to comment.