Commit 044cd80942e47b9de0915b627902adf05c52377f
Committed by
Jesse Barnes
1 parent
162dedd39d
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
arch/x86/pci/mmconfig-shared.c
... | ... | @@ -375,7 +375,7 @@ |
375 | 375 | if (!fixmem32) |
376 | 376 | return AE_OK; |
377 | 377 | if ((mcfg_res->start >= fixmem32->address) && |
378 | - (mcfg_res->end < (fixmem32->address + | |
378 | + (mcfg_res->end <= (fixmem32->address + | |
379 | 379 | fixmem32->address_length))) { |
380 | 380 | mcfg_res->flags = 1; |
381 | 381 | return AE_CTRL_TERMINATE; |
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | return AE_OK; |
393 | 393 | |
394 | 394 | if ((mcfg_res->start >= address.minimum) && |
395 | - (mcfg_res->end < (address.minimum + address.address_length))) { | |
395 | + (mcfg_res->end <= (address.minimum + address.address_length))) { | |
396 | 396 | mcfg_res->flags = 1; |
397 | 397 | return AE_CTRL_TERMINATE; |
398 | 398 | } |
... | ... | @@ -439,7 +439,7 @@ |
439 | 439 | u64 old_size = size; |
440 | 440 | int valid = 0; |
441 | 441 | |
442 | - while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) { | |
442 | + while (!is_reserved(addr, addr + size, E820_RESERVED)) { | |
443 | 443 | size >>= 1; |
444 | 444 | if (size < (16UL<<20)) |
445 | 445 | break; |