Module Name: src
Committed By: matt
Date: Sat Feb 27 21:29:01 UTC 2010
Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: pmap_tlb.c
Log Message:
Fix for non DIAGNOSTIC kernels
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/mips/pmap_tlb.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/pmap_tlb.c
diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.6 src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.7
--- src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.6 Sat Feb 27 20:10:26 2010
+++ src/sys/arch/mips/mips/pmap_tlb.c Sat Feb 27 21:29:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.1.2.6 2010/02/27 20:10:26 snj Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.1.2.7 2010/02/27 21:29:01 matt 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.1.2.6 2010/02/27 20:10:26 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.1.2.7 2010/02/27 21:29:01 matt Exp $");
/*
* Manages address spaces in a TLB.
@@ -612,7 +612,9 @@
* a new one.
*/
if (__predict_false(TLBINFO_ASID_INUSE_P(ti, ti->ti_asid_hint))) {
+#ifdef DIAGNOSTIC
const size_t words = __arraycount(ti->ti_asid_bitmap);
+#endif
const size_t nbpw = 8 * sizeof(ti->ti_asid_bitmap[0]);
for (size_t i = 0; i < ti->ti_asid_hint / nbpw; i++) {
KASSERT(~ti->ti_asid_bitmap[i] == 0);