Message ID | 174478829848.31282.16733995724256591570.tip-bot2@tip-bot2 (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [tip:,x86/urgent] x86/e820: Discard high memory that can't be addressed by 32-bit systems | expand |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 9d8dd8d..de62388 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -1299,6 +1299,13 @@ void __init e820__memblock_setup(void) memblock_add(entry->addr, entry->size); } + /* + * Discard memory above 4GB because 32-bit systems are limited to 4GB + * of memory even with HIGHMEM. + */ + if (IS_ENABLED(CONFIG_X86_32)) + memblock_remove(PFN_PHYS(MAX_NONPAE_PFN), -1); + /* Throw away partial pages: */ memblock_trim_memory(PAGE_SIZE);