Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / arch / x86 / pci / acpi.c
index d95de2f..19af069 100644 (file)
@@ -171,8 +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
-               node = get_mp_bus_to_node(busnum);
 #endif
+               node = get_mp_bus_to_node(busnum);
+
+       if (node != -1 && !node_online(node))
+               node = -1;
 
        /* Allocate per-root-bus (not per bus) arch-specific data.
         * TODO: leak; this memory is never freed.
@@ -204,22 +207,23 @@ 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);
        return bus;
 }
 
-extern int pci_routeirq;
-static int __init pci_acpi_init(void)
+int __init pci_acpi_init(void)
 {
        struct pci_dev *dev = NULL;
 
@@ -253,4 +257,3 @@ static int __init pci_acpi_init(void)
 
        return 0;
 }
-subsys_initcall(pci_acpi_init);