diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4565,9 +4565,8 @@ register_t intr; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - - if ((newpte & ATTR_SW_NO_PROMOTE) != 0) - panic("%s: Updating non-promote pte", __func__); + KASSERT((newpte & ATTR_SW_NO_PROMOTE) == 0, + ("%s: Updating non-promote pte", __func__)); /* * Ensure we don't get switched out with the page table in an @@ -4608,9 +4607,8 @@ register_t intr; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - - if ((newpte & ATTR_SW_NO_PROMOTE) != 0) - panic("%s: Updating non-promote pte", __func__); + KASSERT((newpte & ATTR_SW_NO_PROMOTE) == 0, + ("%s: Updating non-promote pte", __func__)); /* * Ensure we don't get switched out with the page table in an