The branch main has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ee502c8531833d7a0d4bc4c72cc05227f4a3715a

commit ee502c8531833d7a0d4bc4c72cc05227f4a3715a
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2025-06-22 16:49:45 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2025-07-05 08:36:08 +0000

    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
---
 sys/amd64/amd64/pmap.c | 12 +++++++-----
 1 file 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)

Reply via email to