Module Name: src Committed By: thorpej Date: Tue Mar 10 04:04:45 UTC 2020
Modified Files: src/sys/arch/mips/mips: trap.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.250 -r1.251 src/sys/arch/mips/mips/trap.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/trap.c diff -u src/sys/arch/mips/mips/trap.c:1.250 src/sys/arch/mips/mips/trap.c:1.251 --- src/sys/arch/mips/mips/trap.c:1.250 Sat Mar 7 18:49:49 2020 +++ src/sys/arch/mips/mips/trap.c Tue Mar 10 04:04:45 2020 @@ -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 @@ trap(uint32_t status, uint32_t cause, va 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);