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 Dont bother taking out TLBINFO lock in pm...



details:   https://anonhg.NetBSD.org/src/rev/88159fdf082c
branches:  trunk
changeset: 764156:88159fdf082c
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Apr 12 18:39:38 2011 +0000

description:
Dont bother taking out TLBINFO lock in pmap_tlb_asid_deactivate since the
atomic ops will DTRT with it.  Remove spl calls too.

diffstat:

 sys/arch/mips/mips/pmap_tlb.c |  15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diffs (45 lines):

diff -r d60fe1f28896 -r 88159fdf082c sys/arch/mips/mips/pmap_tlb.c
--- a/sys/arch/mips/mips/pmap_tlb.c     Tue Apr 12 18:24:28 2011 +0000
+++ b/sys/arch/mips/mips/pmap_tlb.c     Tue Apr 12 18:39:38 2011 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index