Module Name: src
Committed By: matt
Date: Tue Apr 12 18:39:38 UTC 2011
Modified Files:
src/sys/arch/mips/mips: pmap_tlb.c
Log Message:
Dont bother taking out TLBINFO lock in pmap_tlb_asid_deactivate since the
atomic ops will DTRT with it. Remove spl calls too.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.4 src/sys/arch/mips/mips/pmap_tlb.c:1.5
--- src/sys/arch/mips/mips/pmap_tlb.c:1.4 Wed Apr 6 05:35:37 2011
+++ src/sys/arch/mips/mips/pmap_tlb.c Tue Apr 12 18:39:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.4 2011/04/06 05:35:37 matt Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.5 2011/04/12 18:39:38 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.4 2011/04/06 05:35:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.5 2011/04/12 18:39:38 matt Exp $");
/*
* Manages address spaces in a TLB.
@@ -812,15 +812,8 @@
*/
if (pm != pmap_kernel() && pm->pm_onproc != 0) {
struct cpu_info * const ci = curcpu();
- struct pmap_tlb_info * const ti = ci->ci_tlb_info;
const uint32_t cpu_mask = 1 << cpu_index(ci);
- int s = splhigh();
KASSERT(!cpu_intr_p());
- KASSERT(ti->ti_cpu_mask & cpu_mask);
- TLBINFO_LOCK(ti);
- KASSERTMSG(ci->ci_mtx_count < 0,
- ("%s: cpu%d mtx count (%d) >= 0",
- __func__, cpu_index(ci), ci->ci_mtx_count));
KASSERTMSG(ci->ci_cpl >= IPL_SCHED,
("%s: cpl (%d) < IPL_SCHED (%d)",
__func__, ci->ci_cpl, IPL_SCHED));
@@ -832,10 +825,6 @@
* be changed while this TLBs lock is held.
*/
atomic_and_32(&pm->pm_onproc, ~cpu_mask);
- KASSERT(curcpu() == ci);
- KASSERT(curcpu()->ci_tlb_info == ti);
- TLBINFO_UNLOCK(ti);
- splx(s);
atomic_and_ulong(&ci->ci_flags, ~CPUF_USERPMAP);
}
#elif defined(DEBUG)