Messages in this thread Patch in this message |  | | Date | Mon, 07 Apr 2008 16:40:23 +0200 | From | Johannes Weiner <> | Subject | [patch 15/22 -v3] ppc: 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 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: Paul Mackerras <paulus@samba.org> ---
Index: tree-linus/arch/ppc/Kconfig =================================================================== --- tree-linus.orig/arch/ppc/Kconfig +++ tree-linus/arch/ppc/Kconfig @@ -45,6 +45,7 @@ config PPC select HAVE_IDE select HAVE_OPROFILE select HAVE_KPROBES + select HAVE_GENERIC_SHOW_MEM config PPC32 bool Index: tree-linus/arch/ppc/mm/init.c =================================================================== --- tree-linus.orig/arch/ppc/mm/init.c +++ tree-linus/arch/ppc/mm/init.c @@ -101,36 +101,6 @@ unsigned long __max_memory; /* max amount of low RAM to map in */ unsigned long __max_low_memory = MAX_LOW_MEM; -void show_mem(void) -{ - int i,free = 0,total = 0,reserved = 0; - int shared = 0, cached = 0; - int highmem = 0; - - printk("Mem-info:\n"); - show_free_areas(); - i = max_mapnr; - while (i-- > 0) { - total++; - if (PageHighMem(mem_map+i)) - highmem++; - if (PageReserved(mem_map+i)) - reserved++; - else if (PageSwapCache(mem_map+i)) - cached++; - else if (!page_count(mem_map+i)) - free++; - else - shared += page_count(mem_map+i) - 1; - } - printk("%d pages of RAM\n",total); - printk("%d pages of HIGHMEM\n", highmem); - printk("%d free pages\n",free); - printk("%d reserved pages\n",reserved); - printk("%d pages shared\n",shared); - printk("%d pages swap cached\n",cached); -} - /* Free up now-unused memory */ static void free_sec(unsigned long start, unsigned long end, const char *name) { --
|  |