]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/kernel/mem.c
Merge branch 'juju' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux13...
[linux-2.6-omap-h63xx.git] / arch / um / kernel / mem.c
index d1480ff0f2a61518ec1c27f755f9d53ab93a4d13..72ff85693a399846bcb54ada54396d6ddf68b0a4 100644 (file)
@@ -13,8 +13,8 @@
 #include "asm/page.h"
 #include "asm/fixmap.h"
 #include "asm/pgalloc.h"
-#include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "kern.h"
 #include "mem_user.h"
 #include "uml_uaccess.h"
@@ -24,8 +24,9 @@
 #include "init.h"
 #include "kern_constants.h"
 
-/* Changed during early boot */
+/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
 unsigned long *empty_zero_page = NULL;
+/* allocated in paging_init and unchanged thereafter */
 unsigned long *empty_bad_page = NULL;
 pgd_t swapper_pg_dir[PTRS_PER_PGD];
 unsigned long long highmem;
@@ -63,8 +64,6 @@ static void setup_highmem(unsigned long highmem_start,
 
 void mem_init(void)
 {
-       max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT;
-
        /* clear the zero-page */
        memset((void *) empty_zero_page, 0, PAGE_SIZE);
 
@@ -79,6 +78,7 @@ void mem_init(void)
 
        /* this will put all low memory onto the freelists */
        totalram_pages = free_all_bootmem();
+       max_low_pfn = totalram_pages;
 #ifdef CONFIG_HIGHMEM
        totalhigh_pages = highmem >> PAGE_SHIFT;
        totalram_pages += totalhigh_pages;
@@ -216,7 +216,7 @@ static void __init fixaddr_user_init( void)
 #endif
 }
 
-void paging_init(void)
+void __init paging_init(void)
 {
        unsigned long zones_size[MAX_NR_ZONES], vaddr;
        int i;