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 Use KDASSERT and kpreempt_disable/enable ...
details: https://anonhg.NetBSD.org/src/rev/848c7480b950
branches: trunk
changeset: 763247:848c7480b950
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 15 07:32:53 2011 +0000
description:
Use KDASSERT and kpreempt_disable/enable in pmap_tlb_asid_check
diffstat:
sys/arch/mips/mips/pmap_tlb.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 5a5171d0dd68 -r 848c7480b950 sys/arch/mips/mips/pmap_tlb.c
--- a/sys/arch/mips/mips/pmap_tlb.c Tue Mar 15 07:31:33 2011 +0000
+++ b/sys/arch/mips/mips/pmap_tlb.c Tue Mar 15 07:32:53 2011 +0000
@@ -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
}
Home |
Main Index |
Thread Index |
Old Index