diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-02-18 00:32:11 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2021-02-18 00:32:11 +0000 |
commit | 67932460c7b6893a637a47d98d5f29d63e92c727 (patch) | |
tree | 23ed861340f70fdc62a8048e99bb81571d4dbf1e /sys/riscv/riscv | |
parent | fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 (diff) | |
download | src-67932460c7b6893a637a47d98d5f29d63e92c727.tar.gz src-67932460c7b6893a637a47d98d5f29d63e92c727.zip |
Add a VA_IS_CLEANMAP() macro.
This macro returns true if a provided virtual address is contained
in the kernel's clean submap.
In CHERI kernels, the buffer cache and transient I/O map are allocated
as separate regions. Abstracting this check reduces the diff relative
to FreeBSD. It is perhaps slightly more readable as well.
Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D28710
Diffstat (limited to 'sys/riscv/riscv')
-rw-r--r-- | sys/riscv/riscv/pmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index f30dda17afae..d0b51d5199e2 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -3103,7 +3103,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pd_entry_t *l2; pt_entry_t *l3, newl3; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); rw_assert(&pvh_global_lock, RA_LOCKED); |