Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh3/sh3 Revert previous. It causes df(1) to reset ...



details:   https://anonhg.NetBSD.org/src/rev/f3225efe329d
branches:  trunk
changeset: 580017:f3225efe329d
user:      uwe <uwe%NetBSD.org@localhost>
date:      Mon Apr 04 23:15:08 2005 +0000

description:
Revert previous.  It causes df(1) to reset my Jornada 680 sometimes.
And df(1) that is called during /etc/daily run resets it almost always.

diffstat:

 sys/arch/sh3/sh3/mmu_sh3.c |  20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diffs (93 lines):

diff -r 53a4b56abe3b -r f3225efe329d sys/arch/sh3/sh3/mmu_sh3.c
--- a/sys/arch/sh3/sh3/mmu_sh3.c        Mon Apr 04 21:43:26 2005 +0000
+++ b/sys/arch/sh3/sh3/mmu_sh3.c        Mon Apr 04 23:15:08 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mmu_sh3.c,v 1.7 2004/12/30 09:48:30 tsutsui Exp $      */
+/*     $NetBSD: mmu_sh3.c,v 1.8 2005/04/04 23:15:08 uwe Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mmu_sh3.c,v 1.7 2004/12/30 09:48:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mmu_sh3.c,v 1.8 2005/04/04 23:15:08 uwe Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,11 +63,10 @@
 sh3_tlb_invalidate_addr(int asid, vaddr_t va)
 {
        u_int32_t a, d;
-       int s, w;
+       int w;
 
        d = (va & SH3_MMUAA_D_VPN_MASK_4K) | asid;  /* 4K page */
        va = va & SH3_MMU_VPN_MASK;   /* [16:12] entry index */
-       s = _cpu_exception_suspend();
 
        /* Probe entry and invalidate it. */
        for (w = 0; w < SH3_MMU_WAY; w++) {
@@ -78,17 +77,14 @@
                        break;
                }
        }
-
-       _cpu_exception_resume(s);
 }
 
 void
 sh3_tlb_invalidate_asid(int asid)
 {
        u_int32_t aw, a;
-       int s, e, w;
+       int e, w;
 
-       s = _cpu_exception_suspend();
        /* Invalidate entry attribute to ASID */
        for (w = 0; w < SH3_MMU_WAY; w++) {
                aw = (w << SH3_MMU_WAY_SHIFT);
@@ -100,16 +96,14 @@
                        }
                }
        }
-       _cpu_exception_resume(s);
 }
 
 void
 sh3_tlb_invalidate_all()
 {
        u_int32_t aw, a;
-       int s, e, w;
+       int e, w;
 
-       s = _cpu_exception_suspend();
        /* Zero clear all TLB entry to avoid unexpected VPN match. */
        for (w = 0; w < SH3_MMU_WAY; w++) {
                aw = (w << SH3_MMU_WAY_SHIFT);
@@ -119,18 +113,15 @@
                        _reg_write_4(SH3_MMUDA | a, 0);
                }
        }
-       _cpu_exception_resume(s);
 }
 
 void
 sh3_tlb_update(int asid, vaddr_t va, u_int32_t pte)
 {
        u_int32_t oasid;
-       int s;
 
        KDASSERT(asid < 0x100 && (pte & ~PGOFSET) != 0 && va != 0);
 
-       s = _cpu_exception_suspend();
        /* Save old ASID */
        oasid = _reg_read_4(SH3_PTEH) & SH3_PTEH_ASID_MASK;
 
@@ -145,5 +136,4 @@
        /* Restore old ASID */
        if (asid != oasid)
                _reg_write_4(SH3_PTEH, oasid);
-       _cpu_exception_resume(s);
 }



Home | Main Index | Thread Index | Old Index