summaryrefslogtreecommitdiffstats
path: root/arch/i386/pci/init.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-03-23 14:35:12 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 14:35:12 -0800
commit92c05fc1a32e5ccef5e0e8201f32dcdab041524c (patch)
tree71c0202dffee676d3b2e0b75ea4472aaa2ffe8df /arch/i386/pci/init.c
parente4e73041ecc4a3559c42ed9489f58531c2a8646b (diff)
downloadblackbird-op-linux-92c05fc1a32e5ccef5e0e8201f32dcdab041524c.tar.gz
blackbird-op-linux-92c05fc1a32e5ccef5e0e8201f32dcdab041524c.zip
[PATCH] PCI: Give PCI config access initialization a defined ordering
I moved it to a separate function which is safer. This avoids problems with the linker reordering them and the less useful PCI config space access methods taking priority over the better ones. Fixes some problems with broken MMCONFIG Cc: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/i386/pci/init.c')
-rw-r--r--arch/i386/pci/init.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/i386/pci/init.c b/arch/i386/pci/init.c
new file mode 100644
index 000000000000..f9156d3ac723
--- /dev/null
+++ b/arch/i386/pci/init.c
@@ -0,0 +1,25 @@
+#include <linux/config.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include "pci.h"
+
+/* arch_initcall has too random ordering, so call the initializers
+ in the right sequence from here. */
+static __init int pci_access_init(void)
+{
+#ifdef CONFIG_PCI_MMCONFIG
+ pci_mmcfg_init();
+#endif
+ if (raw_pci_ops)
+ return 0;
+#ifdef CONFIG_PCI_BIOS
+ pci_pcbios_init();
+#endif
+ if (raw_pci_ops)
+ return 0;
+#ifdef CONFIG_PCI_DIRECT
+ pci_direct_init();
+#endif
+ return 0;
+}
+arch_initcall(pci_access_init);
OpenPOWER on IntegriCloud