diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2025-06-22 16:49:45 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2025-07-05 08:36:08 +0000 |
| commit | ee502c8531833d7a0d4bc4c72cc05227f4a3715a (patch) | |
| tree | 26cf253c81c24d3e9f1cf79a76aa8c2f774585c6 | |
| parent | 6eb141a2c4731130bfac670708a8b90f7cdff742 (diff) | |
amd64 pmap: update comment in pmap_demote_DMAP() explaining the len<NBPDP check
Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50970
| -rw-r--r-- | sys/amd64/amd64/pmap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 443273b42f4d..6b883ae33b68 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -9944,11 +9944,13 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, } /* - * Demotes any mapping within the direct map region that covers more than the - * specified range of physical addresses. This range's size must be a power - * of two and its starting address must be a multiple of its size. Since the - * demotion does not change any attributes of the mapping, a TLB invalidation - * is not mandatory. The caller may, however, request a TLB invalidation. + * Demotes any mapping within the direct map region that covers more + * than the specified range of physical addresses. This range's size + * must be a power of two and its starting address must be a multiple + * of its size, which means that any pdp from the mapping is fully + * covered by the range if len > NBPDP. Since the demotion does not + * change any attributes of the mapping, a TLB invalidation is not + * mandatory. The caller may, however, request a TLB invalidation. */ void pmap_demote_DMAP(vm_paddr_t base, vm_size_t len, bool invalidate) |
