diff options
author | Johannes Weiner <hannes@saeurebad.de> | 2008-07-25 22:46:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 15:00:10 -0400 |
commit | 03da6bfb5b40d454f5439ea905a68441aab23637 (patch) | |
tree | bfcf08b4a692db72dbbc171f3b7c301db9987158 | |
parent | 471a54239a1c8a09cd12733d4e28db2aeebedb59 (diff) |
sh: use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version.
This also removes the following redundant information display:
- free pages, printed by show_free_areas()
- pages in slab, printed by show_free_areas()
- free swap pages, printed by show_swap_cache_info()
- pages in swapcache, printed by show_swap_cache_info()
where show_mem() calls show_free_areas(), which calls
show_swap_cache_info().
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/sh/mm/init.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index d652d375eb1e..b75a7acd62fb 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -25,47 +25,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
26 | unsigned long cached_to_uncached = 0; | 26 | unsigned long cached_to_uncached = 0; |
27 | 27 | ||
28 | void show_mem(void) | ||
29 | { | ||
30 | int total = 0, reserved = 0, free = 0; | ||
31 | int shared = 0, cached = 0, slab = 0; | ||
32 | pg_data_t *pgdat; | ||
33 | |||
34 | printk("Mem-info:\n"); | ||
35 | show_free_areas(); | ||
36 | |||
37 | for_each_online_pgdat(pgdat) { | ||
38 | unsigned long flags, i; | ||
39 | |||
40 | pgdat_resize_lock(pgdat, &flags); | ||
41 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
42 | struct page *page = pgdat_page_nr(pgdat, i); | ||
43 | total++; | ||
44 | if (PageReserved(page)) | ||
45 | reserved++; | ||
46 | else if (PageSwapCache(page)) | ||
47 | cached++; | ||
48 | else if (PageSlab(page)) | ||
49 | slab++; | ||
50 | else if (!page_count(page)) | ||
51 | free++; | ||
52 | else | ||
53 | shared += page_count(page) - 1; | ||
54 | } | ||
55 | pgdat_resize_unlock(pgdat, &flags); | ||
56 | } | ||
57 | |||
58 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
59 | printk("%d pages of RAM\n", total); | ||
60 | printk("%d free pages\n", free); | ||
61 | printk("%d reserved pages\n", reserved); | ||
62 | printk("%d slab pages\n", slab); | ||
63 | printk("%d pages shared\n", shared); | ||
64 | printk("%d pages swap cached\n", cached); | ||
65 | printk(KERN_INFO "Total of %ld pages in page table cache\n", | ||
66 | quicklist_total_size()); | ||
67 | } | ||
68 | |||
69 | #ifdef CONFIG_MMU | 28 | #ifdef CONFIG_MMU |
70 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) | 29 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) |
71 | { | 30 | { |