Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm/pmap adjust KASSERT() triggered in PR port-cobalt/53...



details:   https://anonhg.NetBSD.org/src/rev/64b4aa1e8f5f
branches:  trunk
changeset: 359787:64b4aa1e8f5f
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Feb 25 16:44:31 2018 +0000

description:
adjust KASSERT() triggered in PR port-cobalt/53054 to provide more info

diffstat:

 sys/uvm/pmap/pmap_tlb.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 7948915f6fe7 -r 64b4aa1e8f5f sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c   Sun Feb 25 15:31:07 2018 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c   Sun Feb 25 16:44:31 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_tlb.c,v 1.26 2018/02/21 21:53:54 jdolecek Exp $   */
+/*     $NetBSD: pmap_tlb.c,v 1.27 2018/02/25 16:44:31 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.26 2018/02/21 21:53:54 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.27 2018/02/25 16:44:31 jdolecek Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -457,7 +457,11 @@
                const u_int asids_found = tlb_record_asids(
                    ti->ti_asid_bitmap._b, ti->ti_asid_max);
                pmap_tlb_asid_check();
-               KASSERT(asids_found == pmap_tlb_asid_count(ti));
+#ifdef DIAGNOSTIC
+               const u_int asids_count = pmap_tlb_asid_count(ti);
+#endif
+               KASSERTMSG(asids_found == asids_count,
+                   "found %u != count %u", asids_found, asids_count);
                if (__predict_false(asids_found >= ti->ti_asid_max / 2)) {
                        tlb_invalidate_asids(KERNEL_PID + 1, ti->ti_asid_max);
 #else /* MULTIPROCESSOR && !PMAP_TLB_NEED_SHOOTDOWN */



Home | Main Index | Thread Index | Old Index