aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/init.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-07-25 22:46:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:11 -0400
commitc55281dee09a843dd6bf5070324b86b84847e6ea (patch)
treec02a8678d0b4de16a348b6a3b6022d2b62b9b54d /arch/s390/mm/init.c
parent03da6bfb5b40d454f5439ea905a68441aab23637 (diff)
s390: use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version. This also removes the following redundant information display: - 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: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r--arch/s390/mm/init.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 388cc7420055..4993b0f594eb 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -42,38 +42,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
42pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); 42pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
43char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); 43char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
44 44
45void show_mem(void)
46{
47 unsigned long i, total = 0, reserved = 0;
48 unsigned long shared = 0, cached = 0;
49 unsigned long flags;
50 struct page *page;
51 pg_data_t *pgdat;
52
53 printk("Mem-info:\n");
54 show_free_areas();
55 for_each_online_pgdat(pgdat) {
56 pgdat_resize_lock(pgdat, &flags);
57 for (i = 0; i < pgdat->node_spanned_pages; i++) {
58 if (!pfn_valid(pgdat->node_start_pfn + i))
59 continue;
60 page = pfn_to_page(pgdat->node_start_pfn + i);
61 total++;
62 if (PageReserved(page))
63 reserved++;
64 else if (PageSwapCache(page))
65 cached++;
66 else if (page_count(page))
67 shared += page_count(page) - 1;
68 }
69 pgdat_resize_unlock(pgdat, &flags);
70 }
71 printk("%ld pages of RAM\n", total);
72 printk("%ld reserved pages\n", reserved);
73 printk("%ld pages shared\n", shared);
74 printk("%ld pages swap cached\n", cached);
75}
76
77/* 45/*
78 * paging_init() sets up the page tables 46 * paging_init() sets up the page tables
79 */ 47 */