summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens2006-10-04 20:02:23 +0200
committerMartin Schwidefsky2006-10-04 20:02:23 +0200
commit0b2b6e1ddce4696cb7afcbb15a654fe95428a498 (patch)
treea6dd837de5ce7088ab1009d125e8bcd6cfeaa1e1 /arch
parent[S390] Have s390 use add_active_range() and free_area_init_nodes. (diff)
downloadkernel-qcow2-linux-0b2b6e1ddce4696cb7afcbb15a654fe95428a498.tar.gz
kernel-qcow2-linux-0b2b6e1ddce4696cb7afcbb15a654fe95428a498.tar.xz
kernel-qcow2-linux-0b2b6e1ddce4696cb7afcbb15a654fe95428a498.zip
[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')
-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)
{
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);