Module Name:    src
Committed By:   rin
Date:           Fri Feb 21 13:16:16 UTC 2020

Modified Files:
        src/sys/arch/powerpc/ibm4xx: pmap.c

Log Message:
In ppc4xx_tlb_find_victim(), mark kernel stack page TLBF_REF instead of
TLBF_USED. This should be originally intended behavior of this code
segment, because

- TLBF_USED is already checked just before, so marking this page
  TLBF_USED is no-op.
- TLBF_REF flag exempts that page from being flushed from TLB in next
  scan, when kernel stack may be still there with high probability.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/powerpc/ibm4xx/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/powerpc/ibm4xx/pmap.c
diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.79 src/sys/arch/powerpc/ibm4xx/pmap.c:1.80
--- src/sys/arch/powerpc/ibm4xx/pmap.c:1.79	Thu Feb 20 05:34:37 2020
+++ src/sys/arch/powerpc/ibm4xx/pmap.c	Fri Feb 21 13:16:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.79 2020/02/20 05:34:37 rin Exp $	*/
+/*	$NetBSD: pmap.c,v 1.80 2020/02/21 13:16:16 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.79 2020/02/20 05:34:37 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.80 2020/02/21 13:16:16 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -1276,7 +1276,7 @@ ppc4xx_tlb_find_victim(void)
 			    (tlb_info[tlbnext].ti_ctx == KERNEL_PID) &&
 			     (flags & TLBF_USED)) {
 				/* Kernel stack page */
-				flags |= TLBF_USED;
+				flags |= TLBF_REF;
 				tlb_info[tlbnext].ti_flags = flags;
 			} else {
 				/* Found it! */

Reply via email to