[PATCH] remove non-DISCONTIG use of pgdat->node_mem_map
[linux-2.6.git] / arch / ia64 / mm / discontig.c
index 3456a9b..f3fd528 100644 (file)
@@ -560,14 +560,15 @@ void show_mem(void)
                int shared = 0, cached = 0, reserved = 0;
                printk("Node ID: %d\n", pgdat->node_id);
                for(i = 0; i < pgdat->node_spanned_pages; i++) {
+                       struct page *page = pgdat_page_nr(pgdat, i);
                        if (!ia64_pfn_valid(pgdat->node_start_pfn+i))
                                continue;
-                       if (PageReserved(pgdat->node_mem_map+i))
+                       if (PageReserved(page))
                                reserved++;
-                       else if (PageSwapCache(pgdat->node_mem_map+i))
+                       else if (PageSwapCache(page))
                                cached++;
-                       else if (page_count(pgdat->node_mem_map+i))
-                               shared += page_count(pgdat->node_mem_map+i)-1;
+                       else if (page_count(page))
+                               shared += page_count(page)-1;
                }
                total_present += present;
                total_reserved += reserved;
@@ -582,7 +583,8 @@ void show_mem(void)
        printk("%d reserved pages\n", total_reserved);
        printk("%d pages shared\n", total_shared);
        printk("%d pages swap cached\n", total_cached);
-       printk("Total of %ld pages in page table cache\n", pgtable_cache_size);
+       printk("Total of %ld pages in page table cache\n",
+               pgtable_quicklist_total_size());
        printk("%d free buffer pages\n", nr_free_buffer_pages());
 }