diff options
author | Andi Kleen <andi@firstfloor.org> | 2008-03-11 22:53:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:30 -0400 |
commit | cc6150321903ca4c3bc9d53b0cdafb05d77d64d0 (patch) | |
tree | cfdb0ee512da7da82c15d4b1aae66d1f25640f31 /arch/x86/kernel/setup_64.c | |
parent | 67794292c8615b05f46419ba8d4fd99e7c9a5db9 (diff) |
x86: account overlapped mappings in max_pfn_mapped
When end_pfn is not aligned to 2MB (or 1GB) then the kernel might
map more memory than end_pfn. Account this in max_pfn_mapped.
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: andreas.herrmann3@amd.com
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r-- | arch/x86/kernel/setup_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 413b8fc31545..3d76dbd9f2c0 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -347,7 +347,7 @@ void __init setup_arch(char **cmdline_p) | |||
347 | 347 | ||
348 | check_efer(); | 348 | check_efer(); |
349 | 349 | ||
350 | init_memory_mapping(0, (max_pfn_mapped << PAGE_SHIFT)); | 350 | max_pfn_mapped = init_memory_mapping(0, (max_pfn_mapped << PAGE_SHIFT)); |
351 | if (efi_enabled) | 351 | if (efi_enabled) |
352 | efi_init(); | 352 | efi_init(); |
353 | 353 | ||