diff options
author | Andi Kleen <ak@suse.de> | 2006-03-23 17:35:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-23 17:35:12 -0500 |
commit | 92c05fc1a32e5ccef5e0e8201f32dcdab041524c (patch) | |
tree | 71c0202dffee676d3b2e0b75ea4472aaa2ffe8df /arch/i386/pci/mmconfig.c | |
parent | e4e73041ecc4a3559c42ed9489f58531c2a8646b (diff) |
[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/mmconfig.c')
-rw-r--r-- | arch/i386/pci/mmconfig.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 0ee8a983708c..613789071f30 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c | |||
@@ -172,25 +172,20 @@ static __init void unreachable_devices(void) | |||
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | static int __init pci_mmcfg_init(void) | 175 | void __init pci_mmcfg_init(void) |
176 | { | 176 | { |
177 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) | 177 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) |
178 | goto out; | 178 | return; |
179 | 179 | ||
180 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); | 180 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); |
181 | if ((pci_mmcfg_config_num == 0) || | 181 | if ((pci_mmcfg_config_num == 0) || |
182 | (pci_mmcfg_config == NULL) || | 182 | (pci_mmcfg_config == NULL) || |
183 | (pci_mmcfg_config[0].base_address == 0)) | 183 | (pci_mmcfg_config[0].base_address == 0)) |
184 | goto out; | 184 | return; |
185 | 185 | ||
186 | printk(KERN_INFO "PCI: Using MMCONFIG\n"); | 186 | printk(KERN_INFO "PCI: Using MMCONFIG\n"); |
187 | raw_pci_ops = &pci_mmcfg; | 187 | raw_pci_ops = &pci_mmcfg; |
188 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; | 188 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; |
189 | 189 | ||
190 | unreachable_devices(); | 190 | unreachable_devices(); |
191 | |||
192 | out: | ||
193 | return 0; | ||
194 | } | 191 | } |
195 | |||
196 | arch_initcall(pci_mmcfg_init); | ||