svn commit: r194505 - projects/mips/sys/mips/mips
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Fri Jun 19 19:02:41 UTC 2009
Author: gonzo
Date: Fri Jun 19 19:02:40 2009
New Revision: 194505
URL: http://svn.freebsd.org/changeset/base/194505
Log:
- Keep interrupts mask intact by RESTORE_CPU in MipsKernGenException
trap() function re-enables interrupts if exception happened with
interrupts enabled and therefor status register might be modified
by interrupt filters
Modified:
projects/mips/sys/mips/mips/exception.S
Modified: projects/mips/sys/mips/mips/exception.S
==============================================================================
--- projects/mips/sys/mips/mips/exception.S Fri Jun 19 18:56:05 2009 (r194504)
+++ projects/mips/sys/mips/mips/exception.S Fri Jun 19 19:02:40 2009 (r194505)
@@ -389,6 +389,19 @@ NNON_LEAF(MipsKernGenException, KERN_EXC
jalr k0
sw a3, STAND_RA_OFFSET + KERN_REG_SIZE(sp) # for debugging
+ /*
+ * Update interrupt mask in saved status register
+ * Some of interrupts could be disabled by
+ * intr filters if interrupts are enabled later
+ * in trap handler
+ */
+ mfc0 a0, COP_0_STATUS_REG
+ mtc0 zero, COP_0_STATUS_REG
+ and a0, a0, SR_INT_MASK
+ RESTORE_REG(a1, SR, sp)
+ and a1, a1, ~SR_INT_MASK
+ or a1, a1, a0
+ SAVE_REG(a1, SR, sp)
RESTORE_CPU # v0 contains the return address.
sync
eret
More information about the svn-src-projects
mailing list