summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_64.c
diff options
context:
space:
mode:
authorYinghai Lu <Yinghai.Lu@Sun.COM>2008-02-25 18:41:35 -0800
committerIngo Molnar <mingo@elte.hu>2008-04-26 23:41:04 +0200
commitd4c4d09415c48ecb621804cd4ec4a7a4d9a3662f (patch)
tree9a897fe359e5f2128fc42d492fe97a99ceac025c /arch/x86/kernel/setup_64.c
parent7fd0da4085d5b012a6bdcbbd63da7ead9fc69ad4 (diff)
downloadblackbird-op-linux-d4c4d09415c48ecb621804cd4ec4a7a4d9a3662f.tar.gz
blackbird-op-linux-d4c4d09415c48ecb621804cd4ec4a7a4d9a3662f.zip
x86: if acpi=off, force setting the mmconf for fam10h
some BIOS only let AMD fam 10h handle bus0, and nvidia mcp55/ck804 to handle other buses. at that case MCFG will cover all over them. but with acpi=off, we can not use MCFG. this patch will double check the busnbits, and if it is less handling 256 bues, and acpi=off will forcely reset the mmconf in msr, so we still use mmconf in above case. Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r--arch/x86/kernel/setup_64.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 185d3cc9129b..5e269a5dde2e 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -751,14 +751,21 @@ static void __cpuinit fam10h_check_enable_mmcfg(struct cpuinfo_x86 *c)
/* try to make sure that AP's setting is identical to BSP setting */
if (val & FAM10H_MMIO_CONF_ENABLE) {
- u64 base;
- base = val & (0xffffULL << 32);
- if (fam10h_pci_mmconf_base_status <= 0) {
- fam10h_pci_mmconf_base = base;
- fam10h_pci_mmconf_base_status = 1;
- return;
- } else if (fam10h_pci_mmconf_base == base)
- return;
+ unsigned busnbits;
+ busnbits = (val >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) &
+ FAM10H_MMIO_CONF_BUSRANGE_MASK;
+
+ /* only trust the one handle 256 buses, if acpi=off */
+ if (!acpi_pci_disabled || busnbits >= 8) {
+ u64 base;
+ base = val & (0xffffULL << 32);
+ if (fam10h_pci_mmconf_base_status <= 0) {
+ fam10h_pci_mmconf_base = base;
+ fam10h_pci_mmconf_base_status = 1;
+ return;
+ } else if (fam10h_pci_mmconf_base == base)
+ return;
+ }
}
/*
OpenPOWER on IntegriCloud