hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/x86/pci/init.c
....@@ -3,35 +3,41 @@
33 #include <linux/init.h>
44 #include <asm/pci_x86.h>
55 #include <asm/x86_init.h>
6
+#include <asm/irqdomain.h>
67
78 /* arch_initcall has too random ordering, so call the initializers
89 in the right sequence from here. */
910 static __init int pci_arch_init(void)
1011 {
11
-#ifdef CONFIG_PCI_DIRECT
12
- int type = 0;
12
+ int type, pcbios = 1;
1313
1414 type = pci_direct_probe();
15
-#endif
1615
1716 if (!(pci_probe & PCI_PROBE_NOEARLY))
1817 pci_mmcfg_early_init();
1918
20
- if (x86_init.pci.arch_init && !x86_init.pci.arch_init())
19
+ if (x86_init.pci.arch_init)
20
+ pcbios = x86_init.pci.arch_init();
21
+
22
+ /*
23
+ * Must happen after x86_init.pci.arch_init(). Xen sets up the
24
+ * x86_init.irqs.create_pci_msi_domain there.
25
+ */
26
+ x86_create_pci_msi_domain();
27
+
28
+ if (!pcbios)
2129 return 0;
2230
23
-#ifdef CONFIG_PCI_BIOS
2431 pci_pcbios_init();
25
-#endif
32
+
2633 /*
2734 * don't check for raw_pci_ops here because we want pcbios as last
2835 * fallback, yet it's needed to run first to set pcibios_last_bus
2936 * in case legacy PCI probing is used. otherwise detecting peer busses
3037 * fails.
3138 */
32
-#ifdef CONFIG_PCI_DIRECT
3339 pci_direct_init(type);
34
-#endif
40
+
3541 if (!raw_pci_ops && !raw_pci_ext_ops)
3642 printk(KERN_ERR
3743 "PCI: Fatal: No config space access function found\n");