]> err.no Git - linux-2.6/blobdiff - arch/powerpc/mm/ppc_mmu_32.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / arch / powerpc / mm / ppc_mmu_32.c
index ab5cd724b1222c12aade7e114ee5c9c31293916a..ec1421a20aaab96d94f6ea162066a95df81fd602 100644 (file)
@@ -23,7 +23,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/init.h>
@@ -43,13 +42,13 @@ unsigned long _SDR1;
 union ubat {                   /* BAT register values to be loaded */
        BAT     bat;
        u32     word[2];
-} BATS[4][2];                  /* 4 pairs of IBAT, DBAT */
+} BATS[8][2];                  /* 8 pairs of IBAT, DBAT */
 
 struct batrange {              /* stores address ranges mapped by BATs */
        unsigned long start;
        unsigned long limit;
        unsigned long phys;
-} bat_addrs[4];
+} bat_addrs[8];
 
 /*
  * Return PA for this VA if it is mapped by a BAT, or 0
@@ -86,8 +85,10 @@ unsigned long __init mmu_mapin_ram(void)
        unsigned long max_size = (256<<20);
        unsigned long align;
 
-       if (__map_without_bats)
+       if (__map_without_bats) {
+               printk(KERN_DEBUG "RAM mapped without BATs\n");
                return 0;
+       }
 
        /* Set up BAT2 and if necessary BAT3 to cover RAM. */
 
@@ -184,7 +185,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
 
        if (Hash == 0)
                return;
-       pmd = pmd_offset(pgd_offset(mm, ea), ea);
+       pmd = pmd_offset(pud_offset(pgd_offset(mm, ea), ea), ea);
        if (!pmd_none(*pmd))
                add_hash_page(mm->context.id, ea, pmd_val(*pmd));
 }