From 0b2b6e1ddce4696cb7afcbb15a654fe95428a498 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 4 Oct 2006 20:02:23 +0200 Subject: [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 --- arch/s390/mm/init.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'arch/s390') diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index c302508ae31..d9989171870 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -62,19 +62,21 @@ void show_mem(void) { int i, total = 0, reserved = 0; int shared = 0, cached = 0; + struct page *page; printk("Mem-info:\n"); show_free_areas(); printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); i = max_mapnr; while (i-- > 0) { + page = pfn_to_page(i); total++; - if (PageReserved(mem_map+i)) + if (PageReserved(page)) reserved++; - else if (PageSwapCache(mem_map+i)) + else if (PageSwapCache(page)) cached++; - else if (page_count(mem_map+i)) - shared += page_count(mem_map+i) - 1; + else if (page_count(page)) + shared += page_count(page) - 1; } printk("%d pages of RAM\n",total); printk("%d reserved pages\n",reserved); -- cgit v1.2.3-70-g09d2