Module Name:    src
Committed By:   skrll
Date:           Mon Jun  5 10:45:36 UTC 2017

Modified Files:
        src/sys/arch/mips/mips: pmap_machdep.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/mips/mips/pmap_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/mips/pmap_machdep.c
diff -u src/sys/arch/mips/mips/pmap_machdep.c:1.19 src/sys/arch/mips/mips/pmap_machdep.c:1.20
--- src/sys/arch/mips/mips/pmap_machdep.c:1.19	Thu May 18 13:20:37 2017
+++ src/sys/arch/mips/mips/pmap_machdep.c	Mon Jun  5 10:45:36 2017
@@ -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_md_vca_add(struct vm_page *pg, vadd
 		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;

Reply via email to