diff options
author | Johannes Weiner <hannes@saeurebad.de> | 2008-07-26 06:46:18 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 23:00:11 +0400 |
commit | aca532016f49eca0341ed7be5885d6c63ca69e63 (patch) | |
tree | 5ec4042ef220faaaa0afd42e69ba52ebe11c412f /arch/m32r | |
parent | 969eefb516b71f8abadf5bc4861a672694f48c38 (diff) | |
download | linux-aca532016f49eca0341ed7be5885d6c63ca69e63.tar.xz |
m32r: use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version.
This also removes the following redundant information display:
- 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>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/mm/init.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c index 2554eb59cfef..24d429f9358a 100644 --- a/arch/m32r/mm/init.c +++ b/arch/m32r/mm/init.c @@ -36,42 +36,6 @@ pgd_t swapper_pg_dir[1024]; DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); -void show_mem(void) -{ - int total = 0, reserved = 0; - int shared = 0, cached = 0; - int highmem = 0; - struct page *page; - pg_data_t *pgdat; - unsigned long i; - - printk("Mem-info:\n"); - show_free_areas(); - printk("Free swap: %6ldkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); - for_each_online_pgdat(pgdat) { - unsigned long flags; - pgdat_resize_lock(pgdat, &flags); - for (i = 0; i < pgdat->node_spanned_pages; ++i) { - page = pgdat_page_nr(pgdat, i); - total++; - if (PageHighMem(page)) - highmem++; - if (PageReserved(page)) - reserved++; - else if (PageSwapCache(page)) - cached++; - else if (page_count(page)) - shared += page_count(page) - 1; - } - pgdat_resize_unlock(pgdat, &flags); - } - printk("%d pages of RAM\n", total); - printk("%d pages of HIGHMEM\n",highmem); - printk("%d reserved pages\n",reserved); - printk("%d pages shared\n",shared); - printk("%d pages swap cached\n",cached); -} - /* * Cache of MMU context last used. */ |