Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 2025 01:44:20 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 7b2ec2a56215 - stable/14 - amd64 pmap: update comment in pmap_demote_DMAP() explaining the len<NBPDP check
Message-ID:  <202507120144.56C1iKqG050535@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

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

commit 7b2ec2a562154c84f79140f1b174f649bfa0752f
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-06-22 16:49:45 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-07-12 01:41:33 +0000

    amd64 pmap: update comment in pmap_demote_DMAP() explaining the len<NBPDP check
    
    (cherry picked from commit ee502c8531833d7a0d4bc4c72cc05227f4a3715a)
---
 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 6259ad33c6a1..77a836df46ad 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -9927,11 +9927,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, boolean_t invalidate)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507120144.56C1iKqG050535>