linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / mips / sgi-ip27 / ip27-memory.c
index efe6971..ef20d9a 100644 (file)
@@ -10,6 +10,7 @@
  * On SGI IP27 the ARC memory configuration data is completly bogus but
  * alternate easier to use mechanisms are available.
  */
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -18,7 +19,6 @@
 #include <linux/nodemask.h>
 #include <linux/swap.h>
 #include <linux/bootmem.h>
-#include <linux/pfn.h>
 #include <asm/page.h>
 #include <asm/sections.h>
 
@@ -28,6 +28,8 @@
 #include <asm/sn/sn_private.h>
 
 
+#define PFN_UP(x)              (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
+
 #define SLOT_PFNSHIFT           (SLOT_SHIFT - PAGE_SHIFT)
 #define PFN_NASIDSHFT           (NASID_SHFT - PAGE_SHIFT)
 
@@ -538,8 +540,8 @@ void __init mem_init(void)
                struct page *end, *p;
 
                /*
-                * This will free up the bootmem, ie, slot 0 memory.
-                */
+                * This will free up the bootmem, ie, slot 0 memory.
+                */
                totalram_pages += free_all_bootmem_node(NODE_DATA(node));
 
                /*
@@ -557,7 +559,7 @@ void __init mem_init(void)
                                /* if (!page_is_ram(pgnr)) continue; */
                                /* commented out until page_is_ram works */
                                ClearPageReserved(p);
-                               init_page_count(p);
+                               set_page_count(p, 1);
                                __free_page(p);
                                totalram_pages++;
                        }