VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / arch / i386 / pci / acpi.c
1 #include <linux/pci.h>
2 #include <linux/acpi.h>
3 #include <linux/init.h>
4 #include <linux/irq.h>
5 #include <asm/hw_irq.h>
6 #include "pci.h"
7
8 struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum)
9 {
10         if (domain != 0) {
11                 printk(KERN_WARNING "PCI: Multiple domains not supported\n");
12                 return NULL;
13         }
14
15         return pcibios_scan_root(busnum);
16 }
17
18 static int __init pci_acpi_init(void)
19 {
20         struct pci_dev *dev = NULL;
21
22         if (pcibios_scanned)
23                 return 0;
24
25         if (acpi_noirq)
26                 return 0;
27
28         printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
29         acpi_irq_penalty_init();
30         pcibios_scanned++;
31         pcibios_enable_irq = acpi_pci_irq_enable;
32
33         /*
34          * PCI IRQ routing is set up by pci_enable_device(), but we
35          * also do it here in case there are still broken drivers that
36          * don't use pci_enable_device().
37          */
38         while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
39                 acpi_pci_irq_enable(dev);
40
41 #ifdef CONFIG_X86_IO_APIC
42         if (acpi_ioapic)
43                 print_IO_APIC();
44 #endif
45
46         return 0;
47 }
48 subsys_initcall(pci_acpi_init);