From owner-svn-src-projects@FreeBSD.ORG Fri Jun 19 19:02:40 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3596106566C; Fri, 19 Jun 2009 19:02:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B26168FC0C; Fri, 19 Jun 2009 19:02:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JJ2eD6052674; Fri, 19 Jun 2009 19:02:40 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JJ2ewK052672; Fri, 19 Jun 2009 19:02:40 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200906191902.n5JJ2ewK052672@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 19 Jun 2009 19:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194505 - projects/mips/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 19:02:41 -0000 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