Skip to content
Commit 75e613cd authored by Yinghai Lu's avatar Yinghai Lu Committed by Jesse Barnes
Browse files

x86/pci: fix mmconfig detection with 32bit near 4g



Pascal reported and bisected a commit:
|	x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case

which broke one system system.

ACPI: Using IOAPIC for interrupt routing
PCI: MCFG configuration 0: base f0000000 segment 0 buses 0 - 255
PCI: MCFG area at f0000000 reserved in ACPI motherboard resources
PCI: Using MMCONFIG for extended config space

it didn't have
PCI: updated MCFG configuration 0: base f0000000 segment 0 buses 0 - 63
anymore, and try to use 0xf000000 - 0xffffffff for mmconfig

For 32bit, mcfg_res->end could be 32bit only (if 64 resources aren't used)
So use end - 1 to pass the value in mcfg->end to avoid overflow.

We don't need to worry about the e820 path, they are always 64 bit.

Reported-by: default avatarPascal Terjan <pterjan@mandriva.com>
Bisected-by: default avatarPascal Terjan <pterjan@mandriva.com>
Tested-by: default avatarPascal Terjan <pterjan@mandriva.com>
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Cc: stable@kernel.org
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent f79b1b14
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment