diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-10-04 20:02:23 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-10-04 20:02:23 +0200 |
commit | 0b2b6e1ddce4696cb7afcbb15a654fe95428a498 (patch) | |
tree | a6dd837de5ce7088ab1009d125e8bcd6cfeaa1e1 /arch/s390 | |
parent | 7676bef9c183fd573822cac9992927ef596d584c (diff) | |
download | linux-0b2b6e1ddce4696cb7afcbb15a654fe95428a498.tar.bz2 |
[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.c | 10 |
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) { 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); |