Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / i386 / pci / acpi.c
index 2db65ec..b33aea8 100644 (file)
@@ -2,17 +2,31 @@
 #include <linux/acpi.h>
 #include <linux/init.h>
 #include <linux/irq.h>
-#include <asm/hw_irq.h>
+#include <asm/numa.h>
 #include "pci.h"
 
 struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum)
 {
+       struct pci_bus *bus;
+
        if (domain != 0) {
                printk(KERN_WARNING "PCI: Multiple domains not supported\n");
                return NULL;
        }
 
-       return pcibios_scan_root(busnum);
+       bus = pcibios_scan_root(busnum);
+#ifdef CONFIG_ACPI_NUMA
+       if (bus != NULL) {
+               int pxm = acpi_get_pxm(device->handle);
+               if (pxm >= 0) {
+                       bus->sysdata = (void *)(unsigned long)pxm_to_node(pxm);
+                       printk("bus %d -> pxm %d -> node %ld\n",
+                               busnum, pxm, (long)(bus->sysdata));
+               }
+       }
+#endif
+       
+       return bus;
 }
 
 extern int pci_routeirq;
@@ -30,6 +44,7 @@ static int __init pci_acpi_init(void)
        acpi_irq_penalty_init();
        pcibios_scanned++;
        pcibios_enable_irq = acpi_pci_irq_enable;
+       pcibios_disable_irq = acpi_pci_irq_disable;
 
        if (pci_routeirq) {
                /*
@@ -38,7 +53,7 @@ static int __init pci_acpi_init(void)
                 * don't use pci_enable_device().
                 */
                printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n");
-               while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+               for_each_pci_dev(dev)
                        acpi_pci_irq_enable(dev);
        } else
                printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\".  If it helps, post a report\n");