diff options
author | Andi Kleen <ak@suse.de> | 2005-09-12 12:49:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 13:49:57 -0400 |
commit | 117090b5e815d0075bff85c2be954d68a11ac4ed (patch) | |
tree | d1eeba143c17dbf5ae6d4baf45efcaa3229e80b1 /arch/x86_64/kernel/pci-gart.c | |
parent | 1d3fbbf9fe8d5cd5f94256781cc69a4ac289a767 (diff) |
[PATCH] x86-64: Micro optimization to dma_alloc_coherent node lookup
Use pcibus_to_node directly
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/pci-gart.c')
-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; |