From owner-p4-projects@FreeBSD.ORG Mon Apr 2 19:18:24 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3213716A403; Mon, 2 Apr 2007 19:18:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E766016A402 for ; Mon, 2 Apr 2007 19:18:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id D837613C458 for ; Mon, 2 Apr 2007 19:18:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l32JIN1P035603 for ; Mon, 2 Apr 2007 19:18:23 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l32JINsi035600 for perforce@freebsd.org; Mon, 2 Apr 2007 19:18:23 GMT (envelope-from jhb@freebsd.org) Date: Mon, 2 Apr 2007 19:18:23 GMT Message-Id: <200704021918.l32JINsi035600@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 117211 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 19:18:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=117211 Change 117211 by jhb@jhb_mutex on 2007/04/02 19:18:11 IFC @117210. Affected files ... .. //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#24 integrate .. //depot/projects/smpng/sys/compat/linux/linux_emul.c#10 integrate .. //depot/projects/smpng/sys/compat/linux/linux_emul.h#5 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#92 integrate .. //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#55 integrate .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#101 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#24 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.27 2007/03/30 00:06:21 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.28 2007/04/02 18:38:12 jkim Exp $"); #include "opt_compat.h" #ifndef COMPAT_IA32 @@ -1079,7 +1079,7 @@ linux_ioctl_register_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); - sx_init(&emul_lock, "emuldata lock"); + mtx_init(&emul_lock, "emuldata lock", NULL, MTX_DEF); sx_init(&emul_shared_lock, "emuldata->shared lock"); LIST_INIT(&futex_list); sx_init(&futex_sx, "futex protection lock"); @@ -1110,7 +1110,7 @@ linux_ioctl_unregister_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); - sx_destroy(&emul_lock); + mtx_destroy(&emul_lock); sx_destroy(&emul_shared_lock); sx_destroy(&futex_sx); EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); ==== //depot/projects/smpng/sys/compat/linux/linux_emul.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.19 2007/03/02 00:08:47 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.20 2007/04/02 18:38:13 jkim Exp $"); #include "opt_compat.h" @@ -55,8 +55,8 @@ #include #endif -struct sx emul_shared_lock; -struct sx emul_lock; +struct sx emul_shared_lock; +struct mtx emul_lock; /* this returns locked reference to the emuldata entry (if found) */ struct linux_emuldata * ==== //depot/projects/smpng/sys/compat/linux/linux_emul.h#5 (text+ko) ==== @@ -25,11 +25,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/linux/linux_emul.h,v 1.6 2007/01/07 19:00:38 netchild Exp $ + * $FreeBSD: src/sys/compat/linux/linux_emul.h,v 1.7 2007/04/02 18:38:13 jkim Exp $ */ #ifndef _LINUX_EMUL_H_ -#define _LINUX_EMUL_H_ +#define _LINUX_EMUL_H_ struct linux_emuldata_shared { int refs; @@ -55,26 +55,26 @@ LIST_ENTRY(linux_emuldata) threads; /* list of linux threads */ }; -struct linux_emuldata *em_find(struct proc *, int locked); +struct linux_emuldata *em_find(struct proc *, int locked); -#define EMUL_LOCK(l) sx_xlock(l) -#define EMUL_UNLOCK(l) sx_xunlock(l) +#define EMUL_LOCK(l) mtx_lock(l) +#define EMUL_UNLOCK(l) mtx_unlock(l) -#define EMUL_SHARED_RLOCK(l) sx_slock(l) -#define EMUL_SHARED_RUNLOCK(l) sx_sunlock(l) -#define EMUL_SHARED_WLOCK(l) sx_xlock(l) -#define EMUL_SHARED_WUNLOCK(l) sx_xunlock(l) +#define EMUL_SHARED_RLOCK(l) sx_slock(l) +#define EMUL_SHARED_RUNLOCK(l) sx_sunlock(l) +#define EMUL_SHARED_WLOCK(l) sx_xlock(l) +#define EMUL_SHARED_WUNLOCK(l) sx_xunlock(l) /* for em_find use */ -#define EMUL_DOLOCK 1 -#define EMUL_DONTLOCK 0 +#define EMUL_DOLOCK 1 +#define EMUL_DONTLOCK 0 int linux_proc_init(struct thread *, pid_t, int); void linux_proc_exit(void *, struct proc *); void linux_schedtail(void *, struct proc *); void linux_proc_exec(void *, struct proc *, struct image_params *); -extern struct sx emul_shared_lock; -extern struct sx emul_lock; +extern struct sx emul_shared_lock; +extern struct mtx emul_lock; #endif /* !_LINUX_EMUL_H_ */ ==== //depot/projects/smpng/sys/dev/bge/if_bge.c#92 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.186 2007/03/13 00:41:55 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.187 2007/04/02 19:09:06 jkim Exp $"); /* * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. @@ -2114,7 +2114,7 @@ return (0); } -#if __FreeBSD_version > 700025 +#if __FreeBSD_version > 602105 /* * Return true if this device has more than one port. */ @@ -2277,7 +2277,7 @@ } #endif -#if __FreeBSD_version > 700025 +#if __FreeBSD_version > 602105 { int msicount; @@ -2596,7 +2596,7 @@ bus_release_resource(dev, SYS_RES_IRQ, sc->bge_flags & BGE_FLAG_MSI ? 1 : 0, sc->bge_irq); -#if __FreeBSD_version > 700025 +#if __FreeBSD_version > 602105 if (sc->bge_flags & BGE_FLAG_MSI) pci_release_msi(dev); #endif ==== //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#55 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.148 2006/09/09 16:25:25 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.149 2007/04/02 18:38:13 jkim Exp $"); #include #include @@ -915,7 +915,7 @@ linux_ioctl_register_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); - sx_init(&emul_lock, "emuldata lock"); + mtx_init(&emul_lock, "emuldata lock", NULL, MTX_DEF); sx_init(&emul_shared_lock, "emuldata->shared lock"); LIST_INIT(&futex_list); sx_init(&futex_sx, "futex protection lock"); @@ -946,7 +946,7 @@ linux_ioctl_unregister_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); - sx_destroy(&emul_lock); + mtx_destroy(&emul_lock); sx_destroy(&emul_shared_lock); sx_destroy(&futex_sx); EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); ==== //depot/projects/smpng/sys/kern/uipc_syscalls.c#101 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.248 2007/03/05 13:10:58 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.249 2007/04/02 19:15:47 jhb Exp $"); #include "opt_sctp.h" #include "opt_compat.h"