Skip to content

Commit 9abd792

Browse files
Andi KleenAndi Kleen
authored andcommitted
[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>
1 parent 5e544d6 commit 9abd792

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

arch/i386/pci/mmconfig.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ void __init pci_mmcfg_init(int type)
198198
(pci_mmcfg_config[0].base_address == 0))
199199
return;
200200

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,
202204
pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
203205
E820_RESERVED)) {
204206
printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",

arch/x86_64/pci/mmconfig.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ void __init pci_mmcfg_init(int type)
176176
(pci_mmcfg_config[0].base_address == 0))
177177
return;
178178

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,
180182
pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
181183
E820_RESERVED)) {
182184
printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",

0 commit comments

Comments
 (0)