diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-10-14 21:59:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:50:49 -0400 |
commit | 11a6b0c933b55654a58afd84f63a5dde1607d78f (patch) | |
tree | 88f8b321a3a14d1115ee5d13d5f2acadbcfe135d /arch | |
parent | e7706fc691513b0f06adb3de3d6ac04293180146 (diff) |
x86: 64 bit print out absent pages num too
so users are not confused with memhole causing big total ram
we don't need to worry about 32 bit, because memhole is always
above max_low_pfn.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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); |