Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips Fix the PMAP_NO_PV_UNCACHED pmap_md_vca_a...



details:   https://anonhg.NetBSD.org/src/rev/7655a8090213
branches:  trunk
changeset: 354136:7655a8090213
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jun 05 10:45:36 2017 +0000

description:
Fix the PMAP_NO_PV_UNCACHED pmap_md_vca_add case where the pmap_update
call would cause problems for pmap_remove_all case where the deferred
activate should not be done...

Add a comment about what's going on.

diffstat:

 sys/arch/mips/mips/pmap_machdep.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 17c757f55254 -r 7655a8090213 sys/arch/mips/mips/pmap_machdep.c
--- a/sys/arch/mips/mips/pmap_machdep.c Mon Jun 05 09:20:05 2017 +0000
+++ b/sys/arch/mips/mips/pmap_machdep.c Mon Jun 05 10:45:36 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_machdep.c,v 1.19 2017/05/18 13:20:37 skrll Exp $  */
+/*     $NetBSD: pmap_machdep.c,v 1.20 2017/06/05 10:45:36 skrll Exp $  */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.19 2017/05/18 13:20:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.20 2017/06/05 10:45:36 skrll Exp $");
 
 /*
  *     Manages physical address maps.
@@ -954,7 +954,14 @@
                pmap_t npm = npv->pv_pmap;
                VM_PAGEMD_PVLIST_UNLOCK(mdpg);
                pmap_remove(npm, nva, nva + PAGE_SIZE);
-               pmap_update(npm);
+
+               /*
+                * pmap_update is not required here as we're the pmap
+                * and we know that the invalidation happened or the
+                * asid has been released (and activation is deferred)
+                *
+                * A deferred activation should NOT occur here.
+                */
                (void)VM_PAGEMD_PVLIST_LOCK(mdpg);
 
                npv = pv;



Home | Main Index | Thread Index | Old Index