]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86-64: Micro optimization to dma_alloc_coherent node lookup
authorAndi Kleen <ak@suse.de>
Mon, 12 Sep 2005 16:49:24 +0000 (18:49 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 12 Sep 2005 17:49:57 +0000 (10:49 -0700)
Use pcibus_to_node directly

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/pci-gart.c

index 57f35c68aa34d0eb4255a919e9bca929622feed1..cf0a0315d586a15bc17dcd2de072956a00dc0d2e 100644 (file)
@@ -191,11 +191,9 @@ static void *dma_alloc_pages(struct device *dev, unsigned gfp, unsigned order)
 {
        struct page *page;
        int node;
-       if (dev->bus == &pci_bus_type) {
-               cpumask_t mask;
-               mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
-               node = cpu_to_node(first_cpu(mask));
-       } else
+       if (dev->bus == &pci_bus_type)
+               node = pcibus_to_node(to_pci_dev(dev)->bus);
+       else
                node = numa_node_id();
        page = alloc_pages_node(node, gfp, order);
        return page ? page_address(page) : NULL;