]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: don't call pxm_to_node again
authorYinghai Lu <yhlu.kernel.send@gmail.com>
Sat, 19 Apr 2008 08:30:16 +0000 (01:30 -0700)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 09:28:46 +0000 (11:28 +0200)
also make bus_numa work even if ACPI_NUMA is not defined.

don't call pxm_to_node again, and use node directly.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/pci/acpi.c

index ea8685f89bc38929b3c549821c80652a97dd3ee5..28d17a5cfb8d46a8b06127cdcaec1ace50985896 100644 (file)
@@ -171,11 +171,11 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
        if (node != -1)
                set_mp_bus_to_node(busnum, node);
        else
+#endif
                node = get_mp_bus_to_node(busnum);
 
        if (node != -1 && !node_online(node))
                node = -1;
-#endif
 
        /* Allocate per-root-bus (not per bus) arch-specific data.
         * TODO: leak; this memory is never freed.
@@ -207,14 +207,16 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
        if (!bus)
                kfree(sd);
 
+       if (bus && node != -1) {
 #ifdef CONFIG_ACPI_NUMA
-       if (bus) {
-               if (pxm >= 0) {
+               if (pxm >= 0)
                        printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n",
-                               busnum, pxm, pxm_to_node(pxm));
-               }
-       }
+                               busnum, pxm, node);
+#else
+               printk(KERN_DEBUG "bus %02x -> node %d\n",
+                       busnum, node);
 #endif
+       }
 
        if (bus && (pci_probe & PCI_USE__CRS))
                get_current_resources(device, busnum, domain, bus);