提交 f6855f7f 编写于 作者: Y Yinghai Lu 提交者: Thomas Gleixner

x86: use dev_to_node() to get node for device in dma_alloc_pages()

use dev_to_node() to get node for device in dma_alloc_pages().
Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
Acked-by: NChristoph Lameter <clameter@sgi.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 8f8ae1a7
...@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) ...@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
{ {
struct page *page; struct page *page;
int node; int node;
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type) node = dev_to_node(dev);
node = pcibus_to_node(to_pci_dev(dev)->bus); if (node == -1)
else
#endif
node = numa_node_id(); node = numa_node_id();
if (node < first_node(node_online_map)) if (node < first_node(node_online_map))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册