git: 3dc2a8848986 - main - arm64 pmap: Convert panic()s to KASSERT()s
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 31 May 2024 21:54:58 UTC
The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=3dc2a8848986df2c10ae7df4ce87a1538f549a85 commit 3dc2a8848986df2c10ae7df4ce87a1538f549a85 Author: Alan Cox <alc@FreeBSD.org> AuthorDate: 2024-05-31 17:22:14 +0000 Commit: Alan Cox <alc@FreeBSD.org> CommitDate: 2024-05-31 21:54:27 +0000 arm64 pmap: Convert panic()s to KASSERT()s There is no reason for the ATTR_SW_NO_PROMOTE checks in pmap_update_{entry,strided}() to be panic()s instead of KASSERT()s. Requested by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45424 --- sys/arm64/arm64/pmap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index cd7837e58380..aaba6ca189a1 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4565,9 +4565,8 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, 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 @@ pmap_update_strided(pmap_t pmap, pd_entry_t *ptep, pd_entry_t *ptep_end, 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