aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:40 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:40 -0400
commit9abd79280bbb9f56049f0168f412c3538cadb6eb (patch)
treefb72faaf2fddf382c3ab57e716d182ab9dd1406e
parent5e544d618f0fb21011f36f28d5e3952b9dc109d2 (diff)
[PATCH] i386/x86-64: Only do MCFG e820 check when type 1 works
Needs earlier patch to split type 1 probing from use. This patch should fix the x86 macs where type 1 PCI config space access doesn't work, but MCFG does. They also don't have a usable e820 table so the e820 sanity check failed. Instead assume now that if type 1 doesn't work then MCFG must work and don't do the e820 check. Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/i386/pci/mmconfig.c4
-rw-r--r--arch/x86_64/pci/mmconfig.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index 44155c5e85d1..2c4f585510c9 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -198,7 +198,9 @@ void __init pci_mmcfg_init(int type)
198 (pci_mmcfg_config[0].base_address == 0)) 198 (pci_mmcfg_config[0].base_address == 0))
199 return; 199 return;
200 200
201 if (!e820_all_mapped(pci_mmcfg_config[0].base_address, 201 /* Only do this check when type 1 works. If it doesn't work
202 assume we run on a Mac and always use MCFG */
203 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
202 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, 204 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
203 E820_RESERVED)) { 205 E820_RESERVED)) {
204 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", 206 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c
index d6b90d08476b..8bea51030d66 100644
--- a/arch/x86_64/pci/mmconfig.c
+++ b/arch/x86_64/pci/mmconfig.c
@@ -176,7 +176,9 @@ void __init pci_mmcfg_init(int type)
176 (pci_mmcfg_config[0].base_address == 0)) 176 (pci_mmcfg_config[0].base_address == 0))
177 return; 177 return;
178 178
179 if (!e820_all_mapped(pci_mmcfg_config[0].base_address, 179 /* Only do this check when type 1 works. If it doesn't work
180 assume we run on a Mac and always use MCFG */
181 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
180 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, 182 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
181 E820_RESERVED)) { 183 E820_RESERVED)) {
182 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", 184 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",