vserver 1.9.3
[linux-2.6.git] / arch / arm / mm / init.c
index 060fea2..d7b4441 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/swap.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
+#include <linux/mman.h>
 #include <linux/initrd.h>
 
 #include <asm/mach-types.h>
@@ -344,7 +345,7 @@ static inline void free_bootmem_node_bank(int node, struct meminfo *mi)
  * Initialise the bootmem allocator for all nodes.  This is called
  * early during the architecture specific initialisation.
  */
-void __init bootmem_init(struct meminfo *mi)
+static void __init bootmem_init(struct meminfo *mi)
 {
        struct node_info node_info[MAX_NUMNODES], *np = node_info;
        unsigned int bootmap_pages, bootmap_pfn, map_pg;
@@ -412,9 +413,7 @@ void __init bootmem_init(struct meminfo *mi)
        }
 #endif
 
-       if (map_pg != bootmap_pfn + bootmap_pages)
-               BUG();
-
+       BUG_ON(map_pg != bootmap_pfn + bootmap_pages);
 }
 
 /*
@@ -426,6 +425,8 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
        void *zero_page;
        int node;
 
+       bootmem_init(mi);
+
        memcpy(&meminfo, mi, sizeof(meminfo));
 
        /*
@@ -495,7 +496,7 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
                 */
                arch_adjust_zones(node, zone_size, zhole_size);
 
-               free_area_init_node(node, pgdat, NULL, zone_size,
+               free_area_init_node(node, pgdat, zone_size,
                                bdata->node_boot_start >> PAGE_SHIFT, zhole_size);
        }
 
@@ -590,7 +591,7 @@ void __init mem_init(void)
                 * anywhere without overcommit, so turn
                 * it on by default.
                 */
-               sysctl_overcommit_memory = 1;
+               sysctl_overcommit_memory = OVERCOMMIT_ALWAYS;
        }
 }