From 4f86ff4e47e5a8b58211e0e3c5071e3f172a0eba Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 14 Dec 2018 21:03:01 +0000 Subject: [PATCH] Assume that pmap_l1() will return a PTE. pmaps on RISC-V always have an L1 page table page, so we don't need to check for this when performing lookups. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18563 --- sys/riscv/riscv/pmap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index deb834d0e3f0..570a1b30317f 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -316,8 +316,6 @@ pmap_l2(pmap_t pmap, vm_offset_t va) pd_entry_t *l1; l1 = pmap_l1(pmap, va); - if (l1 == NULL) - return (NULL); if ((pmap_load(l1) & PTE_V) == 0) return (NULL); if ((pmap_load(l1) & PTE_RX) != 0)