Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / arch / mips / mm / pgtable.c
index 8c30f32..c93aa6c 100644 (file)
@@ -4,7 +4,7 @@
 
 void show_mem(void)
 {
-#ifndef CONFIG_DISCONTIGMEM  /* XXX(hch): later.. */
+#ifndef CONFIG_NEED_MULTIPLE_NODES  /* XXX(hch): later.. */
        int pfn, total = 0, reserved = 0;
        int shared = 0, cached = 0;
        int highmem = 0;
@@ -15,6 +15,8 @@ void show_mem(void)
        printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
        pfn = max_mapnr;
        while (pfn-- > 0) {
+               if (!pfn_valid(pfn))
+                       continue;
                page = pfn_to_page(pfn);
                total++;
                if (PageHighMem(page))