2 #include <linux/acpi.h>
3 #include <linux/init.h>
9 static int __devinit
can_skip_ioresource_align(struct dmi_system_id
*d
)
11 pci_probe
|= PCI_CAN_SKIP_ISA_ALIGN
;
12 printk(KERN_INFO
"PCI: %s detected, can skip ISA alignment\n", d
->ident
);
16 static struct dmi_system_id acpi_pciprobe_dmi_table
[] = {
18 * Systems where PCI IO resource ISA alignment can be skipped
19 * when the ISA enable bit in the bridge control is not set
22 .callback
= can_skip_ioresource_align
,
23 .ident
= "IBM System x3800",
25 DMI_MATCH(DMI_SYS_VENDOR
, "IBM"),
26 DMI_MATCH(DMI_PRODUCT_NAME
, "x3800"),
30 .callback
= can_skip_ioresource_align
,
31 .ident
= "IBM System x3850",
33 DMI_MATCH(DMI_SYS_VENDOR
, "IBM"),
34 DMI_MATCH(DMI_PRODUCT_NAME
, "x3850"),
38 .callback
= can_skip_ioresource_align
,
39 .ident
= "IBM System x3950",
41 DMI_MATCH(DMI_SYS_VENDOR
, "IBM"),
42 DMI_MATCH(DMI_PRODUCT_NAME
, "x3950"),
48 struct pci_bus
* __devinit
pci_acpi_scan_root(struct acpi_device
*device
, int domain
, int busnum
)
51 struct pci_sysdata
*sd
;
54 dmi_check_system(acpi_pciprobe_dmi_table
);
56 /* Allocate per-root-bus (not per bus) arch-specific data.
57 * TODO: leak; this memory is never freed.
58 * It's arguable whether it's worth the trouble to care.
60 sd
= kzalloc(sizeof(*sd
), GFP_KERNEL
);
62 printk(KERN_ERR
"PCI: OOM, not probing PCI bus %02x\n", busnum
);
67 printk(KERN_WARNING
"PCI: Multiple domains not supported\n");
74 pxm
= acpi_get_pxm(device
->handle
);
75 #ifdef CONFIG_ACPI_NUMA
77 sd
->node
= pxm_to_node(pxm
);
80 bus
= pci_scan_bus_parented(NULL
, busnum
, &pci_root_ops
, sd
);
84 #ifdef CONFIG_ACPI_NUMA
87 printk("bus %d -> pxm %d -> node %d\n",
88 busnum
, pxm
, sd
->node
);
96 extern int pci_routeirq
;
97 static int __init
pci_acpi_init(void)
99 struct pci_dev
*dev
= NULL
;
107 printk(KERN_INFO
"PCI: Using ACPI for IRQ routing\n");
108 acpi_irq_penalty_init();
110 pcibios_enable_irq
= acpi_pci_irq_enable
;
111 pcibios_disable_irq
= acpi_pci_irq_disable
;
115 * PCI IRQ routing is set up by pci_enable_device(), but we
116 * also do it here in case there are still broken drivers that
117 * don't use pci_enable_device().
119 printk(KERN_INFO
"PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n");
120 for_each_pci_dev(dev
)
121 acpi_pci_irq_enable(dev
);
123 printk(KERN_INFO
"PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n");
125 #ifdef CONFIG_X86_IO_APIC
132 subsys_initcall(pci_acpi_init
);