Date: Fri, 19 Jun 2009 19:02:40 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r194505 - projects/mips/sys/mips/mips Message-ID: <200906191902.n5JJ2ewK052672@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906191902.n5JJ2ewK052672>