From owner-svn-src-all@FreeBSD.ORG Tue Aug 10 15:22:48 2010 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 5FF831065670; Tue, 10 Aug 2010 15:22:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F37E8FC16; Tue, 10 Aug 2010 15:22:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7AFMmKP057681; Tue, 10 Aug 2010 15:22:48 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7AFMmJE057679; Tue, 10 Aug 2010 15:22:48 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201008101522.o7AFMmJE057679@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 10 Aug 2010 15:22:48 +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: r211148 - head/sys/compat/x86bios 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: Tue, 10 Aug 2010 15:22:48 -0000 Author: jkim Date: Tue Aug 10 15:22:48 2010 New Revision: 211148 URL: http://svn.freebsd.org/changeset/base/211148 Log: Place spinlock_enter() and spinlock_exit() just around X86EMU calls. Modified: head/sys/compat/x86bios/x86bios.c Modified: head/sys/compat/x86bios/x86bios.c ============================================================================== --- head/sys/compat/x86bios/x86bios.c Tue Aug 10 14:44:20 2010 (r211147) +++ head/sys/compat/x86bios/x86bios.c Tue Aug 10 15:22:48 2010 (r211148) @@ -599,12 +599,12 @@ x86bios_call(struct x86regs *regs, uint1 X86BIOS_TRACE(Calling 0x%06x, (seg << 4) + off, regs); mtx_lock(&x86bios_lock); - spinlock_enter(); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); x86bios_fault = 0; + spinlock_enter(); x86emu_exec_call(&x86bios_emu, seg, off); - memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); spinlock_exit(); + memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock(&x86bios_lock); if (x86bios_trace_call) { @@ -637,12 +637,12 @@ x86bios_intr(struct x86regs *regs, int i X86BIOS_TRACE(Calling INT 0x%02x, intno, regs); mtx_lock(&x86bios_lock); - spinlock_enter(); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); x86bios_fault = 0; + spinlock_enter(); x86emu_exec_intr(&x86bios_emu, intno); - memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); spinlock_exit(); + memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock(&x86bios_lock); if (x86bios_trace_int) {