Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm/pmap Rename pm_count to pm_refcnt



details:   https://anonhg.NetBSD.org/src/rev/c42f3b05d229
branches:  trunk
changeset: 372110:c42f3b05d229
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Oct 27 06:19:56 2022 +0000

description:
Rename pm_count to pm_refcnt

diffstat:

 sys/uvm/pmap/pmap.c |  14 +++++++-------
 sys/uvm/pmap/pmap.h |   4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 2a9a2154e8ba -r c42f3b05d229 sys/uvm/pmap/pmap.c
--- a/sys/uvm/pmap/pmap.c       Thu Oct 27 05:33:37 2022 +0000
+++ b/sys/uvm/pmap/pmap.c       Thu Oct 27 06:19:56 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.69 2022/10/26 07:35:20 skrll Exp $  */
+/*     $NetBSD: pmap.c,v 1.70 2022/10/27 06:19:56 skrll Exp $  */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.69 2022/10/26 07:35:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.70 2022/10/27 06:19:56 skrll Exp $");
 
 /*
  *     Manages physical address maps.
@@ -223,7 +223,7 @@
 
 struct pmap_kernel kernel_pmap_store = {
        .kernel_pmap = {
-               .pm_count = 1,
+               .pm_refcnt = 1,
 #ifdef PMAP_HWPAGEWALKER
                .pm_pdetab = PMAP_INVALID_PDETAB_ADDRESS,
 #endif
@@ -707,7 +707,7 @@
 
        KASSERT(pmap->pm_pai[0].pai_link.le_prev == NULL);
 
-       pmap->pm_count = 1;
+       pmap->pm_refcnt = 1;
        pmap->pm_minaddr = VM_MIN_ADDRESS;
        pmap->pm_maxaddr = VM_MAXUSER_ADDRESS;
 
@@ -751,7 +751,7 @@
        UVMHIST_CALLARGS(pmapxtabhist, "(pmap=%#jx)", (uintptr_t)pmap, 0, 0, 0);
 
        membar_release();
-       if (atomic_dec_uint_nv(&pmap->pm_count) > 0) {
+       if (atomic_dec_uint_nv(&pmap->pm_refcnt) > 0) {
                PMAP_COUNT(dereference);
                UVMHIST_LOG(pmaphist, " <-- done (deref)", 0, 0, 0, 0);
                UVMHIST_LOG(pmapxtabhist, " <-- done (deref)", 0, 0, 0, 0);
@@ -760,7 +760,7 @@
        membar_acquire();
 
        PMAP_COUNT(destroy);
-       KASSERT(pmap->pm_count == 0);
+       KASSERT(pmap->pm_refcnt == 0);
        kpreempt_disable();
        pmap_tlb_miss_lock_enter();
        pmap_tlb_asid_release_all(pmap);
@@ -807,7 +807,7 @@
        PMAP_COUNT(reference);
 
        if (pmap != NULL) {
-               atomic_inc_uint(&pmap->pm_count);
+               atomic_inc_uint(&pmap->pm_refcnt);
        }
 
        UVMHIST_LOG(pmaphist, " <-- done", 0, 0, 0, 0);
diff -r 2a9a2154e8ba -r c42f3b05d229 sys/uvm/pmap/pmap.h
--- a/sys/uvm/pmap/pmap.h       Thu Oct 27 05:33:37 2022 +0000
+++ b/sys/uvm/pmap/pmap.h       Thu Oct 27 06:19:56 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.23 2022/10/27 05:33:37 skrll Exp $  */
+/*     $NetBSD: pmap.h,v 1.24 2022/10/27 06:19:56 skrll Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -189,7 +189,7 @@
  */
 struct pmap {
        struct uvm_object       pm_uobject;
-#define pm_count               pm_uobject.uo_refs /* pmap reference count */
+#define pm_refcnt              pm_uobject.uo_refs /* pmap reference count */
 #define pm_pvp_list            pm_uobject.memq
 
        krwlock_t               pm_obj_lock;    /* lock for pm_uobject */



Home | Main Index | Thread Index | Old Index