Module Name:    src
Committed By:   thorpej
Date:           Fri Dec 22 17:55:49 UTC 2023

Modified Files:
        src/sys/arch/vax/vax: pmap.c

Log Message:
rmspace(): when a PT page is put back onto the free list, invalidate
it's VA in the TB.

rmptep(): Add a comment that the no TIBS is needed for newly-freed PT
pages here because all of the callers perform a TBIA.


To generate a diff of this commit:
cvs rdiff -u -r1.199 -r1.200 src/sys/arch/vax/vax/pmap.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/vax/vax/pmap.c
diff -u src/sys/arch/vax/vax/pmap.c:1.199 src/sys/arch/vax/vax/pmap.c:1.200
--- src/sys/arch/vax/vax/pmap.c:1.199	Thu Dec 21 09:09:43 2023
+++ src/sys/arch/vax/vax/pmap.c	Fri Dec 22 17:55:49 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.199 2023/12/21 09:09:43 mrg Exp $	   */
+/*	$NetBSD: pmap.c,v 1.200 2023/12/22 17:55:49 thorpej Exp $	   */
 /*
  * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.199 2023/12/21 09:09:43 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.200 2023/12/22 17:55:49 thorpej Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -633,6 +633,7 @@ rmspace(struct pmap *pm)
 		}
 		free_ptp((((struct pte *)ptpp)->pg_pfn << VAX_PGSHIFT));
 		*ptpp = 0;
+		mtpr((vaddr_t)br, PR_TBIS);
 	}
 	lr = pm->pm_p1lr/NPTEPG;
 	for (i = lr; i < NPTEPERREG/NPTEPG; i++) {
@@ -647,6 +648,7 @@ rmspace(struct pmap *pm)
 		}
 		free_ptp((((struct pte *)ptpp)->pg_pfn << VAX_PGSHIFT));
 		*ptpp = 0;
+		mtpr((vaddr_t)br, PR_TBIS);
 	}
 
 	if (pm->pm_p0lr != 0)
@@ -772,6 +774,7 @@ rmptep(struct pte *pte)
 #endif
 	free_ptp((((struct pte *)ptpp)->pg_pfn << VAX_PGSHIFT));
 	*ptpp = 0;
+	/* N.B. callers all do a TBIA, so TBIS not needed here. */
 }
 
 static int

Reply via email to