Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 pmap_unmap_ptes(): ci_want_pmapload isn't d...



details:   https://anonhg.NetBSD.org/src/rev/ffc5c817e182
branches:  trunk
changeset: 847279:ffc5c817e182
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Dec 16 19:20:45 2019 +0000

description:
pmap_unmap_ptes(): ci_want_pmapload isn't dependant on TLB state.

diffstat:

 sys/arch/x86/x86/pmap.c |  19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diffs (41 lines):

diff -r 299f1ebca624 -r ffc5c817e182 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Mon Dec 16 19:18:26 2019 +0000
+++ b/sys/arch/x86/x86/pmap.c   Mon Dec 16 19:20:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.345 2019/12/15 20:33:22 ad Exp $    */
+/*     $NetBSD: pmap.c,v 1.346 2019/12/16 19:20:45 ad Exp $    */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.345 2019/12/15 20:33:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.346 2019/12/16 19:20:45 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -707,13 +707,16 @@
         * Mark whatever's on the CPU now as lazy and unlock.
         * If the pmap was already installed, we are done.
         */
-       if (ci->ci_pmap != mypmap && ci->ci_tlbstate == TLBSTATE_VALID) {
-               ci->ci_tlbstate = TLBSTATE_LAZY;
+       if (ci->ci_pmap != mypmap) {
                ci->ci_want_pmapload = (mypmap != pmap_kernel());
-       } else {
-               /*
-                * This can happen when undoing after pmap_get_ptp blocked.
-                */ 
+               if (ci->ci_tlbstate == TLBSTATE_VALID) {
+                       ci->ci_tlbstate = TLBSTATE_LAZY;
+               } else {
+                       /*
+                        * This can happen when undoing after pmap_get_ptp
+                        * blocked.
+                        */
+               }
        }
 
        /* Now safe to free PTPs, with the pmap still locked. */



Home | Main Index | Thread Index | Old Index