summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/pgtable-32.c
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2019-11-21 18:21:33 +0200
committerPaul Burton <paulburton@kernel.org>2019-11-22 10:51:22 -0800
commit2bee1b58484f036e3e2dc657e524d095d0d332b3 (patch)
treee3ee8827fbfbafa8f3a8a3b82c7e46b5de6048a7 /arch/mips/mm/pgtable-32.c
parent31168f033e3751d1c9245d9ee847d775af16dcd6 (diff)
downloadlinux-2bee1b58484f036e3e2dc657e524d095d0d332b3.tar.bz2
mips: add support for folded p4d page tables
Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5leve-fixup.h with pgtable-nop4d.h and drop usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: Mike Rapoport <rppt@kernel.org>
Diffstat (limited to 'arch/mips/mm/pgtable-32.c')
-rw-r--r--arch/mips/mm/pgtable-32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/mm/pgtable-32.c b/arch/mips/mm/pgtable-32.c
index 621a01fbef64..37c7a01427d2 100644
--- a/arch/mips/mm/pgtable-32.c
+++ b/arch/mips/mm/pgtable-32.c
@@ -56,6 +56,7 @@ void __init pagetable_init(void)
pgd_t *pgd_base;
#ifdef CONFIG_HIGHMEM
pgd_t *pgd;
+ p4d_t *p4d;
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
@@ -82,7 +83,8 @@ void __init pagetable_init(void)
fixrange_init(vaddr & PMD_MASK, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base);
pgd = swapper_pg_dir + pgd_index(vaddr);
- pud = pud_offset(pgd, vaddr);
+ p4d = p4d_offset(pgd, vaddr);
+ pud = pud_offset(p4d, vaddr);
pmd = pmd_offset(pud, vaddr);
pte = pte_offset_kernel(pmd, vaddr);
pkmap_page_table = pte;