Module Name: src Committed By: matt Date: Tue Mar 15 07:32:53 UTC 2011
Modified Files: src/sys/arch/mips/mips: pmap_tlb.c Log Message: Use KDASSERT and kpreempt_disable/enable in pmap_tlb_asid_check To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.2 src/sys/arch/mips/mips/pmap_tlb.c:1.3 --- src/sys/arch/mips/mips/pmap_tlb.c:1.2 Sun Feb 20 07:45:48 2011 +++ src/sys/arch/mips/mips/pmap_tlb.c Tue Mar 15 07:32:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.2 2011/02/20 07:45:48 matt Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.3 2011/03/15 07:32:53 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.2 2011/02/20 07:45:48 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.3 2011/03/15 07:32:53 matt Exp $"); /* * Manages address spaces in a TLB. @@ -1034,11 +1034,13 @@ pmap_tlb_asid_check(void) { #ifdef DEBUG + kpreempt_disable(); uint32_t tlb_hi; __asm("mfc0 %0,$%1" : "=r"(tlb_hi) : "n"(MIPS_COP_0_TLB_HI)); uint32_t asid = (tlb_hi & MIPS_TLB_PID) >> MIPS_TLB_PID_SHIFT; - KASSERTMSG(asid == curcpu()->ci_pmap_asid_cur, + KDASSERTMSG(asid == curcpu()->ci_pmap_asid_cur, ("tlb_hi (%#x) asid (%#x) != current asid (%#x)", tlb_hi, asid, curcpu()->ci_pmap_asid_cur)); + kpreempt_enable(); #endif }