aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-10-04 14:02:23 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-10-04 14:02:23 -0400
commit0b2b6e1ddce4696cb7afcbb15a654fe95428a498 (patch)
treea6dd837de5ce7088ab1009d125e8bcd6cfeaa1e1 /arch/s390
parent7676bef9c183fd573822cac9992927ef596d584c (diff)
[S390] Remove open-coded mem_map usage.
Use page_to_phys and pfn_to_page to avoid open-coded mem_map usage. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/mm/init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index c302508ae31e..d99891718709 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -62,19 +62,21 @@ void show_mem(void)
62{ 62{
63 int i, total = 0, reserved = 0; 63 int i, total = 0, reserved = 0;
64 int shared = 0, cached = 0; 64 int shared = 0, cached = 0;
65 struct page *page;
65 66
66 printk("Mem-info:\n"); 67 printk("Mem-info:\n");
67 show_free_areas(); 68 show_free_areas();
68 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 69 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
69 i = max_mapnr; 70 i = max_mapnr;
70 while (i-- > 0) { 71 while (i-- > 0) {
72 page = pfn_to_page(i);
71 total++; 73 total++;
72 if (PageReserved(mem_map+i)) 74 if (PageReserved(page))
73 reserved++; 75 reserved++;
74 else if (PageSwapCache(mem_map+i)) 76 else if (PageSwapCache(page))
75 cached++; 77 cached++;
76 else if (page_count(mem_map+i)) 78 else if (page_count(page))
77 shared += page_count(mem_map+i) - 1; 79 shared += page_count(page) - 1;
78 } 80 }
79 printk("%d pages of RAM\n",total); 81 printk("%d pages of RAM\n",total);
80 printk("%d reserved pages\n",reserved); 82 printk("%d reserved pages\n",reserved);