Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm/pmap Use pte_set



details:   https://anonhg.NetBSD.org/src/rev/7651113d64bd
branches:  trunk
changeset: 354659:7651113d64bd
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jun 24 07:30:17 2017 +0000

description:
Use pte_set

diffstat:

 sys/uvm/pmap/pmap.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (99 lines):

diff -r 9170efb6cb43 -r 7651113d64bd sys/uvm/pmap/pmap.c
--- a/sys/uvm/pmap/pmap.c       Sat Jun 24 07:19:59 2017 +0000
+++ b/sys/uvm/pmap/pmap.c       Sat Jun 24 07:30:17 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.34 2017/05/12 05:45:58 skrll Exp $  */
+/*     $NetBSD: pmap.c,v 1.35 2017/06/24 07:30:17 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.34 2017/05/12 05:45:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35 2017/06/24 07:30:17 skrll Exp $");
 
 /*
  *     Manages physical address maps.
@@ -773,7 +773,7 @@
 
                pmap_md_tlb_miss_lock_enter();
                const pt_entry_t npte = pte_nv_entry(is_kernel_pmap_p);
-               *ptep = npte;
+               pte_set(ptep, npte);
                /*
                 * Flush the TLB for the given address.
                 */
@@ -902,7 +902,7 @@
                        pmap_remove_pv(pmap, sva, pg, pte_modified_p(pte));
                }
                pmap_md_tlb_miss_lock_enter();
-               *ptep = npte;
+               pte_set(ptep, npte);
                /*
                 * Flush the TLB for the given address.
                 */
@@ -1054,7 +1054,7 @@
                pte = pte_prot_downgrade(pte, prot);
                if (*ptep != pte) {
                        pmap_md_tlb_miss_lock_enter();
-                       *ptep = pte;
+                       pte_set(ptep, pte);
                        /*
                         * Update the TLB if needed.
                         */
@@ -1137,7 +1137,7 @@
                if (pte_valid_p(pte)) {
                        pte = pte_cached_change(pte, cached);
                        pmap_md_tlb_miss_lock_enter();
-                       *ptep = pte;
+                       pte_set(ptep, pte);
                        pmap_tlb_update_addr(pmap, va, pte, PMAP_TLB_NEED_IPI);
                        pmap_md_tlb_miss_lock_exit();
                }
@@ -1271,7 +1271,7 @@
        KASSERT(pte_valid_p(npte));
 
        pmap_md_tlb_miss_lock_enter();
-       *ptep = npte;
+       pte_set(ptep, npte);
        pmap_tlb_update_addr(pmap, va, npte, update_flags);
        pmap_md_tlb_miss_lock_exit();
        kpreempt_enable();
@@ -1357,7 +1357,7 @@
         * don't.  Instead let the next reference to the page do it.
         */
        pmap_md_tlb_miss_lock_enter();
-       *ptep = npte;
+       pte_set(ptep, npte);
        pmap_tlb_update_addr(pmap_kernel(), va, npte, 0);
        pmap_md_tlb_miss_lock_exit();
        kpreempt_enable();
@@ -1407,7 +1407,7 @@
 #endif
 
                pmap_md_tlb_miss_lock_enter();
-               *ptep = new_pte;
+               pte_set(ptep, new_pte);
                pmap_tlb_invalidate_addr(pmap, sva);
                pmap_md_tlb_miss_lock_exit();
        }
@@ -1500,7 +1500,7 @@
 
        if (pte_wired_p(pte)) {
                pmap_md_tlb_miss_lock_enter();
-               *ptep = pte_unwire_entry(pte);
+               pte_set(ptep, pte_unwire_entry(pte));
                pmap_md_tlb_miss_lock_exit();
                pmap->pm_stats.wired_count--;
        }
@@ -1667,7 +1667,7 @@
                KASSERT(pte_valid_p(pte));
                const uintptr_t gen = VM_PAGEMD_PVLIST_UNLOCK(mdpg);
                pmap_md_tlb_miss_lock_enter();
-               *ptep = pte;
+               pte_set(ptep, pte);
                pmap_tlb_invalidate_addr(pmap, va);
                pmap_md_tlb_miss_lock_exit();
                pmap_update(pmap);



Home | Main Index | Thread Index | Old Index