From owner-svn-src-all@FreeBSD.ORG Mon Feb 27 17:31:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 956D41065672; Mon, 27 Feb 2012 17:31:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 855D08FC14; Mon, 27 Feb 2012 17:31:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1RHVcaO029221; Mon, 27 Feb 2012 17:31:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1RHVcMJ029219; Mon, 27 Feb 2012 17:31:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201202271731.q1RHVcMJ029219@svn.freebsd.org> From: John Baldwin Date: Mon, 27 Feb 2012 17:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232231 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2012 17:31:38 -0000 Author: jhb Date: Mon Feb 27 17:31:38 2012 New Revision: 232231 URL: http://svn.freebsd.org/changeset/base/232231 Log: MFamd64: Don't whine about interrupts being disabled for an NMI. Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Feb 27 17:30:21 2012 (r232230) +++ head/sys/i386/i386/trap.c Mon Feb 27 17:31:38 2012 (r232231) @@ -304,8 +304,9 @@ trap(struct trapframe *frame) uprintf( "pid %ld (%s): trap %d with interrupts disabled\n", (long)curproc->p_pid, curthread->td_name, type); - else if (type != T_BPTFLT && type != T_TRCTRAP && - frame->tf_eip != (int)cpu_switch_load_gs) { + else if (type != T_NMI && type != T_BPTFLT && + type != T_TRCTRAP && + frame->tf_eip != (int)cpu_switch_load_gs) { /* * XXX not quite right, since this may be for a * multiple fault in user mode. @@ -315,9 +316,9 @@ trap(struct trapframe *frame) /* * Page faults need interrupts disabled until later, * and we shouldn't enable interrupts while holding - * a spin lock or if servicing an NMI. + * a spin lock. */ - if (type != T_NMI && type != T_PAGEFLT && + if (type != T_PAGEFLT && td->td_md.md_spinlock_count == 0) enable_intr(); }