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 protect doubleword register from interrupt.



details:   https://anonhg.NetBSD.org/src/rev/bf0cddeb731c
branches:  trunk
changeset: 495785:bf0cddeb731c
user:      shin <shin%NetBSD.org@localhost>
date:      Sun Aug 06 12:30:36 2000 +0000

description:
protect doubleword register from interrupt.

diffstat:

 sys/arch/mips/mips/locore_mips3.S |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 0f006516d409 -r bf0cddeb731c sys/arch/mips/mips/locore_mips3.S
--- a/sys/arch/mips/mips/locore_mips3.S Sun Aug 06 08:51:22 2000 +0000
+++ b/sys/arch/mips/mips/locore_mips3.S Sun Aug 06 12:30:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore_mips3.S,v 1.44 2000/08/01 23:38:26 jeffs Exp $  */
+/*     $NetBSD: locore_mips3.S,v 1.45 2000/08/06 12:30:36 shin Exp $   */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -2499,12 +2499,17 @@
 END(mips3_write_compare)
 
 LEAF(mips3_write_xcontext_upper)
+       mfc0    v1, MIPS_COP_0_STATUS           # save status register
+       mtc0    zero, MIPS_COP_0_STATUS         # disable interrupts
+       nop
+       nop
+       nop
        dsll    a0, 32
        dmtc0   a0, MIPS_COP_0_TLB_XCONTEXT     # Store segment map for access
        nop
        nop
        j       ra
-       nop
+       mtc0    v1, MIPS_COP_0_STATUS           # restore status register
 END(mips3_write_xcontext_upper)
 
 /*



Home | Main Index | Thread Index | Old Index