ARC: mm: support 3 levels of page tables
[linux-2.6-microblaze.git] / arch / arc / mm / fault.c
index f5657cb..8da2f0a 100644 (file)
@@ -33,12 +33,14 @@ noinline static int handle_kernel_vaddr_fault(unsigned long address)
        pud_t *pud, *pud_k;
        pmd_t *pmd, *pmd_k;
 
-       pgd = pgd_offset_fast(current->active_mm, address);
+       pgd = pgd_offset(current->active_mm, address);
        pgd_k = pgd_offset_k(address);
 
        if (!pgd_present(*pgd_k))
                goto bad_area;
 
+       set_pgd(pgd, *pgd_k);
+
        p4d = p4d_offset(pgd, address);
        p4d_k = p4d_offset(pgd_k, address);
        if (!p4d_present(*p4d_k))
@@ -49,6 +51,8 @@ noinline static int handle_kernel_vaddr_fault(unsigned long address)
        if (!pud_present(*pud_k))
                goto bad_area;
 
+       set_pud(pud, *pud_k);
+
        pmd = pmd_offset(pud, address);
        pmd_k = pmd_offset(pud_k, address);
        if (!pmd_present(*pmd_k))