Date: Mon, 2 Apr 2007 19:18:23 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 117211 for review Message-ID: <200704021918.l32JINsi035600@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <machine/../linux/linux_proto.h> #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 <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -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 <sys/cdefs.h> -__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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704021918.l32JINsi035600>