summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/ioremap.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/ioremap.c
parent31168f033e3751d1c9245d9ee847d775af16dcd6 (diff)
downloadlinux-stable-2bee1b58484f036e3e2dc657e524d095d0d332b3.tar.gz
linux-stable-2bee1b58484f036e3e2dc657e524d095d0d332b3.tar.bz2
linux-stable-2bee1b58484f036e3e2dc657e524d095d0d332b3.zip
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/ioremap.c')
-rw-r--r--arch/mips/mm/ioremap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index 1601d90b087b..8317f337a86e 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -78,11 +78,15 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr,
flush_cache_all();
BUG_ON(address >= end);
do {
+ p4d_t *p4d;
pud_t *pud;
pmd_t *pmd;
error = -ENOMEM;
- pud = pud_alloc(&init_mm, dir, address);
+ p4d = p4d_alloc(&init_mm, dir, address);
+ if (!p4d)
+ break;
+ pud = pud_alloc(&init_mm, p4d, address);
if (!pud)
break;
pmd = pmd_alloc(&init_mm, pud, address);