Date: Mon, 2 Apr 2007 22:24:27 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 117227 for review Message-ID: <200704022224.l32MORGH094548@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117227 Change 117227 by marcel@marcel_xcllnt on 2007/04/02 22:24:22 IFC @117225 Affected files ... .. //depot/projects/uart/amd64/linux32/linux32_sysvec.c#15 integrate .. //depot/projects/uart/arm/at91/uart_cpu_at91rm9200usart.c#3 integrate .. //depot/projects/uart/arm/at91/uart_dev_at91usart.c#9 integrate .. //depot/projects/uart/arm/sa11x0/uart_cpu_sa1110.c#6 integrate .. //depot/projects/uart/arm/sa11x0/uart_dev_sa1110.c#7 integrate .. //depot/projects/uart/arm/xscale/i80321/uart_cpu_i80321.c#5 integrate .. //depot/projects/uart/arm/xscale/ixp425/uart_cpu_ixp425.c#2 integrate .. //depot/projects/uart/boot/arm/at91/boot2/boot2.c#4 integrate .. //depot/projects/uart/compat/linux/linux_emul.c#5 integrate .. //depot/projects/uart/compat/linux/linux_emul.h#4 integrate .. //depot/projects/uart/dev/bge/if_bge.c#33 integrate .. //depot/projects/uart/dev/sound/midi/midi.c#6 integrate .. //depot/projects/uart/dev/sound/pcm/mixer.c#13 integrate .. //depot/projects/uart/dev/uart/uart.h#13 integrate .. //depot/projects/uart/dev/uart/uart_bus.h#49 integrate .. //depot/projects/uart/dev/uart/uart_core.c#59 integrate .. //depot/projects/uart/dev/uart/uart_cpu.h#24 integrate .. //depot/projects/uart/dev/uart/uart_cpu_amd64.c#13 integrate .. //depot/projects/uart/dev/uart/uart_cpu_i386.c#14 integrate .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#15 integrate .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#15 integrate .. //depot/projects/uart/dev/uart/uart_cpu_powerpc.c#4 integrate .. //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#27 integrate .. //depot/projects/uart/dev/uart/uart_dev_ns8250.c#50 integrate .. //depot/projects/uart/dev/uart/uart_dev_sab82532.c#44 integrate .. //depot/projects/uart/dev/uart/uart_dev_z8530.c#37 integrate .. //depot/projects/uart/dev/uart/uart_kbd_sun.c#13 integrate .. //depot/projects/uart/dev/uart/uart_subr.c#9 integrate .. //depot/projects/uart/i386/linux/linux_sysvec.c#14 integrate .. //depot/projects/uart/kern/uipc_syscalls.c#26 integrate .. //depot/projects/uart/kern/vfs_syscalls.c#32 integrate .. //depot/projects/uart/nfsserver/nfs_srvsubs.c#14 integrate .. //depot/projects/uart/sys/sysent.h#9 integrate Differences ... ==== //depot/projects/uart/amd64/linux32/linux32_sysvec.c#15 (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 @@ -1081,7 +1081,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"); @@ -1112,7 +1112,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/uart/arm/at91/uart_cpu_at91rm9200usart.c#3 (text) ==== @@ -27,7 +27,7 @@ #include "opt_uart.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/uart_cpu_at91rm9200usart.c,v 1.2 2006/05/13 23:41:16 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/uart_cpu_at91rm9200usart.c,v 1.3 2007/04/02 22:00:21 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -43,7 +43,7 @@ bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -extern struct uart_ops at91_usart_ops; +extern struct uart_class at91_usart_class; extern struct bus_space at91_bs_tag; int @@ -55,7 +55,10 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - di->ops = at91_usart_ops; + struct uart_class *class; + + class = &at91_usart_class; + di->ops = uart_getops(class); di->bas.chan = 0; di->bas.bst = &at91_bs_tag; /* @@ -77,7 +80,5 @@ uart_bus_space_io = &at91_bs_tag; uart_bus_space_mem = NULL; /* Check the environment for overrides */ - if (uart_getenv(devtype, di) == 0) - return (0); - return (0); + return (uart_getenv(devtype, di, class)); } ==== //depot/projects/uart/arm/at91/uart_dev_at91usart.c#9 (text) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.11 2007/01/18 22:01:19 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.12 2007/04/02 22:00:21 marcel Exp $"); #include "opt_comconsole.h" @@ -196,7 +196,7 @@ return (0); } -struct uart_ops at91_usart_ops = { +static struct uart_ops at91_usart_ops = { .probe = at91_usart_probe, .init = at91_usart_init, .term = at91_usart_term, @@ -662,10 +662,12 @@ } return (EINVAL); } + struct uart_class at91_usart_class = { - "at91_usart class", + "at91_usart", at91_usart_methods, sizeof(struct at91_usart_softc), + .uc_ops = &at91_usart_ops, .uc_range = 8, .uc_rclk = DEFAULT_RCLK }; ==== //depot/projects/uart/arm/sa11x0/uart_cpu_sa1110.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_cpu_sa1110.c,v 1.6 2006/06/21 10:56:59 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_cpu_sa1110.c,v 1.7 2007/04/02 22:00:21 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -42,7 +42,7 @@ bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -extern struct uart_ops uart_sa1110_ops; +extern struct uart_class uart_sa1110_class; vm_offset_t sa1110_uart_vaddr; @@ -55,7 +55,8 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - di->ops = uart_sa1110_ops; + + di->ops = uart_getops(&uart_sa1110_class); di->bas.chan = 0; di->bas.bst = &sa11x0_bs_tag; di->bas.bsh = sa1110_uart_vaddr; ==== //depot/projects/uart/arm/sa11x0/uart_dev_sa1110.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_dev_sa1110.c,v 1.7 2007/01/18 22:01:19 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/uart_dev_sa1110.c,v 1.8 2007/04/02 22:00:21 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -57,7 +57,7 @@ extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; -struct uart_ops uart_sa1110_ops = { +static struct uart_ops uart_sa1110_ops = { .probe = sa1110_probe, .init = sa1110_init, .term = sa1110_term, @@ -272,10 +272,12 @@ { return (EINVAL); } + struct uart_class uart_sa1110_class = { - "sa1110 class", + "sa1110", sa1110_methods, 1, + .uc_ops = &uart_sa1110_ops, .uc_range = 8, .uc_rclk = 3686400 }; ==== //depot/projects/uart/arm/xscale/i80321/uart_cpu_i80321.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_cpu_i80321.c,v 1.4 2005/01/20 22:23:26 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/uart_cpu_i80321.c,v 1.5 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -51,7 +51,7 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - di->ops = uart_ns8250_ops; + di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; di->bas.bst = &obio_bs_tag; di->bas.regshft = 0; ==== //depot/projects/uart/arm/xscale/ixp425/uart_cpu_ixp425.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/uart_cpu_ixp425.c,v 1.1 2006/11/19 23:55:23 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/uart_cpu_ixp425.c,v 1.2 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -51,7 +51,7 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - di->ops = uart_ns8250_ops; + di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; di->bas.bst = &ixp425_a4x_bs_tag; di->bas.regshft = 0; ==== //depot/projects/uart/boot/arm/at91/boot2/boot2.c#4 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.4 2007/03/28 21:18:45 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.5 2007/04/02 20:26:04 imp Exp $"); #include <sys/param.h> #include <sys/disklabel.h> @@ -148,8 +148,9 @@ board_init(); EMAC_Init(); - sdcard_init(); EMAC_SetMACAddress(mac); + while (sdcard_init() == 0) + printf("Looking for SD card\n"); dmadat = (void *)(0x20000000 + (16 << 20)); /* Process configuration file */ ==== //depot/projects/uart/compat/linux/linux_emul.c#5 (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/uart/compat/linux/linux_emul.h#4 (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/uart/dev/bge/if_bge.c#33 (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/uart/dev/sound/midi/midi.c#6 (text) ==== @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/sound/midi/midi.c,v 1.23 2007/03/15 14:57:54 ariff Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/sound/midi/midi.c,v 1.24 2007/04/02 06:03:47 ariff Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -1453,14 +1453,18 @@ switch (type) { case MOD_LOAD: retval = midi_load(); +#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); +#endif break; case MOD_UNLOAD: retval = midi_unload(); +#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); +#endif break; default: ==== //depot/projects/uart/dev/sound/pcm/mixer.c#13 (text+ko) ==== @@ -28,7 +28,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/mixer.c,v 1.57 2007/04/02 03:46:25 ariff Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/mixer.c,v 1.58 2007/04/02 10:24:15 ariff Exp $"); MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); @@ -37,7 +37,7 @@ KOBJ_FIELDS; const char *type; void *devinfo; - int busy:1; + int busy; int hwvol_muted; int hwvol_mixer; int hwvol_step; ==== //depot/projects/uart/dev/uart/uart.h#13 (text+ko) ==== @@ -23,7 +23,7 @@ * (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/dev/uart/uart.h,v 1.5 2006/05/23 22:33:44 marcel Exp $ + * $FreeBSD: src/sys/dev/uart/uart.h,v 1.6 2007/04/02 22:00:22 marcel Exp $ */ #ifndef _DEV_UART_H_ ==== //depot/projects/uart/dev/uart/uart_bus.h#49 (text+ko) ==== @@ -23,7 +23,7 @@ * (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/dev/uart/uart_bus.h,v 1.14 2006/04/28 18:29:23 marcel Exp $ + * $FreeBSD: src/sys/dev/uart/uart_bus.h,v 1.15 2007/04/02 22:00:22 marcel Exp $ */ #ifndef _DEV_UART_BUS_H_ ==== //depot/projects/uart/dev/uart/uart_core.c#59 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.21 2007/03/28 18:26:12 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.22 2007/04/02 22:00:22 marcel Exp $"); #ifndef KLD_MODULE #include "opt_comconsole.h" ==== //depot/projects/uart/dev/uart/uart_cpu.h#24 (text+ko) ==== @@ -23,7 +23,7 @@ * (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/dev/uart/uart_cpu.h,v 1.11 2007/01/18 22:01:19 marius Exp $ + * $FreeBSD: src/sys/dev/uart/uart_cpu.h,v 1.12 2007/04/02 22:00:22 marcel Exp $ */ #ifndef _DEV_UART_CPU_H_ ==== //depot/projects/uart/dev/uart/uart_cpu_amd64.c#13 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_amd64.c,v 1.11 2005/12/12 21:00:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_amd64.c,v 1.12 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_cpu_i386.c#14 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_i386.c,v 1.11 2005/12/12 21:00:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_i386.c,v 1.12 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_cpu_ia64.c#15 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_ia64.c,v 1.12 2005/12/12 21:00:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_ia64.c,v 1.13 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#15 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_pc98.c,v 1.16 2005/12/12 21:00:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_pc98.c,v 1.17 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_cpu_powerpc.c#4 (text) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_powerpc.c,v 1.2 2006/07/26 17:17:23 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_powerpc.c,v 1.3 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#27 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_sparc64.c,v 1.22 2006/02/04 23:27:16 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_sparc64.c,v 1.23 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_dev_ns8250.c#50 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_ns8250.c,v 1.25 2007/03/28 18:34:59 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_ns8250.c,v 1.26 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_dev_sab82532.c#44 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_sab82532.c,v 1.15 2007/01/18 22:01:19 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_sab82532.c,v 1.16 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_dev_z8530.c#37 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_z8530.c,v 1.21 2007/01/18 22:01:19 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_z8530.c,v 1.22 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/dev/uart/uart_kbd_sun.c#13 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_kbd_sun.c,v 1.11 2007/01/18 22:01:19 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_kbd_sun.c,v 1.12 2007/04/02 22:00:22 marcel Exp $"); #include "opt_compat.h" #include "opt_kbd.h" ==== //depot/projects/uart/dev/uart/uart_subr.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_subr.c,v 1.5 2005/12/12 21:00:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_subr.c,v 1.6 2007/04/02 22:00:22 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/i386/linux/linux_sysvec.c#14 (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> @@ -917,7 +917,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"); @@ -948,7 +948,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/uart/kern/uipc_syscalls.c#26 (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" @@ -664,7 +664,10 @@ fp2->f_ops = &socketops; fp2->f_type = DTYPE_SOCKET; FILE_UNLOCK(fp2); + so1 = so2 = NULL; error = copyout(sv, uap->rsv, 2 * sizeof (int)); + if (error) + goto free4; fdrop(fp1, td); fdrop(fp2, td); goto done2; @@ -675,9 +678,11 @@ fdclose(fdp, fp1, sv[0], td); fdrop(fp1, td); free2: - (void)soclose(so2); + if (so2 != NULL) + (void)soclose(so2); free1: - (void)soclose(so1); + if (so1 != NULL) + (void)soclose(so1); done2: NET_UNLOCK_GIANT(); return (error); ==== //depot/projects/uart/kern/vfs_syscalls.c#32 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.434 2007/03/21 19:32:08 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.435 2007/04/02 13:40:38 jhb Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1024,31 +1024,8 @@ NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; - /* - * There should be 2 references on the file, one from the descriptor - * table, and one for us. - * - * Handle the case where someone closed the file (via its file - * descriptor) while we were blocked. The end result should look - * like opening the file succeeded but it was immediately closed. - * We call vn_close() manually because we haven't yet hooked up - * the various 'struct file' fields. - */ - FILEDESC_LOCK(fdp); + FILEDESC_LOCK_FAST(fdp); FILE_LOCK(fp); - if (fp->f_count == 1) { - mp = vp->v_mount; - KASSERT(fdp->fd_ofiles[indx] != fp, - ("Open file descriptor lost all refs")); - FILE_UNLOCK(fp); - FILEDESC_UNLOCK(fdp); - VOP_UNLOCK(vp, 0, td); - vn_close(vp, flags & FMASK, fp->f_cred, td); - VFS_UNLOCK_GIANT(vfslocked); - fdrop(fp, td); - td->td_retval[0] = indx; - return (0); - } fp->f_vnode = vp; if (fp->f_data == NULL) fp->f_data = vp; @@ -1058,7 +1035,7 @@ fp->f_seqcount = 1; fp->f_type = (vp->v_type == VFIFO ? DTYPE_FIFO : DTYPE_VNODE); FILE_UNLOCK(fp); - FILEDESC_UNLOCK(fdp); + FILEDESC_UNLOCK_FAST(fdp); VOP_UNLOCK(vp, 0, td); if (flags & (O_EXLOCK | O_SHLOCK)) { ==== //depot/projects/uart/nfsserver/nfs_srvsubs.c#14 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/nfsserver/nfs_srvsubs.c,v 1.146 2007/03/17 18:18:08 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/nfsserver/nfs_srvsubs.c,v 1.147 2007/04/02 13:53:26 jhb Exp $"); /* * These functions support the macros and help fiddle mbuf chains for @@ -98,8 +98,9 @@ struct nfsd_head nfsd_head; int nfsd_head_flag; -static int nfs_prev_nfssvc_sy_narg; -static sy_call_t *nfs_prev_nfssvc_sy_call; +static int nfssvc_offset = SYS_nfssvc; +static struct sysent nfssvc_prev_sysent; +MAKE_SYSENT(nfssvc); struct mtx nfsd_mtx; @@ -522,6 +523,7 @@ static int nfsrv_modevent(module_t mod, int type, void *data) { + static int registered; int error = 0; NET_LOCK_GIANT(); @@ -554,11 +556,11 @@ NFSD_UNLOCK(); nfsrv_timer(0); - /* XXX: Should use SYSCALL_MODULE() */ - nfs_prev_nfssvc_sy_narg = sysent[SYS_nfssvc].sy_narg; - sysent[SYS_nfssvc].sy_narg = 2; - nfs_prev_nfssvc_sy_call = sysent[SYS_nfssvc].sy_call; - sysent[SYS_nfssvc].sy_call = (sy_call_t *)nfssvc; + error = syscall_register(&nfssvc_offset, &nfssvc_sysent, + &nfssvc_prev_sysent); + if (error) + break; + registered = 1; break; case MOD_UNLOAD: @@ -567,9 +569,10 @@ break; } + if (registered) + syscall_deregister(&nfssvc_offset, &nfssvc_prev_sysent); callout_drain(&nfsrv_callout); - sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg; - sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call; + nfsrv_destroycache(); /* Free the server request cache */ nfsrv_destroycache(); /* Free the server request cache */ mtx_destroy(&nfsd_mtx); break; ==== //depot/projects/uart/sys/sysent.h#9 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/sysent.h,v 1.52 2006/12/20 19:00:52 jkim Exp $ + * $FreeBSD: src/sys/sys/sysent.h,v 1.53 2007/04/02 13:53:26 jhb Exp $ */ #ifndef _SYS_SYSENT_H_ @@ -119,6 +119,14 @@ struct sysent old_sysent; /* old sysent */ }; +#define MAKE_SYSENT(syscallname) \ +static struct sysent syscallname##_sysent = { \ + (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + (sy_call_t *)& syscallname, \ + SYS_AUE_##syscallname \ +} + #define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) \ static struct syscall_module_data name##_syscall_mod = { \ evh, arg, offset, new_sysent, { 0, NULL, AUE_NULL } \ @@ -133,12 +141,7 @@ #define SYSCALL_MODULE_HELPER(syscallname) \ static int syscallname##_syscall = SYS_##syscallname; \ -static struct sysent syscallname##_sysent = { \ - (sizeof(struct syscallname ## _args ) \ - / sizeof(register_t)), \ - (sy_call_t *)& syscallname, \ - SYS_AUE_##syscallname \ -}; \ +MAKE_SYSENT(syscallname); \ SYSCALL_MODULE(syscallname, \ & syscallname##_syscall, & syscallname##_sysent, \ NULL, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704022224.l32MORGH094548>