diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/init_64.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index f79a02f64d10..ad38648bddbd 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -884,6 +884,7 @@ static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, | |||
884 | void __init mem_init(void) | 884 | void __init mem_init(void) |
885 | { | 885 | { |
886 | long codesize, reservedpages, datasize, initsize; | 886 | long codesize, reservedpages, datasize, initsize; |
887 | unsigned long absent_pages; | ||
887 | 888 | ||
888 | start_periodic_check_for_corruption(); | 889 | start_periodic_check_for_corruption(); |
889 | 890 | ||
@@ -899,8 +900,9 @@ void __init mem_init(void) | |||
899 | #else | 900 | #else |
900 | totalram_pages = free_all_bootmem(); | 901 | totalram_pages = free_all_bootmem(); |
901 | #endif | 902 | #endif |
902 | reservedpages = max_pfn - totalram_pages - | 903 | |
903 | absent_pages_in_range(0, max_pfn); | 904 | absent_pages = absent_pages_in_range(0, max_pfn); |
905 | reservedpages = max_pfn - totalram_pages - absent_pages; | ||
904 | after_bootmem = 1; | 906 | after_bootmem = 1; |
905 | 907 | ||
906 | codesize = (unsigned long) &_etext - (unsigned long) &_text; | 908 | codesize = (unsigned long) &_etext - (unsigned long) &_text; |
@@ -917,10 +919,11 @@ void __init mem_init(void) | |||
917 | VSYSCALL_END - VSYSCALL_START); | 919 | VSYSCALL_END - VSYSCALL_START); |
918 | 920 | ||
919 | printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " | 921 | printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " |
920 | "%ldk reserved, %ldk data, %ldk init)\n", | 922 | "%ldk absent, %ldk reserved, %ldk data, %ldk init)\n", |
921 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | 923 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), |
922 | max_pfn << (PAGE_SHIFT-10), | 924 | max_pfn << (PAGE_SHIFT-10), |
923 | codesize >> 10, | 925 | codesize >> 10, |
926 | absent_pages << (PAGE_SHIFT-10), | ||
924 | reservedpages << (PAGE_SHIFT-10), | 927 | reservedpages << (PAGE_SHIFT-10), |
925 | datasize >> 10, | 928 | datasize >> 10, |
926 | initsize >> 10); | 929 | initsize >> 10); |