Merge branch 'master' of /usr/src/ntfs-2.6/
[sfrench/cifs-2.6.git] / arch / powerpc / mm / init_32.c
index bf13c14e66b3a89fead856c220fb692cbdd61152..7d0d75c11848ec7ca0e1c8b0468e7958e47a1331 100644 (file)
@@ -43,7 +43,6 @@
 #include <asm/machdep.h>
 #include <asm/btext.h>
 #include <asm/tlb.h>
-#include <asm/bootinfo.h>
 #include <asm/prom.h>
 #include <asm/lmb.h>
 #include <asm/sections.h>
@@ -69,6 +68,7 @@ unsigned long ppc_memoffset = PAGE_OFFSET;
 int boot_mapsize;
 #ifdef CONFIG_PPC_PMAC
 unsigned long agp_special_page;
+EXPORT_SYMBOL(agp_special_page);
 #endif
 
 #ifdef CONFIG_HIGHMEM
@@ -84,9 +84,6 @@ void MMU_init(void);
 /* XXX should be in current.h  -- paulus */
 extern struct task_struct *current_set[NR_CPUS];
 
-char *klimit = _end;
-struct device_node *memory_node;
-
 extern int init_bootmem_done;
 
 /*
@@ -153,10 +150,13 @@ void __init MMU_init(void)
         * in the fixed entries */
        adjust_total_lowmem();
 #endif /* CONFIG_FSL_BOOKE */
+
        if (total_lowmem > __max_low_memory) {
                total_lowmem = __max_low_memory;
 #ifndef CONFIG_HIGHMEM
                total_memory = total_lowmem;
+               lmb_enforce_memory_limit(total_lowmem);
+               lmb_analyze();
 #endif /* CONFIG_HIGHMEM */
        }
 
@@ -189,11 +189,9 @@ void __init MMU_init(void)
        if (ppc_md.progress)
                ppc_md.progress("MMU:exit", 0x211);
 
+       /* From now on, btext is no longer BAT mapped if it was at all */
 #ifdef CONFIG_BOOTX_TEXT
-       /* By default, we are no longer mapped */
-               boot_text_mapped = 0;
-       /* Must be done last, or ppc_md.progress will die. */
-       map_boot_text();
+       btext_unmap();
 #endif
 }