Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86 Rename:



details:   https://anonhg.NetBSD.org/src/rev/c296b78eb121
branches:  trunk
changeset: 461026:c296b78eb121
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Nov 13 12:55:10 2019 +0000

description:
Rename:
        PP_ATTRS_M -> PP_ATTRS_D
        PP_ATTRS_U -> PP_ATTRS_A
For consistency.

diffstat:

 sys/arch/x86/include/pmap.h    |  10 +++++-----
 sys/arch/x86/include/pmap_pv.h |   6 +++---
 sys/arch/x86/x86/pmap.c        |  26 +++++++++++++-------------
 3 files changed, 21 insertions(+), 21 deletions(-)

diffs (132 lines):

diff -r 69a664968b7d -r c296b78eb121 sys/arch/x86/include/pmap.h
--- a/sys/arch/x86/include/pmap.h       Wed Nov 13 10:52:40 2019 +0000
+++ b/sys/arch/x86/include/pmap.h       Wed Nov 13 12:55:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.103 2019/10/05 07:30:03 maxv Exp $  */
+/*     $NetBSD: pmap.h,v 1.104 2019/11/13 12:55:10 maxv Exp $  */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -327,11 +327,11 @@
 #define        pmap_resident_count(pmap)       ((pmap)->pm_stats.resident_count)
 #define        pmap_wired_count(pmap)          ((pmap)->pm_stats.wired_count)
 
-#define pmap_clear_modify(pg)          pmap_clear_attrs(pg, PP_ATTRS_M)
-#define pmap_clear_reference(pg)       pmap_clear_attrs(pg, PP_ATTRS_U)
+#define pmap_clear_modify(pg)          pmap_clear_attrs(pg, PP_ATTRS_D)
+#define pmap_clear_reference(pg)       pmap_clear_attrs(pg, PP_ATTRS_A)
 #define pmap_copy(DP,SP,D,L,S)         __USE(L)
-#define pmap_is_modified(pg)           pmap_test_attrs(pg, PP_ATTRS_M)
-#define pmap_is_referenced(pg)         pmap_test_attrs(pg, PP_ATTRS_U)
+#define pmap_is_modified(pg)           pmap_test_attrs(pg, PP_ATTRS_D)
+#define pmap_is_referenced(pg)         pmap_test_attrs(pg, PP_ATTRS_A)
 #define pmap_move(DP,SP,D,L,S)
 #define pmap_phys_address(ppn)         (x86_ptob(ppn) & ~X86_MMAP_FLAG_MASK)
 #define pmap_mmap_flags(ppn)           x86_mmap_flags(ppn)
diff -r 69a664968b7d -r c296b78eb121 sys/arch/x86/include/pmap_pv.h
--- a/sys/arch/x86/include/pmap_pv.h    Wed Nov 13 10:52:40 2019 +0000
+++ b/sys/arch/x86/include/pmap_pv.h    Wed Nov 13 12:55:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_pv.h,v 1.5 2019/03/09 08:42:26 maxv Exp $ */
+/*     $NetBSD: pmap_pv.h,v 1.6 2019/11/13 12:55:10 maxv Exp $ */
 
 /*-
  * Copyright (c)2008 YAMAMOTO Takashi,
@@ -82,8 +82,8 @@
 #define        pp_link pp_u.u_link
        uint8_t pp_flags;
        uint8_t pp_attrs;
-#define PP_ATTRS_M     0x01    /* Dirty */
-#define PP_ATTRS_U     0x02    /* Accessed */
+#define PP_ATTRS_D     0x01    /* Dirty */
+#define PP_ATTRS_A     0x02    /* Accessed */
 #define PP_ATTRS_W     0x04    /* Writable */
 };
 
diff -r 69a664968b7d -r c296b78eb121 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Wed Nov 13 10:52:40 2019 +0000
+++ b/sys/arch/x86/x86/pmap.c   Wed Nov 13 12:55:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.337 2019/10/30 07:40:05 maxv Exp $  */
+/*     $NetBSD: pmap.c,v 1.338 2019/11/13 12:55:10 maxv Exp $  */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.337 2019/10/30 07:40:05 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.338 2019/11/13 12:55:10 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -3434,9 +3434,9 @@
 {
        uint8_t ret = 0;
        if (pte & PTE_D)
-               ret |= PP_ATTRS_M;
+               ret |= PP_ATTRS_D;
        if (pte & PTE_A)
-               ret |= PP_ATTRS_U;
+               ret |= PP_ATTRS_A;
        if (pte & PTE_W)
                ret |= PP_ATTRS_W;
        return ret;
@@ -3446,9 +3446,9 @@
 pmap_pp_attrs_to_pte(uint8_t attrs)
 {
        pt_entry_t pte = 0;
-       if (attrs & PP_ATTRS_M)
+       if (attrs & PP_ATTRS_D)
                pte |= PTE_D;
-       if (attrs & PP_ATTRS_U)
+       if (attrs & PP_ATTRS_A)
                pte |= PTE_A;
        if (attrs & PP_ATTRS_W)
                pte |= PTE_W;
@@ -3674,7 +3674,7 @@
        expect = pmap_pa2pte(pa) | PTE_P;
 
        if (clearbits != ~0) {
-               KASSERT((clearbits & ~(PP_ATTRS_M|PP_ATTRS_U|PP_ATTRS_W)) == 0);
+               KASSERT((clearbits & ~(PP_ATTRS_D|PP_ATTRS_A|PP_ATTRS_W)) == 0);
                clearbits = pmap_pp_attrs_to_pte(clearbits);
        }
 
@@ -4938,11 +4938,11 @@
        uint8_t ret = 0;
        if (pmap_ept_has_ad) {
                if (ept & EPT_D)
-                       ret |= PP_ATTRS_M;
+                       ret |= PP_ATTRS_D;
                if (ept & EPT_A)
-                       ret |= PP_ATTRS_U;
+                       ret |= PP_ATTRS_A;
        } else {
-               ret |= (PP_ATTRS_M|PP_ATTRS_U);
+               ret |= (PP_ATTRS_D|PP_ATTRS_A);
        }
        if (ept & EPT_W)
                ret |= PP_ATTRS_W;
@@ -4953,9 +4953,9 @@
 pmap_pp_attrs_to_ept(uint8_t attrs)
 {
        pt_entry_t ept = 0;
-       if (attrs & PP_ATTRS_M)
+       if (attrs & PP_ATTRS_D)
                ept |= EPT_D;
-       if (attrs & PP_ATTRS_U)
+       if (attrs & PP_ATTRS_A)
                ept |= EPT_A;
        if (attrs & PP_ATTRS_W)
                ept |= EPT_W;
@@ -5531,7 +5531,7 @@
        pmap = ptp_to_pmap(ptp);
 
        if (clearbits != ~0) {
-               KASSERT((clearbits & ~(PP_ATTRS_M|PP_ATTRS_U|PP_ATTRS_W)) == 0);
+               KASSERT((clearbits & ~(PP_ATTRS_D|PP_ATTRS_A|PP_ATTRS_W)) == 0);
                clearbits = pmap_pp_attrs_to_ept(clearbits);
        }
 



Home | Main Index | Thread Index | Old Index