Date: Thu, 1 Mar 2007 20:04:49 GMT From: Jung-uk Kim <jkim@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 115215 for review Message-ID: <200703012004.l21K4nGh071754@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=115215 Change 115215 by jkim@jkim_hammer on 2007/03/01 20:04:24 IFC Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#44 integrate .. //depot/projects/linuxolator/src/sys/arm/arm/db_interface.c#3 integrate .. //depot/projects/linuxolator/src/sys/arm/arm/locore.S#3 integrate .. //depot/projects/linuxolator/src/sys/arm/arm/support.S#2 integrate .. //depot/projects/linuxolator/src/sys/arm/arm/trap.c#4 integrate .. //depot/projects/linuxolator/src/sys/arm/at91/at91.c#4 integrate .. //depot/projects/linuxolator/src/sys/arm/at91/at91_rtc.c#3 integrate .. //depot/projects/linuxolator/src/sys/arm/at91/at91_spi.c#5 integrate .. //depot/projects/linuxolator/src/sys/arm/at91/ohci_atmelarm.c#2 integrate .. //depot/projects/linuxolator/src/sys/arm/conf/AVILA#2 integrate .. //depot/projects/linuxolator/src/sys/arm/sa11x0/sa11x0_ost.c#4 integrate .. //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/avila_ata.c#2 integrate .. //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/ixp425_qmgr.c#2 integrate .. //depot/projects/linuxolator/src/sys/cam/scsi/scsi_target.c#3 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_futex.c#14 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_futex.h#3 integrate .. //depot/projects/linuxolator/src/sys/conf/NOTES#19 integrate .. //depot/projects/linuxolator/src/sys/conf/files#21 integrate .. //depot/projects/linuxolator/src/sys/conf/options#18 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_ec.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/ath/if_ath.c#8 integrate .. //depot/projects/linuxolator/src/sys/dev/ath/if_athvar.h#7 integrate .. //depot/projects/linuxolator/src/sys/dev/em/if_em.c#13 integrate .. //depot/projects/linuxolator/src/sys/dev/fdc/fdc.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/firewire/fwohci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/firewire/sbp.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/hptmv/entry.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/hptmv/ioctl.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/hwpmc/hwpmc_mod.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/ipmi/ipmi_ssif.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/rlphy.c#6 integrate .. //depot/projects/linuxolator/src/sys/dev/pccard/pccard_cis.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/pccbb/pccbb.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/random/randomdev_soft.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/re/if_re.c#9 integrate .. //depot/projects/linuxolator/src/sys/dev/scd/scd.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/midi.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/midi.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/midiq.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/mpu401.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/mpu401.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/mpu_if.m#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/mpufoi_if.m#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/sequencer.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/sequencer.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/midi/synth_if.m#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/pci/hda/hdac.c#14 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/sl811hs.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/sl811hsvar.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/umass.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/usb_subr.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/usbdevs#10 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/uvscom.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/zs/z8530var.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/zs/zs.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/zs/zs_macio.c#2 integrate .. //depot/projects/linuxolator/src/sys/fs/smbfs/smbfs_smb.c#3 integrate .. //depot/projects/linuxolator/src/sys/geom/geom_dev.c#3 integrate .. //depot/projects/linuxolator/src/sys/geom/geom_io.c#5 integrate .. //depot/projects/linuxolator/src/sys/geom/multipath/g_multipath.c#1 branch .. //depot/projects/linuxolator/src/sys/geom/multipath/g_multipath.h#1 branch .. //depot/projects/linuxolator/src/sys/i386/ibcs2/ibcs2_xenix.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#35 integrate .. //depot/projects/linuxolator/src/sys/isa/syscons_isa.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_fork.c#12 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_intr.c#7 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_linker.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_lock.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_mutex.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_resource.c#9 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_sx.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_synch.c#8 integrate .. //depot/projects/linuxolator/src/sys/kern/link_elf.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/sched_4bsd.c#11 integrate .. //depot/projects/linuxolator/src/sys/kern/sched_ule.c#9 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_bus.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_lock.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/sys_generic.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_socket.c#13 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_usrreq.c#10 integrate .. //depot/projects/linuxolator/src/sys/modules/geom/Makefile#5 integrate .. //depot/projects/linuxolator/src/sys/modules/geom/geom_multipath/Makefile#1 branch .. //depot/projects/linuxolator/src/sys/net/bpf.c#5 integrate .. //depot/projects/linuxolator/src/sys/net/bpf.h#2 integrate .. //depot/projects/linuxolator/src/sys/net/bpfdesc.h#3 integrate .. //depot/projects/linuxolator/src/sys/net/if_vlan_var.h#3 integrate .. //depot/projects/linuxolator/src/sys/netinet/in.h#4 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip_mroute.c#9 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip_output.c#8 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_input.c#9 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_output.c#6 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_subr.c#6 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_timer.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_timer.h#3 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_usrreq.c#7 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_var.h#4 integrate .. //depot/projects/linuxolator/src/sys/netinet6/ip6_mroute.c#4 integrate .. //depot/projects/linuxolator/src/sys/netinet6/ip6_mroute.h#4 integrate .. //depot/projects/linuxolator/src/sys/netinet6/raw_ip6.c#3 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_ip.c#3 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_ip.h#3 integrate .. //depot/projects/linuxolator/src/sys/netncp/ncp_sock.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/bootp_subr.c#4 integrate .. //depot/projects/linuxolator/src/sys/pc98/cbus/clock.c#5 integrate .. //depot/projects/linuxolator/src/sys/pc98/cbus/syscons_cbus.c#2 integrate .. //depot/projects/linuxolator/src/sys/powerpc/powermac/pswitch.c#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/sparc64/machdep.c#5 integrate .. //depot/projects/linuxolator/src/sys/sys/extattr.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/lock.h#5 integrate .. //depot/projects/linuxolator/src/sys/sys/lock_profile.h#4 integrate .. //depot/projects/linuxolator/src/sys/sys/mbuf.h#7 integrate .. //depot/projects/linuxolator/src/sys/sys/mutex.h#5 integrate .. //depot/projects/linuxolator/src/sys/sys/priv.h#5 integrate .. //depot/projects/linuxolator/src/sys/sys/rwlock.h#3 integrate .. //depot/projects/linuxolator/src/sys/sys/systm.h#9 integrate .. //depot/projects/linuxolator/src/sys/sys/unpcb.h#3 integrate .. //depot/projects/linuxolator/src/sys/tools/fw_stub.awk#3 integrate .. //depot/projects/linuxolator/src/sys/vm/phys_pager.c#3 integrate .. //depot/projects/linuxolator/src/sys/vm/swap_pager.c#7 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_kern.c#5 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_map.c#3 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_object.c#7 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_page.c#10 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_page.h#4 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#44 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.34 2007/02/24 16:49:24 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.35 2007/02/27 02:08:00 jkim Exp $"); #include <sys/param.h> #include <sys/kernel.h> ==== //depot/projects/linuxolator/src/sys/arm/arm/db_interface.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.6 2007/02/14 01:25:41 kevlo Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_interface.c,v 1.7 2007/02/26 05:17:47 kevlo Exp $"); #include "opt_ddb.h" #include <sys/param.h> @@ -53,7 +53,6 @@ #include <vm/vm_extern.h> #include <machine/db_machdep.h> -#include <machine/katelib.h> #include <machine/vmparam.h> #include <machine/cpu.h> ==== //depot/projects/linuxolator/src/sys/arm/arm/locore.S#3 (text+ko) ==== @@ -37,7 +37,7 @@ #include <machine/asm.h> #include <machine/armreg.h> #include <machine/pte.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.15 2007/02/19 00:57:27 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.16 2007/02/26 02:03:48 cognet Exp $"); /* What size should this really be ? It is only used by initarm() */ #define INIT_ARM_STACK_SIZE 2048 @@ -95,11 +95,6 @@ sub r0, r0, r9 add r0, r0, r8 mov r4, r0 - /* Make sure _arm_memcpy is NULL */ - ldr r3, .L_arm_memcpy - ldr r3, [r3] - mov r5, #0 - str r5, [r3] bl memcpy ldr r0, Lram_offset add pc, r4, r0 ==== //depot/projects/linuxolator/src/sys/arm/arm/support.S#2 (text+ko) ==== @@ -26,7 +26,7 @@ #include <machine/asm.h> #include <machine/asmacros.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/support.S,v 1.11 2005/10/23 23:09:14 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/support.S,v 1.12 2007/02/26 02:03:48 cognet Exp $"); #include "assym.s" @@ -871,6 +871,18 @@ #if !defined(__XSCALE__) ENTRY(memcpy) /* save leaf functions having to store this away */ + /* Do not check arm_memcpy if we're running from flash */ +#ifdef FLASHADDR +#if FLASHADDR > PHYSADDR + ldr r3, =FLASHADDR + cmp r3, pc + bls .Lnormal +#else + ldr r3, =FLASHADDR + cmp r3, pc + bhi .Lnormal +#endif +#endif ldr r3, .L_arm_memcpy ldr r3, [r3] cmp r3, #0 @@ -1096,6 +1108,17 @@ pld [r1] cmp r2, #0x0c ble .Lmemcpy_short /* <= 12 bytes */ +#ifdef FLASHADDR +#if FLASHADDR > PHYSADDR + ldr r3, =FLASHADDR + cmp r3, pc + bls .Lnormal +#else + ldr r3, =FLASHADDR + cmp r3, pc + bhi .Lnormal +#endif +#endif ldr r3, .L_arm_memcpy ldr r3, [r3] cmp r3, #0 ==== //depot/projects/linuxolator/src/sys/arm/arm/trap.c#4 (text+ko) ==== @@ -82,7 +82,7 @@ #include "opt_ktrace.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.32 2006/10/26 21:42:16 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.33 2007/02/26 05:17:47 kevlo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -110,7 +110,6 @@ #include <machine/cpuconf.h> #include <machine/vmparam.h> #include <machine/frame.h> -#include <machine/katelib.h> #include <machine/cpu.h> #include <machine/intr.h> #include <machine/pcb.h> ==== //depot/projects/linuxolator/src/sys/arm/at91/at91.c#4 (text) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.11 2007/02/23 12:18:27 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.12 2007/02/25 14:34:59 piso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -548,7 +548,7 @@ { struct at91_softc *sc = device_get_softc(dev); - if (rman_get_start(ires) == AT91RM92_IRQ_SYSTEM && !(flags & INTR_FAST)) + if (rman_get_start(ires) == AT91RM92_IRQ_SYSTEM && filt == NULL) panic("All system interrupt ISRs must be type INTR_FAST"); BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr, arg, cookiep); ==== //depot/projects/linuxolator/src/sys/arm/at91/at91_rtc.c#3 (text) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_rtc.c,v 1.3 2007/02/23 12:18:27 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_rtc.c,v 1.4 2007/02/27 13:39:34 piso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -80,7 +80,7 @@ static int at91_rtc_probe(device_t dev); static int at91_rtc_attach(device_t dev); static int at91_rtc_detach(device_t dev); -static void at91_rtc_intr(void *); +static int at91_rtc_intr(void *); /* helper routines */ static int at91_rtc_activate(device_t dev); ==== //depot/projects/linuxolator/src/sys/arm/at91/at91_spi.c#5 (text) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_spi.c,v 1.5 2007/02/23 12:18:27 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_spi.c,v 1.6 2007/02/27 17:15:39 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -248,7 +248,7 @@ rxdone = sc->rxdone; do { - err = msleep(&sc->rxdone, NULL, PCATCH | PZERO, "spi", hz); + err = tsleep(&sc->rxdone, PCATCH | PZERO, "spi", hz); } while (rxdone == sc->rxdone && err != EINTR); WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS); if (err == 0) { ==== //depot/projects/linuxolator/src/sys/arm/at91/ohci_atmelarm.c#2 (text) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/ohci_atmelarm.c,v 1.1 2006/03/18 01:45:29 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/ohci_atmelarm.c,v 1.2 2007/03/01 09:10:55 piso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,8 +99,8 @@ } device_set_ivars(sc->sc_ohci.sc_bus.bdev, &sc->sc_ohci.sc_bus); - err = bus_setup_intr(dev, sc->sc_ohci.irq_res, INTR_TYPE_BIO, ohci_intr, sc, - &sc->sc_ohci.ih); + err = bus_setup_intr(dev, sc->sc_ohci.irq_res, INTR_TYPE_BIO, NULL, + ohci_intr, sc, &sc->sc_ohci.ih); if (err) { err = ENXIO; goto error; ==== //depot/projects/linuxolator/src/sys/arm/conf/AVILA#2 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/arm/conf/AVILA,v 1.2 2006/11/22 12:57:17 kevlo Exp $ +# $FreeBSD: src/sys/arm/conf/AVILA,v 1.3 2007/02/26 02:04:24 cognet Exp $ machine arm ident AVILA @@ -24,6 +24,8 @@ options PHYSADDR=0x10000000 options KERNPHYSADDR=0x10200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm +options FLASHADDR=0x50000000 +options LOADERRAMADDR=0x00000000 options STARTUP_PAGETABLE_ADDR=0x10000000 include "../xscale/ixp425/std.avila" ==== //depot/projects/linuxolator/src/sys/arm/sa11x0/sa11x0_ost.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.6 2007/02/23 12:18:28 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.7 2007/02/26 05:17:47 kevlo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -57,8 +57,6 @@ #include <machine/cpufunc.h> #include <machine/frame.h> -#include <machine/katelib.h> - #include <arm/sa11x0/sa11x0_reg.h> #include <arm/sa11x0/sa11x0_var.h> #include <arm/sa11x0/sa11x0_ostreg.h> ==== //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/avila_ata.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_ata.c,v 1.1 2006/11/19 23:55:23 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_ata.c,v 1.2 2007/02/25 22:17:54 cognet Exp $"); /* * Compact Flash Support for the Avila Gateworks XScale boards. @@ -160,7 +160,7 @@ panic("Unable to allocate irq %u.\n", AVILA_IDE_IRQ); bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_BIO | INTR_MPSAFE | INTR_ENTROPY, - ata_avila_intr, sc, &sc->sc_ih); + NULL, ata_avila_intr, sc, &sc->sc_ih); /* attach channel on this controller */ device_add_child(dev, "ata", devclass_find_free_unit(ata_devclass, 0)); @@ -225,8 +225,8 @@ static int ata_avila_setup_intr(device_t dev, device_t child, struct resource *irq, - int flags, driver_intr_t *function, void *argument, - void **cookiep) + int flags, driver_filter_t *filt, + driver_intr_t *function, void *argument, void **cookiep) { struct ata_avila_softc *sc = device_get_softc(dev); int unit = ((struct ata_channel *)device_get_softc(child))->unit; ==== //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/ixp425_qmgr.c#2 (text+ko) ==== @@ -57,7 +57,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.c,v 1.1 2006/11/19 23:55:23 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_qmgr.c,v 1.2 2007/02/25 22:17:54 cognet Exp $"); /* * Intel XScale Queue Manager support. @@ -225,7 +225,7 @@ panic("Unable to allocate the qmgr irqs.\n"); /* XXX could be a source of entropy */ bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE, - ixpqmgr_intr, NULL, &sc->sc_ih); + NULL, ixpqmgr_intr, NULL, &sc->sc_ih); /* NB: softc is pre-zero'd */ for (i = 0; i < IX_QMGR_MAX_NUM_QUEUES; i++) { ==== //depot/projects/linuxolator/src/sys/cam/scsi/scsi_target.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.71 2006/12/05 07:45:28 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.72 2007/02/27 17:15:39 jhb Exp $"); #include <sys/param.h> @@ -810,8 +810,8 @@ user_descr = TAILQ_FIRST(abort_queue); while (ccb_h == NULL && user_descr == NULL) { if ((ioflag & IO_NDELAY) == 0) { - error = msleep(user_queue, NULL, - PRIBIO | PCATCH, "targrd", 0); + error = tsleep(user_queue, + PRIBIO | PCATCH, "targrd", 0); ccb_h = TAILQ_FIRST(user_queue); user_descr = TAILQ_FIRST(abort_queue); if (error != 0) { @@ -1037,7 +1037,7 @@ /* If we aborted at least one pending CCB ok, wait for it. */ if (cab.ccb_h.status == CAM_REQ_CMP) { - msleep(&softc->pending_ccb_queue, NULL, + tsleep(&softc->pending_ccb_queue, PRIBIO | PCATCH, "tgabrt", 0); } ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_futex.c#14 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.6 2006/09/09 16:25:25 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.8 2007/02/25 12:43:07 netchild Exp $"); #if 0 __KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $"); #endif @@ -283,7 +283,7 @@ op_ret = futex_atomic_op(td, args->val3, args->uaddr2); if (op_ret < 0) { - /* XXX: we don't handle the EFAULT yet */ + /* XXX: We don't handle the EFAULT yet. */ if (op_ret != -EFAULT) { futex_put(f); futex_put(f2); @@ -416,10 +416,7 @@ * all operations BUT requeue ones where its N+1 * mimic this. */ - if (newf) - count = 0; - else - count = 1; + count = newf ? 0 : 1; FUTEX_LOCK; TAILQ_FOREACH(wp, &f->f_waiting_proc, wp_list) { ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_futex.h#3 (text+ko) ==== @@ -30,7 +30,7 @@ * 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_futex.h,v 1.1 2006/08/15 12:20:59 netchild Exp $ + * $FreeBSD: src/sys/compat/linux/linux_futex.h,v 1.2 2007/02/25 12:40:35 netchild Exp $ */ #ifndef _LINUX_FUTEX_H ==== //depot/projects/linuxolator/src/sys/conf/NOTES#19 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1410 2007/02/10 13:59:13 bms Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1411 2007/02/27 04:01:57 mjacob Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -147,6 +147,7 @@ options GEOM_LABEL # Providers labelization. options GEOM_MBR # DOS/MBR partitioning options GEOM_MIRROR # Disk mirroring. +options GEOM_MULTIPATH # Disk multipath options GEOM_NOP # Test class. options GEOM_PART_APM # Apple partitioning options GEOM_PART_GPT # GPT partitioning ==== //depot/projects/linuxolator/src/sys/conf/files#21 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1178 2007/02/24 11:38:47 bms Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1180 2007/02/27 04:01:57 mjacob Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1210,6 +1210,7 @@ geom/label/g_label_ufs.c optional geom_label geom/mirror/g_mirror.c optional geom_mirror geom/mirror/g_mirror_ctl.c optional geom_mirror +geom/multipath/g_multipath.c optional geom_multipath geom/nop/g_nop.c optional geom_nop geom/part/g_part.c standard geom/part/g_part_if.m standard @@ -1846,7 +1847,7 @@ netipx/ipx.c optional ipx netipx/ipx_cksum.c optional ipx netipx/ipx_input.c optional ipx -netipx/ipx_ip.c optional ipx +netipx/ipx_ip.c optional ipx ipxip netipx/ipx_outputfl.c optional ipx netipx/ipx_pcb.c optional ipx netipx/ipx_proto.c optional ipx ==== //depot/projects/linuxolator/src/sys/conf/options#18 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.576 2007/02/10 13:59:13 bms Exp $ +# $FreeBSD: src/sys/conf/options,v 1.578 2007/02/27 12:05:25 des Exp $ # # On the handling of kernel options # @@ -85,6 +85,7 @@ GEOM_LABEL opt_geom.h GEOM_MBR opt_geom.h GEOM_MIRROR opt_geom.h +GEOM_MULTIPATH opt_geom.h GEOM_NOP opt_geom.h GEOM_PART_APM opt_geom.h GEOM_PART_GPT opt_geom.h @@ -548,6 +549,7 @@ MUTEX_DEBUG opt_global.h MUTEX_NOINLINE opt_global.h LOCK_PROFILING opt_global.h +LOCK_PROFILING_FAST opt_global.h MSIZE opt_global.h REGRESSION opt_global.h RESTARTABLE_PANICS opt_global.h ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_ec.c#2 (text+ko) ==== @@ -136,7 +136,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.68 2005/12/06 14:51:55 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.69 2007/02/27 00:14:20 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -187,15 +187,15 @@ * | | | +--------- Burst Mode Enabled? * | | +----------- SCI Event? * | +------------- SMI Event? - * +--------------- <Reserved> + * +--------------- <reserved> * */ typedef UINT8 EC_STATUS; #define EC_FLAG_OUTPUT_BUFFER ((EC_STATUS) 0x01) #define EC_FLAG_INPUT_BUFFER ((EC_STATUS) 0x02) +#define EC_FLAG_DATA_IS_CMD ((EC_STATUS) 0x08) #define EC_FLAG_BURST_MODE ((EC_STATUS) 0x10) -#define EC_FLAG_SCI ((EC_STATUS) 0x20) /* * EC_EVENT: @@ -207,6 +207,10 @@ #define EC_EVENT_OUTPUT_BUFFER_FULL ((EC_EVENT) 0x01) #define EC_EVENT_INPUT_BUFFER_EMPTY ((EC_EVENT) 0x02) #define EC_EVENT_SCI ((EC_EVENT) 0x20) +#define EC_EVENT_SMI ((EC_EVENT) 0x40) + +/* Data byte returned after burst enable indicating it was successful. */ +#define EC_BURST_ACK 0x90 /* * Register access primitives @@ -265,8 +269,11 @@ bus_space_tag_t ec_csr_tag; bus_space_handle_t ec_csr_handle; + struct mtx ec_mtx; int ec_glk; int ec_glkhandle; + int ec_burstactive; + int ec_sci_pend; }; /* @@ -276,11 +283,14 @@ */ #define EC_LOCK_TIMEOUT 1000 -/* Default interval in microseconds for the status polling loop. */ +/* Default delay in microseconds between each run of the status polling loop. */ #define EC_POLL_DELAY 10 -/* Total time in ms spent in the poll loop waiting for a response. */ -#define EC_POLL_TIMEOUT 100 +/* Default time in microseconds spent polling before sleep waiting. */ +#define EC_POLL_TIME 500 + +/* Total time in ms spent waiting for a response from EC. */ +#define EC_TIMEOUT 500 #define EVENT_READY(event, status) \ (((event) == EC_EVENT_OUTPUT_BUFFER_FULL && \ @@ -288,25 +298,47 @@ ((event) == EC_EVENT_INPUT_BUFFER_EMPTY && \ ((status) & EC_FLAG_INPUT_BUFFER) == 0)) -static int ec_poll_timeout = EC_POLL_TIMEOUT; -TUNABLE_INT("hw.acpi.ec.poll_timeout", &ec_poll_timeout); +ACPI_SERIAL_DECL(ec, "ACPI embedded controller"); + +SYSCTL_DECL(_debug_acpi); +SYSCTL_NODE(_debug_acpi, OID_AUTO, ec, CTLFLAG_RD, NULL, "EC debugging"); -ACPI_SERIAL_DECL(ec, "ACPI embedded controller"); +static int ec_burst_mode = TRUE; +TUNABLE_INT("debug.acpi.ec.burst", &ec_burst_mode); +SYSCTL_INT(_debug_acpi_ec, OID_AUTO, burst, CTLFLAG_RW, &ec_burst_mode, TRUE, + "Enable use of burst mode (faster for nearly all systems)"); +static int ec_poll_time = EC_POLL_TIME; +TUNABLE_INT("debug.acpi.ec.poll_time", &ec_poll_time); +SYSCTL_INT(_debug_acpi_ec, OID_AUTO, poll_time, CTLFLAG_RW, &ec_poll_time, + EC_POLL_TIME, "Time spent polling vs. sleeping (CPU intensive)"); +static int ec_timeout = EC_TIMEOUT; +TUNABLE_INT("debug.acpi.ec.timeout", &ec_timeout); +SYSCTL_INT(_debug_acpi_ec, OID_AUTO, timeout, CTLFLAG_RW, &ec_timeout, + EC_TIMEOUT, "Total time spent waiting for a response (poll+sleep)"); static __inline ACPI_STATUS -EcLock(struct acpi_ec_softc *sc) +EcLock(struct acpi_ec_softc *sc, int serialize) { ACPI_STATUS status; - /* Always acquire the exclusive lock. */ + /* + * If caller is executing a series of commands, acquire the exclusive lock + * to serialize with other users. + * To sync with bottom-half interrupt handler, always acquire the mutex. + */ status = AE_OK; - ACPI_SERIAL_BEGIN(ec); + if (serialize) + ACPI_SERIAL_BEGIN(ec); + mtx_lock(&sc->ec_mtx); /* If _GLK is non-zero, also acquire the global lock. */ if (sc->ec_glk) { status = AcpiAcquireGlobalLock(EC_LOCK_TIMEOUT, &sc->ec_glkhandle); - if (ACPI_FAILURE(status)) - ACPI_SERIAL_END(ec); + if (ACPI_FAILURE(status)) { + mtx_unlock(&sc->ec_mtx); + if (serialize) + ACPI_SERIAL_END(ec); + } } return (status); @@ -317,7 +349,9 @@ { if (sc->ec_glk) AcpiReleaseGlobalLock(sc->ec_glkhandle); - ACPI_SERIAL_END(ec); + mtx_unlock(&sc->ec_mtx); + if (sx_xlocked(&ec_sxlock)) + ACPI_SERIAL_END(ec); } static uint32_t EcGpeHandler(void *Context); @@ -558,6 +592,7 @@ params = acpi_get_private(dev); sc->ec_dev = dev; sc->ec_handle = acpi_get_handle(dev); + mtx_init(&sc->ec_mtx, "ACPI EC lock", NULL, MTX_DEF); /* Retrieve previously probed values via device ivars. */ sc->ec_glk = params->glk; @@ -640,6 +675,7 @@ if (sc->ec_data_res) bus_release_resource(sc->ec_dev, SYS_RES_IOPORT, sc->ec_data_rid, sc->ec_data_res); + mtx_destroy(&sc->ec_mtx); return (ENXIO); } @@ -687,13 +723,13 @@ struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; UINT8 Data; ACPI_STATUS Status; - EC_STATUS EcStatus; char qxx[5]; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); KASSERT(Context != NULL, ("EcGpeQueryHandler called with NULL")); - Status = EcLock(sc); + /* Serialize user access with EcSpaceHandler(). */ + Status = EcLock(sc, TRUE); if (ACPI_FAILURE(Status)) { ACPI_VPRINT(sc->ec_dev, acpi_device_get_parent_softc(sc->ec_dev), "GpeQuery lock error: %s\n", AcpiFormatException(Status)); @@ -701,19 +737,6 @@ } /* - * If the EC_SCI bit of the status register is not set, then pass - * it along to any potential waiters as it may be an IBE/OBF event. - */ - EcStatus = EC_GET_CSR(sc); - if ((EcStatus & EC_EVENT_SCI) == 0) { - CTR1(KTR_ACPI, "ec event was not SCI, status %#x", EcStatus); - sc->ec_csrvalue = EcStatus; - wakeup(&sc->ec_csrvalue); - EcUnlock(sc); - goto re_enable; - } - - /* * Send a query command to the EC to find out which _Qxx call it * wants to make. This command clears the SCI bit and also the * interrupt source since we are edge-triggered. @@ -726,6 +749,9 @@ goto re_enable; } Data = EC_GET_DATA(sc); + sc->ec_sci_pend = FALSE; + + /* Drop locks before evaluating _Qxx method since it may trigger GPEs. */ EcUnlock(sc); /* Ignore the value for "no outstanding event". (13.3.5) */ @@ -734,7 +760,7 @@ goto re_enable; /* Evaluate _Qxx to respond to the controller. */ - sprintf(qxx, "_Q%02x", Data); + snprintf(qxx, sizeof(qxx), "_Q%02x", Data); AcpiUtStrupr(qxx); Status = AcpiEvaluateObject(sc->ec_handle, qxx, NULL, NULL); if (ACPI_FAILURE(Status) && Status != AE_NOT_FOUND) { @@ -745,7 +771,7 @@ re_enable: /* Re-enable the GPE event so we'll get future requests. */ - Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR); + Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); if (ACPI_FAILURE(Status)) printf("EcGpeQueryHandler: AcpiEnableEvent failed\n"); } @@ -760,27 +786,61 @@ { struct acpi_ec_softc *sc = Context; ACPI_STATUS Status; + EC_STATUS EcStatus; KASSERT(Context != NULL, ("EcGpeHandler called with NULL")); /* * Disable further GPEs while we handle this one. Since we are directly * called by ACPI-CA and it may have unknown locks held, we specify the - * ACPI_ISR flag to keep it from acquiring any more mutexes (which could - * potentially sleep.) + * ACPI_ISR flag to keep it from acquiring any more mutexes (although + * sleeping would be ok since we're in an ithread.) */ AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); - /* Schedule the GPE query handler. */ - Status = AcpiOsQueueForExecution(OSD_PRIORITY_GPE, EcGpeQueryHandler, - Context); + /* For interrupt (GPE) handler, don't acquire serialization lock. */ + Status = EcLock(sc, FALSE); if (ACPI_FAILURE(Status)) { - printf("Queuing GPE query handler failed.\n"); - Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); - if (ACPI_FAILURE(Status)) - printf("EcGpeHandler: AcpiEnableEvent failed\n"); + ACPI_VPRINT(sc->ec_dev, acpi_device_get_parent_softc(sc->ec_dev), + "GpeQuery lock error: %s\n", AcpiFormatException(Status)); + return (-1); + } + + /* + * If burst was active, but the status bit was cleared, the EC had to + * exit burst mode for some reason. Record this for later. + */ + EcStatus = EC_GET_CSR(sc); + if (sc->ec_burstactive && (EcStatus & EC_FLAG_BURST_MODE) == 0) { + CTR0(KTR_ACPI, "ec burst disabled in query handler"); + sc->ec_burstactive = FALSE; + } + + /* + * If the EC_SCI bit of the status register is not set, then pass + * it along to any potential waiters as it may be an IBE/OBF event. + * If it is set, queue a query handler. + */ + if ((EcStatus & EC_EVENT_SCI) == 0) { + CTR1(KTR_ACPI, "ec event was IBE/OBF, status %#x", EcStatus); + sc->ec_csrvalue = EcStatus; + wakeup(&sc->ec_csrvalue); + } else if (!sc->ec_sci_pend) { + /* SCI bit set and no pending query handler, so schedule one. */ + CTR0(KTR_ACPI, "ec queueing gpe handler"); + Status = AcpiOsQueueForExecution(OSD_PRIORITY_GPE, EcGpeQueryHandler, + Context); + if (ACPI_SUCCESS(Status)) { + sc->ec_sci_pend = TRUE; + } else { + printf("Queuing GPE query handler failed.\n"); + Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); + if (ACPI_FAILURE(Status)) + printf("EcGpeHandler: AcpiEnableEvent failed\n"); + } } + EcUnlock(sc); return (0); } @@ -824,7 +884,8 @@ EcAddr = Address; Status = AE_ERROR; - Status = EcLock(sc); + /* Grab serialization lock to hold across command sequence. */ + Status = EcLock(sc, TRUE); if (ACPI_FAILURE(Status)) return_ACPI_STATUS (Status); @@ -859,87 +920,103 @@ { EC_STATUS EcStatus; ACPI_STATUS Status; - int count, i, period, retval, slp_ival; + int count, i, retval, slp_ival; ACPI_SERIAL_ASSERT(ec); Status = AE_NO_HARDWARE_RESPONSE; + EcStatus = 0; - /* - * Wait for 1 us before checking the CSR. Testing shows about - * 50% of requests complete in 1 us and 90% of them complete - * in 5 us or less. - */ - AcpiOsStall(1); - /* - * Poll the EC status register for up to 1 ms in chunks of 10 us - * to detect completion of the last command. + * Poll for up to ec_poll_time microseconds since many ECs complete + * the command quickly, especially if in burst mode. */ - for (i = 0; i < 1000 / EC_POLL_DELAY; i++) { +#if 0 /* Enable this as a possible workaround if EC times out. */ + AcpiOsStall(EC_POLL_DELAY); +#endif + count = ec_poll_time / EC_POLL_DELAY; + if (count <= 0) + count = 1; + for (i = 0; i < count; i++) { EcStatus = EC_GET_CSR(sc); + if (sc->ec_burstactive && (EcStatus & EC_FLAG_BURST_MODE) == 0) { + CTR0(KTR_ACPI, "ec burst disabled in waitevent (poll)"); + sc->ec_burstactive = FALSE; + } if (EVENT_READY(Event, EcStatus)) { + CTR1(KTR_ACPI, "ec poll wait ready, status %#x", EcStatus); Status = AE_OK; break; } AcpiOsStall(EC_POLL_DELAY); } - period = i * EC_POLL_DELAY; /* * If we still don't have a response and we're up and running, wait up - * to ec_poll_timeout ms for completion, sleeping for chunks of 10 ms. + * to ec_timeout ms for completion, sleeping for chunks of 1 ms or the + * smallest resolution hz supports. */ slp_ival = 0; if (Status != AE_OK) { retval = ENXIO; - count = ec_poll_timeout / 10; - if (count == 0) - count = 1; - slp_ival = hz / 100; - if (slp_ival == 0) - slp_ival = 1; + if (!cold) { + slp_ival = hz / 1000; + if (slp_ival != 0) { + count = ec_timeout / slp_ival; + } else { + /* hz has less than 1000 Hz resolution so scale timeout. */ + slp_ival = 1; + count = ec_timeout / (1000 / hz); + } + } else + count = ec_timeout; for (i = 0; i < count; i++) { if (retval != 0) EcStatus = EC_GET_CSR(sc); else EcStatus = sc->ec_csrvalue; + if (sc->ec_burstactive && (EcStatus & EC_FLAG_BURST_MODE) == 0) { + CTR0(KTR_ACPI, "ec burst disabled in waitevent (slp)"); + sc->ec_burstactive = FALSE; + } if (EVENT_READY(Event, EcStatus)) { + CTR1(KTR_ACPI, "ec sleep wait ready, status %#x", EcStatus); Status = AE_OK; break; } - if (!cold) - retval = tsleep(&sc->ec_csrvalue, PZERO, "ecpoll", slp_ival); - else - AcpiOsStall(10000); + if (!cold) { + retval = msleep(&sc->ec_csrvalue, &sc->ec_mtx, PZERO, "ecpoll", + slp_ival); + } else + AcpiOsStall(1000); } } - /* Calculate new delay and log it. */ - if (slp_ival > 0) - period += i * 10000; - CTR2(KTR_ACPI, "ec got event %#x after %d us", EcStatus, period); - return (Status); } static ACPI_STATUS EcCommand(struct acpi_ec_softc *sc, EC_COMMAND cmd) { - ACPI_STATUS Status; - EC_EVENT Event; + ACPI_STATUS status; + EC_EVENT event; + EC_STATUS ec_status; ACPI_SERIAL_ASSERT(ec); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703012004.l21K4nGh071754>
