mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 18:54:10 +08:00
x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case
e820_all_mapped need end is (addr + size) instead of (addr + size - 1) Cc: stable@kernel.org Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
162dedd39d
commit
044cd80942
@ -375,7 +375,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res,
|
|||||||
if (!fixmem32)
|
if (!fixmem32)
|
||||||
return AE_OK;
|
return AE_OK;
|
||||||
if ((mcfg_res->start >= fixmem32->address) &&
|
if ((mcfg_res->start >= fixmem32->address) &&
|
||||||
(mcfg_res->end < (fixmem32->address +
|
(mcfg_res->end <= (fixmem32->address +
|
||||||
fixmem32->address_length))) {
|
fixmem32->address_length))) {
|
||||||
mcfg_res->flags = 1;
|
mcfg_res->flags = 1;
|
||||||
return AE_CTRL_TERMINATE;
|
return AE_CTRL_TERMINATE;
|
||||||
@ -392,7 +392,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res,
|
|||||||
return AE_OK;
|
return AE_OK;
|
||||||
|
|
||||||
if ((mcfg_res->start >= address.minimum) &&
|
if ((mcfg_res->start >= address.minimum) &&
|
||||||
(mcfg_res->end < (address.minimum + address.address_length))) {
|
(mcfg_res->end <= (address.minimum + address.address_length))) {
|
||||||
mcfg_res->flags = 1;
|
mcfg_res->flags = 1;
|
||||||
return AE_CTRL_TERMINATE;
|
return AE_CTRL_TERMINATE;
|
||||||
}
|
}
|
||||||
@ -439,7 +439,7 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,
|
|||||||
u64 old_size = size;
|
u64 old_size = size;
|
||||||
int valid = 0;
|
int valid = 0;
|
||||||
|
|
||||||
while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) {
|
while (!is_reserved(addr, addr + size, E820_RESERVED)) {
|
||||||
size >>= 1;
|
size >>= 1;
|
||||||
if (size < (16UL<<20))
|
if (size < (16UL<<20))
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user