aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-07-25 22:46:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:10 -0400
commit471a54239a1c8a09cd12733d4e28db2aeebedb59 (patch)
treeab659047a92cd86b9638f6913db29453a45f7f31 /arch
parent79b0cbd113a9de1eaa3322528ccaeb97bd9189cc (diff)
sparc64: 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() - dirty pages, writeback pages, mapped pages, slab pages, pagetables pages, printed by show_free_areas() where show_mem() calls show_free_areas(), which calls show_swap_cache_info(). Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/mm/init.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 713297473951..4e821b3ecb03 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -392,51 +392,6 @@ void __kprobes flush_icache_range(unsigned long start, unsigned long end)
392 } 392 }
393} 393}
394 394
395void show_mem(void)
396{
397 unsigned long total = 0, reserved = 0;
398 unsigned long shared = 0, cached = 0;
399 pg_data_t *pgdat;
400
401 printk(KERN_INFO "Mem-info:\n");
402 show_free_areas();
403 printk(KERN_INFO "Free swap: %6ldkB\n",
404 nr_swap_pages << (PAGE_SHIFT-10));
405 for_each_online_pgdat(pgdat) {
406 unsigned long i, flags;
407
408 pgdat_resize_lock(pgdat, &flags);
409 for (i = 0; i < pgdat->node_spanned_pages; i++) {
410 struct page *page = pgdat_page_nr(pgdat, i);
411 total++;
412 if (PageReserved(page))
413 reserved++;
414 else if (PageSwapCache(page))
415 cached++;
416 else if (page_count(page))
417 shared += page_count(page) - 1;
418 }
419 pgdat_resize_unlock(pgdat, &flags);
420 }
421
422 printk(KERN_INFO "%lu pages of RAM\n", total);
423 printk(KERN_INFO "%lu reserved pages\n", reserved);
424 printk(KERN_INFO "%lu pages shared\n", shared);
425 printk(KERN_INFO "%lu pages swap cached\n", cached);
426
427 printk(KERN_INFO "%lu pages dirty\n",
428 global_page_state(NR_FILE_DIRTY));
429 printk(KERN_INFO "%lu pages writeback\n",
430 global_page_state(NR_WRITEBACK));
431 printk(KERN_INFO "%lu pages mapped\n",
432 global_page_state(NR_FILE_MAPPED));
433 printk(KERN_INFO "%lu pages slab\n",
434 global_page_state(NR_SLAB_RECLAIMABLE) +
435 global_page_state(NR_SLAB_UNRECLAIMABLE));
436 printk(KERN_INFO "%lu pages pagetables\n",
437 global_page_state(NR_PAGETABLE));
438}
439
440void mmu_info(struct seq_file *m) 395void mmu_info(struct seq_file *m)
441{ 396{
442 if (tlb_type == cheetah) 397 if (tlb_type == cheetah)