From owner-cvs-src-old@FreeBSD.ORG Tue Jan 26 02:26:27 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 046C6106568F for ; Tue, 26 Jan 2010 02:26:27 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E65138FC18 for ; Tue, 26 Jan 2010 02:26:26 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0Q2QQtT065401 for ; Tue, 26 Jan 2010 02:26:26 GMT (envelope-from neel@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0Q2QQfx065400 for cvs-src-old@freebsd.org; Tue, 26 Jan 2010 02:26:26 GMT (envelope-from neel@repoman.freebsd.org) Message-Id: <201001260226.o0Q2QQfx065400@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to neel@repoman.freebsd.org using -f From: Neel Natu Date: Tue, 26 Jan 2010 02:26:04 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/mips/include cpuregs.h src/sys/mips/mips exception.S swtch.S X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 02:26:27 -0000 neel 2010-01-26 02:26:04 UTC FreeBSD src repository Modified files: sys/mips/include cpuregs.h sys/mips/mips exception.S swtch.S Log: SVN rev 202996 on 2010-01-26 02:26:04Z by neel Fix a problem seen when a new process was returning to userland through fork_trampoline. This was caused because we were clearing the SR_INT_IE and setting SR_EXL bits of the status register at the same time. This meant that if an interrupt happened while this MTC0 was making its way through the pipeline the exception processing would see the status register with SR_EXL bit set. This in turn would mean that the COP_0_EXC_PC would not be updated so the return from exception would be to an incorrect address. It is easy to verify this fix by a program that forks in a loop and the child just exits: while (1) { pid_t pid = vfork(); if (pid == 0) _exit(0); if (pid != -1) waitpid(pid, NULL, 0); } Also remove two instances where we set SR_EXL bit gratuitously in exception.S. Approved by: imp (mentor) Revision Changes Path 1.3 +5 -1 src/sys/mips/include/cpuregs.h 1.5 +0 -6 src/sys/mips/mips/exception.S 1.4 +1 -5 src/sys/mips/mips/swtch.S