Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Johannes Weiner and committed by
Linus Torvalds
aca53201 969eefb5

-36
-36
arch/m32r/mm/init.c
··· 36 36 37 37 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 38 38 39 - void show_mem(void) 40 - { 41 - int total = 0, reserved = 0; 42 - int shared = 0, cached = 0; 43 - int highmem = 0; 44 - struct page *page; 45 - pg_data_t *pgdat; 46 - unsigned long i; 47 - 48 - printk("Mem-info:\n"); 49 - show_free_areas(); 50 - printk("Free swap: %6ldkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); 51 - for_each_online_pgdat(pgdat) { 52 - unsigned long flags; 53 - pgdat_resize_lock(pgdat, &flags); 54 - for (i = 0; i < pgdat->node_spanned_pages; ++i) { 55 - page = pgdat_page_nr(pgdat, i); 56 - total++; 57 - if (PageHighMem(page)) 58 - highmem++; 59 - if (PageReserved(page)) 60 - reserved++; 61 - else if (PageSwapCache(page)) 62 - cached++; 63 - else if (page_count(page)) 64 - shared += page_count(page) - 1; 65 - } 66 - pgdat_resize_unlock(pgdat, &flags); 67 - } 68 - printk("%d pages of RAM\n", total); 69 - printk("%d pages of HIGHMEM\n",highmem); 70 - printk("%d reserved pages\n",reserved); 71 - printk("%d pages shared\n",shared); 72 - printk("%d pages swap cached\n",cached); 73 - } 74 - 75 39 /* 76 40 * Cache of MMU context last used. 77 41 */