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 Comment out the diagnostic message in the...



details:   https://anonhg.NetBSD.org/src/rev/439c3d2b5174
branches:  trunk
changeset: 745741:439c3d2b5174
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Mar 10 04:04:45 2020 +0000

description:
Comment out the diagnostic message in the TLB_MOD handler that's logged if
pmap_tlb_update_addr() indicates that the VA+ASID was not found in the TLB.
It's a harmless race condition that can happen for legitimate reasons (e.g.
a TLB miss in an interrupt handler that evicts the entry from the TLB).

See discussion:
    http://mail-index.netbsd.org/port-mips/2020/03/07/msg000927.html

diffstat:

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

diffs (40 lines):

diff -r f65275e0a4e1 -r 439c3d2b5174 sys/arch/mips/mips/trap.c
--- a/sys/arch/mips/mips/trap.c Tue Mar 10 03:49:56 2020 +0000
+++ b/sys/arch/mips/mips/trap.c Tue Mar 10 04:04:45 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.250 2020/03/07 18:49:49 thorpej Exp $       */
+/*     $NetBSD: trap.c,v 1.251 2020/03/10 04:04:45 thorpej Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.250 2020/03/07 18:49:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.251 2020/03/10 04:04:45 thorpej Exp $");
 
 #include "opt_cputype.h"       /* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -296,10 +296,20 @@
                vaddr = trunc_page(vaddr);
                int ok = pmap_tlb_update_addr(pmap, vaddr, pte, 0);
                kpreempt_enable();
-               if (ok != 1)
+               if (ok != 1) {
+#if 0 /* PMAP_FAULTINFO? */
+                       /*
+                        * Since we don't block interrupts here,
+                        * this can legitimately happen if we get
+                        * a TLB miss that's serviced in an interrupt
+                        * hander that happens to randomly evict the
+                        * TLB entry we're concerned about.
+                        */
                        printf("pmap_tlb_update_addr(%p,%#"
                            PRIxVADDR",%#"PRIxPTE", 0) returned %d\n",
                            pmap, vaddr, pte_value(pte), ok);
+#endif
+               }
                paddr_t pa = pte_to_paddr(pte);
                KASSERTMSG(uvm_pageismanaged(pa),
                    "%#"PRIxVADDR" pa %#"PRIxPADDR, vaddr, pa);



Home | Main Index | Thread Index | Old Index