linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / arm26 / mm / init.c
index 562fac1..1f09a9d 100644 (file)
@@ -7,6 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/config.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -22,7 +23,6 @@
 #include <linux/initrd.h>
 #include <linux/bootmem.h>
 #include <linux/blkdev.h>
-#include <linux/pfn.h>
 
 #include <asm/segment.h>
 #include <asm/mach-types.h>
@@ -101,6 +101,12 @@ struct node_info {
        int bootmap_pages;
 };
 
+#define PFN_DOWN(x)    ((x) >> PAGE_SHIFT)
+#define PFN_UP(x)      (PAGE_ALIGN(x) >> PAGE_SHIFT)
+#define PFN_SIZE(x)    ((x) >> PAGE_SHIFT)
+#define PFN_RANGE(s,e) PFN_SIZE(PAGE_ALIGN((unsigned long)(e)) - \
+                               (((unsigned long)(s)) & PAGE_MASK))
+
 /*
  * FIXME: We really want to avoid allocating the bootmap bitmap
  * over the top of the initrd.  Hopefully, this is located towards
@@ -318,7 +324,7 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s)
        for (; addr < end; addr += PAGE_SIZE) {
                struct page *page = virt_to_page(addr);
                ClearPageReserved(page);
-               init_page_count(page);
+               set_page_count(page, 1);
                free_page(addr);
                totalram_pages++;
        }