diff options
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 57f35c68aa34..cf0a0315d586 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -191,11 +191,9 @@ static void *dma_alloc_pages(struct device *dev, unsigned gfp, unsigned order) | |||
191 | { | 191 | { |
192 | struct page *page; | 192 | struct page *page; |
193 | int node; | 193 | int node; |
194 | if (dev->bus == &pci_bus_type) { | 194 | if (dev->bus == &pci_bus_type) |
195 | cpumask_t mask; | 195 | node = pcibus_to_node(to_pci_dev(dev)->bus); |
196 | mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); | 196 | else |
197 | node = cpu_to_node(first_cpu(mask)); | ||
198 | } else | ||
199 | node = numa_node_id(); | 197 | node = numa_node_id(); |
200 | page = alloc_pages_node(node, gfp, order); | 198 | page = alloc_pages_node(node, gfp, order); |
201 | return page ? page_address(page) : NULL; | 199 | return page ? page_address(page) : NULL; |