Date: Thu, 9 Sep 2004 01:12:53 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 61221 for review Message-ID: <200409090112.i891CrtX087677@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=61221 Change 61221 by rwatson@rwatson_paprika on 2004/09/09 01:12:02 Integrate netperf_socket: - Default scheduler is now SCHED_4BSD. - PREEMPTION is enabled by default. - Various and sundry driver fixes, etc, etc. - More scheduler cleanups/bug fixes/clarifications. - re-ifi_epoch. netperf loopback: - BPF minor fixes, conversion to queue(3). Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/busdma_machdep.c#4 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/clock.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#10 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#28 integrate .. //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#17 integrate .. //depot/projects/netperf_socket/sys/arm/arm/busdma_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/boot/sparc64/loader/main.c#4 integrate .. //depot/projects/netperf_socket/sys/cam/scsi/scsi_cd.c#3 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#42 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_powerres.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_thermal.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/ed/if_ed.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/sbp.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/isp/isp_pci.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/md/md.c#20 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ugen.c#8 integrate .. //depot/projects/netperf_socket/sys/fs/autofs/autofs.h#3 integrate .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_util.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_vfsops.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_vnops.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/denode.h#2 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_denode.c#3 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_fat.c#2 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs.h#2 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs_io.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs_vnops.c#2 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs.h#2 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_io.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_vnops.c#4 integrate .. //depot/projects/netperf_socket/sys/geom/geom_subr.c#8 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.c#11 integrate .. //depot/projects/netperf_socket/sys/geom/notes#2 integrate .. //depot/projects/netperf_socket/sys/geom/uzip/g_uzip.c#2 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/i386/conf/GENERIC#14 integrate .. //depot/projects/netperf_socket/sys/i386/i386/busdma_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#28 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_proto.h#6 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_syscall.h#6 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_sysent.c#6 integrate .. //depot/projects/netperf_socket/sys/i386/linux/syscalls.master#6 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/busdma_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/kern/kern_event.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/kern_switch.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thr.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/sched_4bsd.c#16 integrate .. //depot/projects/netperf_socket/sys/kern/subr_witness.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_mount.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_subr.c#23 integrate .. //depot/projects/netperf_socket/sys/modules/autofs/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/geom/geom_uzip/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/net/bpf.c#12 integrate .. //depot/projects/netperf_socket/sys/net/bpfdesc.h#5 integrate .. //depot/projects/netperf_socket/sys/net/if.c#20 integrate .. //depot/projects/netperf_socket/sys/net/if.h#9 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_pptpgre.c#4 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_fw2.c#18 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_output.c#20 integrate .. //depot/projects/netperf_socket/sys/netinet6/nd6.c#7 integrate .. //depot/projects/netperf_socket/sys/nfs4client/nfs4_vnops.c#6 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs.h#8 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_bio.c#9 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_nfsiod.c#4 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_vnops.c#7 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/GENERIC#15 integrate .. //depot/projects/netperf_socket/sys/pci/if_pcn.c#9 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/busdma_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/sparc64/conf/GENERIC#12 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/bus_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/sys/param.h#29 integrate .. //depot/projects/netperf_socket/sys/sys/vnode.h#11 integrate .. //depot/projects/netperf_socket/sys/ufs/ufs/ufs_vnops.c#8 integrate .. //depot/projects/netperf_socket/sys/vm/vnode_pager.c#6 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/busdma_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.45 2004/07/02 03:47:28 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.46 2004/09/08 04:54:18 scottl Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -229,11 +229,11 @@ if (parent != NULL) { newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); - /* - * XXX Not really correct??? Probably need to honor boundary - * all the way up the inheritence chain. - */ - newtag->boundary = MAX(parent->boundary, newtag->boundary); + if (newtag->boundary == 0) + newtag->boundary = parent->boundary; + else if (parent->boundary != 0) + newtag->boundary = MIN(parent->boundary, + newtag->boundary); if (newtag->filter == NULL) { /* * Short circuit looking at our parent directly ==== //depot/projects/netperf_socket/sys/alpha/alpha/clock.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.36 2004/04/05 21:00:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.37 2004/09/07 07:06:36 phk Exp $"); #include "opt_clock.h" @@ -120,7 +120,8 @@ 0, /* no poll_pps */ ~0u, /* counter_mask */ 0, /* frequency */ - "alpha" /* name */ + "alpha", /* name */ + 800, /* quality */ }; static struct timecounter i8254_timecounter = { ==== //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#10 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.177 2004/08/30 18:40:00 wilko Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.178 2004/09/07 22:37:43 scottl Exp $ machine alpha cpu EV4 @@ -46,7 +46,9 @@ options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) -options SCHED_ULE #ULE scheduler +#options SCHED_ULE #ULE scheduler +options SCHED_4BSD #4BSD scheduler +options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem ==== //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.57 2004/08/16 22:53:03 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.58 2004/09/08 04:54:18 scottl Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -248,11 +248,11 @@ if (parent != NULL) { newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); - /* - * XXX Not really correct??? Probably need to honor boundary - * all the way up the inheritence chain. - */ - newtag->boundary = MAX(parent->boundary, newtag->boundary); + if (newtag->boundary == 0) + newtag->boundary = parent->boundary; + else if (parent->boundary != 0) + newtag->boundary = MIN(parent->boundary, + newtag->boundary); if (newtag->filter == NULL) { /* * Short circuit looking at our parent directly ==== //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#28 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.496 2004/08/30 03:52:04 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.497 2004/09/08 18:58:28 alc Exp $"); /* * Manages physical address maps. @@ -203,7 +203,7 @@ static PMAP_INLINE void free_pv_entry(pv_entry_t pv); static pv_entry_t get_pv_entry(void); -static void pmap_clear_ptes(vm_page_t m, int bit); +static void pmap_clear_ptes(vm_page_t m, long bit); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, pd_entry_t ptepde); @@ -2591,7 +2591,7 @@ * Clear the given bit in each of the given page's ptes. */ static __inline void -pmap_clear_ptes(vm_page_t m, int bit) +pmap_clear_ptes(vm_page_t m, long bit) { register pv_entry_t pv; pt_entry_t pbits, *pte; @@ -2623,15 +2623,18 @@ PMAP_LOCK(pv->pv_pmap); pte = pmap_pte(pv->pv_pmap, pv->pv_va); +retry: pbits = *pte; if (pbits & bit) { if (bit == PG_RW) { + if (!atomic_cmpset_long(pte, pbits, + pbits & ~(PG_RW | PG_M))) + goto retry; if (pbits & PG_M) { vm_page_dirty(m); } - pte_store(pte, pbits & ~(PG_M|PG_RW)); } else { - pte_store(pte, pbits & ~bit); + atomic_clear_long(pte, bit); } pmap_invalidate_page(pv->pv_pmap, pv->pv_va); } ==== //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#17 (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/amd64/conf/GENERIC,v 1.422 2004/08/27 15:16:21 andre Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.423 2004/09/07 22:37:43 scottl Exp $ machine amd64 cpu HAMMER @@ -27,7 +27,9 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options SCHED_ULE # ULE scheduler +#options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem ==== //depot/projects/netperf_socket/sys/arm/arm/busdma_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.2 2004/07/21 22:04:05 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.3 2004/09/08 04:54:18 scottl Exp $"); /* * MacPPC bus dma support routines @@ -207,12 +207,11 @@ if (parent != NULL) { newtag->lowaddr = min(parent->lowaddr, newtag->lowaddr); newtag->highaddr = max(parent->highaddr, newtag->highaddr); - - /* - * XXX Not really correct??? Probably need to honor boundary - * all the way up the inheritence chain. - */ - newtag->boundary = max(parent->boundary, newtag->boundary); + if (newtag->boundary == 0) + newtag->boundary = parent->boundary; + else if (parent->boundary != 0) + newtag->boundary = min(parent->boundary, + newtag->boundary); if (newtag->filter == NULL) { /* * Short circuit looking at our parent directly ==== //depot/projects/netperf_socket/sys/boot/sparc64/loader/main.c#4 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/main.c,v 1.24 2004/08/19 20:13:31 kensmith Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/main.c,v 1.25 2004/09/08 12:52:45 kensmith Exp $"); /* * FreeBSD/sparc64 kernel loader - machine dependent part @@ -197,9 +197,7 @@ static int sparc64_autoload(void) { - /* XXX - Temporary hack needed for new ATA to work. */ - printf("Turning off DMA for ATA.\n"); - setenv("hw.ata.ata_dma", "0", 1); + printf("nothing to autoload yet.\n"); return 0; } ==== //depot/projects/netperf_socket/sys/cam/scsi/scsi_cd.c#3 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.89 2004/02/18 21:36:50 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.90 2004/09/05 21:15:58 phk Exp $"); #include "opt_cd.h" @@ -2723,7 +2723,7 @@ cdprevent(periph, PR_PREVENT); softc->disk->d_maxsize = DFLTPHYS; - softc->disk->d_sectorsize = 0; + softc->disk->d_sectorsize = 2048; softc->disk->d_mediasize = 0; /* ==== //depot/projects/netperf_socket/sys/conf/NOTES#42 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1275 2004/09/03 06:32:11 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1276 2004/09/08 08:42:36 ru Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1904,20 +1904,20 @@ device snd_uaudio # For non-pnp sound cards: -hint.snd_mss.0.at="isa" -hint.snd_mss.0.irq="10" -hint.snd_mss.0.drq="1" -hint.snd_mss.0.flags="0x0" -hint.snd_sbc.0.at="isa" -hint.snd_sbc.0.port="0x220" -hint.snd_sbc.0.irq="5" -hint.snd_sbc.0.drq="1" -hint.snd_sbc.0.flags="0x15" -hint.snd_gusc.0.at="isa" -hint.snd_gusc.0.port="0x220" -hint.snd_gusc.0.irq="5" -hint.snd_gusc.0.drq="1" -hint.snd_gusc.0.flags="0x13" +hint.pcm.0.at="isa" +hint.pcm.0.irq="10" +hint.pcm.0.drq="1" +hint.pcm.0.flags="0x0" +hint.sbc.0.at="isa" +hint.sbc.0.port="0x220" +hint.sbc.0.irq="5" +hint.sbc.0.drq="1" +hint.sbc.0.flags="0x15" +hint.gusc.0.at="isa" +hint.gusc.0.port="0x220" +hint.gusc.0.irq="5" +hint.gusc.0.drq="1" +hint.gusc.0.flags="0x13" # # Miscellaneous hardware: ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_powerres.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_powerres.c,v 1.26 2004/08/13 06:22:10 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_powerres.c,v 1.27 2004/09/07 16:58:12 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -62,6 +62,7 @@ /* Return values from _STA on a power resource */ #define ACPI_PWR_OFF 0 #define ACPI_PWR_ON 1 +#define ACPI_PWR_UNK (-1) /* A relationship between a power resource and a consumer. */ struct acpi_powerreference { @@ -87,6 +88,7 @@ ACPI_HANDLE ap_resource; ACPI_INTEGER ap_systemlevel; ACPI_INTEGER ap_order; + int ap_state; }; static TAILQ_HEAD(acpi_powerresource_list, acpi_powerresource) @@ -169,6 +171,7 @@ } rp->ap_systemlevel = obj->PowerResource.SystemLevel; rp->ap_order = obj->PowerResource.ResourceOrder; + rp->ap_state = ACPI_PWR_UNK; /* Sort the resource into the list */ status = AE_OK; @@ -640,17 +643,17 @@ if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n", acpi_name(rp->ap_resource), status)); - /* XXX is this correct? Always switch if in doubt? */ continue; - } + } else if (rp->ap_state == ACPI_PWR_UNK) + rp->ap_state = cur; /* * Switch if required. Note that we ignore the result of the switch * effort; we don't know what to do if it fails, so checking wouldn't * help much. */ - if (cur != ACPI_PWR_ON) { + if (rp->ap_state != ACPI_PWR_ON) { status = AcpiEvaluateObject(rp->ap_resource, "_ON", NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, @@ -658,6 +661,7 @@ acpi_name(rp->ap_resource), AcpiFormatException(status))); } else { + rp->ap_state = ACPI_PWR_ON; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s on\n", acpi_name(rp->ap_resource))); } @@ -685,14 +689,15 @@ acpi_name(rp->ap_resource), status)); /* XXX is this correct? Always switch if in doubt? */ continue; - } + } else if (rp->ap_state == ACPI_PWR_UNK) + rp->ap_state = cur; /* * Switch if required. Note that we ignore the result of the switch * effort; we don't know what to do if it fails, so checking wouldn't * help much. */ - if (cur != ACPI_PWR_OFF) { + if (rp->ap_state != ACPI_PWR_OFF) { status = AcpiEvaluateObject(rp->ap_resource, "_OFF", NULL, NULL); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, @@ -700,6 +705,7 @@ acpi_name(rp->ap_resource), AcpiFormatException(status))); } else { + rp->ap_state = ACPI_PWR_OFF; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s off\n", acpi_name(rp->ap_resource))); } ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi_thermal.c#13 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.49 2004/08/30 22:42:10 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.51 2004/09/08 19:36:07 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -112,7 +112,9 @@ static int acpi_tz_attach(device_t dev); static int acpi_tz_establish(struct acpi_tz_softc *sc); static void acpi_tz_monitor(void *Context); +#if 0 static void acpi_tz_all_off(struct acpi_tz_softc *sc); +#endif static void acpi_tz_switch_cooler_off(ACPI_OBJECT *obj, void *arg); static void acpi_tz_switch_cooler_on(ACPI_OBJECT *obj, void *arg); static void acpi_tz_getparam(struct acpi_tz_softc *sc, char *node, @@ -225,7 +227,8 @@ OID_AUTO, oidname, CTLFLAG_RD, 0, ""); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature, - sizeof(sc->tz_temperature), "IK", "current thermal zone temperature"); + sizeof(sc->tz_temperature), "IK", + "current thermal zone temperature"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_tz_active_sysctl, "I", ""); @@ -233,9 +236,9 @@ SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "thermal_flags", CTLFLAG_RD, &sc->tz_thflags, 0, "thermal zone flags"); - SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "_PSV", CTLFLAG_RD, - &sc->tz_zone.psv, 0, ""); + SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_PSV", CTLFLAG_RD, &sc->tz_zone.psv, + sizeof(sc->tz_zone.psv), "IK", ""); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_HOT", CTLFLAG_RD, &sc->tz_zone.hot, sizeof(sc->tz_zone.hot), "IK", ""); @@ -293,8 +296,7 @@ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - /* Power everything off and erase any existing state. */ - acpi_tz_all_off(sc); + /* Erase any existing state. */ for (i = 0; i < TZ_NUMLEVELS; i++) if (sc->tz_zone.al[i].Pointer != NULL) AcpiOsFree(sc->tz_zone.al[i].Pointer); @@ -343,11 +345,6 @@ for (i = 0; i < TZ_NUMLEVELS; i++) acpi_tz_sanity(sc, &sc->tz_zone.ac[i], "_ACx"); - /* - * Power off everything that we've just been given. - */ - acpi_tz_all_off(sc); - return_VALUE (0); } @@ -490,6 +487,7 @@ return_VOID; } +#if 0 /* * Turn off all the cooling devices. */ @@ -517,6 +515,7 @@ return_VOID; } +#endif /* * Given an object, verify that it's a reference to a device of some sort, @@ -634,9 +633,6 @@ return (0); } -/* - * Respond to a Notify event sent to the zone. - */ static void acpi_tz_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { @@ -675,21 +671,32 @@ } /* - * Poll the thermal zone. + * Notifies can be generated asynchronously but have also been seen to be + * triggered by other thermal methods. One system generates a notify of + * 0x81 when the fan is turned on or off. Another generates it when _SCP + * is called. To handle these situations, we check the zone via + * acpi_tz_monitor() before evaluating changes to setpoints or the cooling + * policy. */ static void acpi_tz_timeout(struct acpi_tz_softc *sc, int flags) { + + /* Check the current temperature and take action based on it */ + acpi_tz_monitor(sc); + /* If requested, get the power profile settings. */ if (flags & TZ_FLAG_GETPROFILE) acpi_tz_power_profile(sc); - /* If requested, check for new devices/setpoints. */ - if (flags & TZ_FLAG_GETSETTINGS) + /* + * If requested, check for new devices/setpoints. After finding them, + * check if we need to switch fans based on the new values. + */ + if (flags & TZ_FLAG_GETSETTINGS) { acpi_tz_establish(sc); - - /* Check the current temperature and take action based on it */ - acpi_tz_monitor(sc); + acpi_tz_monitor(sc); + } /* XXX passive cooling actions? */ } ==== //depot/projects/netperf_socket/sys/dev/ed/if_ed.c#9 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.233 2004/08/13 23:04:23 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.234 2004/09/06 21:14:32 glebius Exp $"); /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -67,7 +67,6 @@ #endif #include <net/bpf.h> -#include <net/bridge.h> #include <machine/md_var.h> @@ -2810,26 +2809,9 @@ eh = mtod(m, struct ether_header *); /* - * Don't read in the entire packet if we know we're going to drop it - * and no bpf is active. + * Get packet, including link layer address, from interface. */ - if (!ifp->if_bpf && BDG_ACTIVE( (ifp) ) ) { - struct ifnet *bif; - - ed_ring_copy(sc, buf, (char *)eh, ETHER_HDR_LEN); - bif = bridge_in_ptr(ifp, eh) ; - if (bif == BDG_DROP) { - m_freem(m); - return; - } - if (len > ETHER_HDR_LEN) - ed_ring_copy(sc, buf + ETHER_HDR_LEN, - (char *)(eh + 1), len - ETHER_HDR_LEN); - } else - /* - * Get packet, including link layer address, from interface. - */ - ed_ring_copy(sc, buf, (char *)eh, len); + ed_ring_copy(sc, buf, (char *)eh, len); m->m_pkthdr.len = m->m_len = len; ==== //depot/projects/netperf_socket/sys/dev/firewire/sbp.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.79 2004/07/20 04:49:44 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.80 2004/09/06 20:42:34 simokawa Exp $ * */ @@ -2787,6 +2787,7 @@ if (ocb == NULL) { sdev->flags |= ORB_SHORTAGE; printf("ocb shortage!!!\n"); + splx(s); return NULL; } STAILQ_REMOVE_HEAD(&sdev->free_ocbs, ocb); ==== //depot/projects/netperf_socket/sys/dev/isp/isp_pci.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.98 2004/05/24 07:02:25 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.99 2004/09/07 08:04:09 mjacob Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -45,6 +45,12 @@ #include <sys/rman.h> #include <sys/malloc.h> +#ifdef ISP_TARGET_MODE +#ifdef PAE +#error "PAE and ISP_TARGET_MODE not supported yet" +#endif +#endif + #include <dev/isp/isp_freebsd.h> static u_int16_t isp_pci_rd_reg(struct ispsoftc *, int); @@ -1621,6 +1627,131 @@ static void dma2(void *, bus_dma_segment_t *, int, int); +#ifdef PAE +static void +dma2(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) +{ + mush_t *mp; + struct ispsoftc *isp; + struct ccb_scsiio *csio; + struct isp_pcisoftc *pcs; + bus_dmamap_t *dp; + bus_dma_segment_t *eseg; + ispreq64_t *rq; + int seglim, datalen; + u_int16_t nxti; + + mp = (mush_t *) arg; + if (error) { + mp->error = error; + return; + } + + if (nseg < 1) { + isp_prt(mp->isp, ISP_LOGERR, "bad segment count (%d)", nseg); + mp->error = EFAULT; + return; + } + csio = mp->cmd_token; + isp = mp->isp; + rq = mp->rq; + pcs = (struct isp_pcisoftc *)mp->isp; + dp = &pcs->dmaps[isp_handle_index(rq->req_handle)]; + nxti = *mp->nxtip; + + if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + bus_dmamap_sync(pcs->dmat, *dp, BUS_DMASYNC_PREREAD); + } else { + bus_dmamap_sync(pcs->dmat, *dp, BUS_DMASYNC_PREWRITE); + } + + datalen = XS_XFRLEN(csio); + + /* + * We're passed an initial partially filled in entry that + * has most fields filled in except for data transfer + * related values. + * + * Our job is to fill in the initial request queue entry and + * then to start allocating and filling in continuation entries + * until we've covered the entire transfer. + */ + + if (IS_FC(isp)) { + seglim = ISP_RQDSEG_T3; + ((ispreqt3_t *)rq)->req_totalcnt = datalen; + if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + ((ispreqt3_t *)rq)->req_flags |= REQFLAG_DATA_IN; + } else { + ((ispreqt3_t *)rq)->req_flags |= REQFLAG_DATA_OUT; + } + } else { + if (csio->cdb_len > 12) { + seglim = 0; + } else { + seglim = ISP_RQDSEG_A64; + } + if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + rq->req_flags |= REQFLAG_DATA_IN; + } else { + rq->req_flags |= REQFLAG_DATA_OUT; + } + } + + eseg = dm_segs + nseg; + + while (datalen != 0 && rq->req_seg_count < seglim && dm_segs != eseg) { + if (IS_FC(isp)) { + ispreqt3_t *rq3 = (ispreqt3_t *)rq; + rq3->req_dataseg[rq3->req_seg_count].ds_base = + dm_segs->ds_addr; + rq3->req_dataseg[rq3->req_seg_count].ds_count = + dm_segs->ds_len; + } else { + rq->req_dataseg[rq->req_seg_count].ds_base = + dm_segs->ds_addr; + rq->req_dataseg[rq->req_seg_count].ds_count = + dm_segs->ds_len; + } + datalen -= dm_segs->ds_len; + rq->req_seg_count++; + dm_segs++; + } + + while (datalen > 0 && dm_segs != eseg) { + u_int16_t onxti; + ispcontreq64_t local, *crq = &local, *cqe; + + cqe = (ispcontreq64_t *) ISP_QUEUE_ENTRY(isp->isp_rquest, nxti); + onxti = nxti; + nxti = ISP_NXT_QENTRY(onxti, RQUEST_QUEUE_LEN(isp)); + if (nxti == mp->optr) { + isp_prt(isp, ISP_LOGDEBUG0, "Request Queue Overflow++"); + mp->error = MUSHERR_NOQENTRIES; + return; + } + rq->req_header.rqs_entry_count++; + MEMZERO((void *)crq, sizeof (*crq)); + crq->req_header.rqs_entry_count = 1; + crq->req_header.rqs_entry_type = RQSTYPE_A64_CONT; + + seglim = 0; + while (datalen > 0 && seglim < ISP_CDSEG64 && dm_segs != eseg) { + crq->req_dataseg[seglim].ds_base = + dm_segs->ds_addr; + crq->req_dataseg[seglim].ds_count = + dm_segs->ds_len; + rq->req_seg_count++; + dm_segs++; + seglim++; + datalen -= dm_segs->ds_len; + } + isp_put_cont64_req(isp, crq, cqe); + MEMORYBARRIER(isp, SYNC_REQUEST, onxti, QENTRY_LEN); + } + *mp->nxtip = nxti; +} +#else static void dma2(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) { @@ -1744,6 +1875,7 @@ } *mp->nxtip = nxti; } +#endif static int isp_pci_dmasetup(struct ispsoftc *isp, struct ccb_scsiio *csio, ispreq_t *rq, @@ -1821,7 +1953,7 @@ } else { /* Pointer to physical buffer */ struct bus_dma_segment seg; - seg.ds_addr = (bus_addr_t)csio->data_ptr; + seg.ds_addr = (bus_addr_t)(vm_offset_t)csio->data_ptr; seg.ds_len = csio->dxfer_len; (*eptr)(mp, &seg, 1, 0); } @@ -1867,6 +1999,10 @@ case RQSTYPE_T2RQS: isp_put_request_t2(isp, (ispreqt2_t *) rq, (ispreqt2_t *) qep); break; + case RQSTYPE_A64: + case RQSTYPE_T3RQS: + isp_put_request_t3(isp, (ispreqt3_t *) rq, (ispreqt3_t *) qep); + break; } return (CMD_QUEUED); } ==== //depot/projects/netperf_socket/sys/dev/md/md.c#20 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/dev/md/md.c,v 1.129 2004/08/30 08:38:30 cperciva Exp $ + * $FreeBSD: src/sys/dev/md/md.c,v 1.130 2004/09/07 07:54:45 phk Exp $ * */ @@ -619,9 +619,7 @@ for (;;) { mtx_lock(&sc->queue_mtx); - bp = bioq_first(&sc->bio_queue); - if (bp) - bioq_remove(&sc->bio_queue, bp); + bp = bioq_takefirst(&sc->bio_queue); if (!bp) { if (sc->flags & MD_SHUTDOWN) { mtx_unlock(&sc->queue_mtx); ==== //depot/projects/netperf_socket/sys/dev/usb/ugen.c#8 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ugen.c,v 1.88 2004/08/15 23:39:18 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ugen.c,v 1.89 2004/09/08 07:13:39 imp Exp $"); /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -405,7 +405,6 @@ if (endpt == USB_CONTROL_ENDPOINT) { sc->sc_is_open[USB_CONTROL_ENDPOINT] = 1; - sc->sc_refcnt++; return (0); } @@ -516,7 +515,6 @@ } } sc->sc_is_open[endpt] = 1; - sc->sc_refcnt++; return (0); } @@ -544,8 +542,6 @@ if (endpt == USB_CONTROL_ENDPOINT) { DPRINTFN(5, ("ugenclose: close control\n")); sc->sc_is_open[endpt] = 0; - if (--sc->sc_refcnt == 0) - usb_detach_wakeup(USBDEV(sc->sc_dev)); return (0); } @@ -581,8 +577,6 @@ } } sc->sc_is_open[endpt] = 0; - if (--sc->sc_refcnt == 0) - usb_detach_wakeup(USBDEV(sc->sc_dev)); return (0); } @@ -739,7 +733,10 @@ USB_GET_SC(ugen, UGENUNIT(dev), sc); + sc->sc_refcnt++; error = ugen_do_read(sc, endpt, uio, flag); + if (--sc->sc_refcnt < 0) + usb_detach_wakeup(USBDEV(sc->sc_dev)); return (error); } @@ -836,7 +833,10 @@ USB_GET_SC(ugen, UGENUNIT(dev), sc); + sc->sc_refcnt++; error = ugen_do_write(sc, endpt, uio, flag); + if (--sc->sc_refcnt < 0) + usb_detach_wakeup(USBDEV(sc->sc_dev)); return (error); } @@ -885,13 +885,12 @@ } s = splusb(); - if (sc->sc_refcnt > 0) { + if (--sc->sc_refcnt >= 0) { /* Wake everyone */ for (i = 0; i < USB_MAX_ENDPOINTS; i++) wakeup(&sc->sc_endpoints[i][IN]); /* Wait for processes to go away. */ - while (sc->sc_refcnt > 0) - usb_detach_wait(USBDEV(sc->sc_dev)); + usb_detach_wait(USBDEV(sc->sc_dev)); } splx(s); @@ -1401,7 +1400,10 @@ USB_GET_SC(ugen, UGENUNIT(dev), sc); + sc->sc_refcnt++; error = ugen_do_ioctl(sc, endpt, cmd, addr, flag, p); + if (--sc->sc_refcnt < 0) + usb_detach_wakeup(USBDEV(sc->sc_dev)); return (error); } ==== //depot/projects/netperf_socket/sys/fs/autofs/autofs.h#3 (text+ko) ==== @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/autofs/autofs.h,v 1.2 2004/09/04 18:09:47 alfred Exp $ - * $Id: autofs.h,v 1.20 2004/08/31 08:49:56 bright Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs.h,v 1.3 2004/09/08 08:44:14 alfred Exp $ + * $Id: autofs.h,v 1.21 2004/09/08 08:12:21 bright Exp $ */ #ifndef __AUTOFS_H__ #define __AUTOFS_H__ ==== //depot/projects/netperf_socket/sys/fs/autofs/autofs_util.c#3 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409090112.i891CrtX087677>