diff options
author | Andi Kleen <ak@suse.de> | 2005-09-12 12:49:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 13:50:55 -0400 |
commit | e92343cc8e9ca4bc0db4b007dd37d33a207ef637 (patch) | |
tree | fe6c212f92464145fcaabbf7d3f8962a54113766 /arch/x86_64 | |
parent | 083044e63b4d10ebf9afb231bc0d34aec72169b4 (diff) |
[PATCH] x86-64: Fix show_mem a little bit
- Add KERN_INFO to printks (from i386)
- Use longs instead of ints to accumulate pages.
- Fix broken indenting.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/mm/init.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index b6a826d6c182..e60a1a848de8 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -57,31 +57,31 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
57 | 57 | ||
58 | void show_mem(void) | 58 | void show_mem(void) |
59 | { | 59 | { |
60 | int i, total = 0, reserved = 0; | 60 | long i, total = 0, reserved = 0; |
61 | int shared = 0, cached = 0; | 61 | long shared = 0, cached = 0; |
62 | pg_data_t *pgdat; | 62 | pg_data_t *pgdat; |
63 | struct page *page; | 63 | struct page *page; |
64 | 64 | ||
65 | printk("Mem-info:\n"); | 65 | printk(KERN_INFO "Mem-info:\n"); |
66 | show_free_areas(); | 66 | show_free_areas(); |
67 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | 67 | printk(KERN_INFO "Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); |
68 | 68 | ||
69 | for_each_pgdat(pgdat) { | 69 | for_each_pgdat(pgdat) { |
70 | for (i = 0; i < pgdat->node_spanned_pages; ++i) { | 70 | for (i = 0; i < pgdat->node_spanned_pages; ++i) { |
71 | page = pfn_to_page(pgdat->node_start_pfn + i); | 71 | page = pfn_to_page(pgdat->node_start_pfn + i); |
72 | total++; | 72 | total++; |
73 | if (PageReserved(page)) | 73 | if (PageReserved(page)) |
74 | reserved++; | 74 | reserved++; |
75 | else if (PageSwapCache(page)) | 75 | else if (PageSwapCache(page)) |
76 | cached++; | 76 | cached++; |
77 | else if (page_count(page)) | 77 | else if (page_count(page)) |
78 | shared += page_count(page) - 1; | 78 | shared += page_count(page) - 1; |
79 | } | 79 | } |
80 | } | 80 | } |
81 | printk("%d pages of RAM\n", total); | 81 | printk(KERN_INFO "%lu pages of RAM\n", total); |
82 | printk("%d reserved pages\n",reserved); | 82 | printk(KERN_INFO "%lu reserved pages\n",reserved); |
83 | printk("%d pages shared\n",shared); | 83 | printk(KERN_INFO "%lu pages shared\n",shared); |
84 | printk("%d pages swap cached\n",cached); | 84 | printk(KERN_INFO "%lu pages swap cached\n",cached); |
85 | } | 85 | } |
86 | 86 | ||
87 | /* References to section boundaries */ | 87 | /* References to section boundaries */ |