Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/arch/sh3/sh3 Pullup rev 1.10 (requested by tsutsui ...



details:   https://anonhg.NetBSD.org/src/rev/99af8c963a73
branches:  netbsd-2-0
changeset: 564660:99af8c963a73
user:      jmc <jmc%NetBSD.org@localhost>
date:      Mon Jan 10 19:00:48 2005 +0000

description:
Pullup rev 1.10 (requested by tsutsui in ticket #1072)

        Protect accesses to PTE/TLB registers with
        _cpu_exception_suspend()/_cpu_exception_resume() pair. Prevents
        spontaneous reboot under heavy load

diffstat:

 sys/arch/sh3/sh3/mmu.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 20a39f1eb5a2 -r 99af8c963a73 sys/arch/sh3/sh3/mmu.c
--- a/sys/arch/sh3/sh3/mmu.c    Mon Jan 10 16:29:55 2005 +0000
+++ b/sys/arch/sh3/sh3/mmu.c    Mon Jan 10 19:00:48 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mmu.c,v 1.9 2003/07/15 03:35:57 lukem Exp $    */
+/*     $NetBSD: mmu.c,v 1.9.2.1 2005/01/10 19:00:48 jmc Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mmu.c,v 1.9 2003/07/15 03:35:57 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mmu.c,v 1.9.2.1 2005/01/10 19:00:48 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -112,6 +112,9 @@
 void
 sh_tlb_set_asid(int asid)
 {
+       int s;
 
+       s = _cpu_exception_suspend();
        _reg_write_4(SH_(PTEH), asid);
+       _cpu_exception_resume(s);
 }



Home | Main Index | Thread Index | Old Index