2 #include <linux/acpi.h>
3 #include <linux/init.h>
5 #include <asm/hw_irq.h>
9 struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum)
14 printk(KERN_WARNING "PCI: Multiple domains not supported\n");
18 bus = pcibios_scan_root(busnum);
19 #ifdef CONFIG_ACPI_NUMA
21 int pxm = acpi_get_pxm(device->handle);
23 bus->sysdata = (void *)(unsigned long)pxm_to_node(pxm);
24 printk("bus %d -> pxm %d -> node %ld\n",
25 busnum, pxm, (long)(bus->sysdata));
33 extern int pci_routeirq;
34 static int __init pci_acpi_init(void)
36 struct pci_dev *dev = NULL;
44 printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
45 acpi_irq_penalty_init();
47 pcibios_enable_irq = acpi_pci_irq_enable;
48 pcibios_disable_irq = acpi_pci_irq_disable;
52 * PCI IRQ routing is set up by pci_enable_device(), but we
53 * also do it here in case there are still broken drivers that
54 * don't use pci_enable_device().
56 printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n");
57 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
58 acpi_pci_irq_enable(dev);
60 printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n");
62 #ifdef CONFIG_X86_IO_APIC
69 subsys_initcall(pci_acpi_init);