fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / arm26 / mm / init.c
index 17f7dc3..562fac1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/init.c
+ *  linux/arch/arm26/mm/init.c
  *
  *  Copyright (C) 1995-2002 Russell King
  *
@@ -7,7 +7,6 @@
  * 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>
 #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>
-#include <asm/pgalloc.h>
 #include <asm/dma.h>
 #include <asm/hardware.h>
 #include <asm/setup.h>
@@ -84,7 +83,7 @@ void show_mem(void)
                else if (!page_count(page))
                        free++;
                else
-                       shared += atomic_read(&page->count) - 1;
+                       shared += page_count(page) - 1;
                page++;
        } while (page < end);
 
@@ -102,12 +101,6 @@ 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
@@ -156,7 +149,8 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np)
 {
        unsigned int memend_pfn = 0;
 
-       numnodes = 1;
+       nodes_clear(node_online_map);
+       node_set_online(0);
 
        np->bootmap_pages = 0;
 
@@ -309,8 +303,6 @@ void __init paging_init(struct meminfo *mi)
        free_area_init_node(0, pgdat, zone_size,
                        bdata->node_boot_start >> PAGE_SHIFT, zhole_size);
 
-       mem_map = NODE_DATA(0)->node_mem_map;
-
        /*
         * finish off the bad pages once
         * the mem_map is initialised
@@ -326,7 +318,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);
-               set_page_count(page, 1);
+               init_page_count(page);
                free_page(addr);
                totalram_pages++;
        }