m68k: mm: use pgtable-nopXd instead of 4level-fixup
[linux-2.6-microblaze.git] / arch / m68k / mm / mcfmmu.c
index 6cb1e41..0ea3756 100644 (file)
@@ -92,6 +92,8 @@ int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word)
        unsigned long flags, mmuar, mmutr;
        struct mm_struct *mm;
        pgd_t *pgd;
+       p4d_t *p4d;
+       pud_t *pud;
        pmd_t *pmd;
        pte_t *pte;
        int asid;
@@ -113,7 +115,19 @@ int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word)
                return -1;
        }
 
-       pmd = pmd_offset(pgd, mmuar);
+       p4d = p4d_offset(pgd, mmuar);
+       if (p4d_none(*p4d)) {
+               local_irq_restore(flags);
+               return -1;
+       }
+
+       pud = pud_offset(p4d, mmuar);
+       if (pud_none(*pud)) {
+               local_irq_restore(flags);
+               return -1;
+       }
+
+       pmd = pmd_offset(pud, mmuar);
        if (pmd_none(*pmd)) {
                local_irq_restore(flags);
                return -1;