Date: Wed, 6 Sep 2006 00:08:44 GMT From: Matt Jacob <mjacob@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 105705 for review Message-ID: <200609060008.k8608iiu026956@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105705 Change 105705 by mjacob@newisp on 2006/09/06 00:08:02 IFC. Affected files ... .. //depot/projects/newisp/amd64/amd64/local_apic.c#2 integrate .. //depot/projects/newisp/boot/i386/pxeldr/pxeldr.S#2 integrate .. //depot/projects/newisp/conf/files.amd64#2 integrate .. //depot/projects/newisp/dev/aic7xxx/aic7xxx_osm.c#2 integrate .. //depot/projects/newisp/dev/atkbdc/atkbdc.c#2 integrate .. //depot/projects/newisp/dev/mpt/mpt_cam.c#2 integrate .. //depot/projects/newisp/dev/puc/pucdata.c#2 integrate .. //depot/projects/newisp/dev/vge/if_vge.c#2 integrate .. //depot/projects/newisp/geom/gate/g_gate.c#2 integrate .. //depot/projects/newisp/geom/gate/g_gate.h#2 integrate .. //depot/projects/newisp/i386/i386/local_apic.c#2 integrate .. //depot/projects/newisp/kern/kern_umtx.c#5 integrate .. //depot/projects/newisp/kern/vfs_subr.c#2 integrate .. //depot/projects/newisp/modules/agp/Makefile#2 integrate .. //depot/projects/newisp/modules/sound/sound/Makefile#2 integrate .. //depot/projects/newisp/net/bpf.h#2 integrate .. //depot/projects/newisp/netinet/tcp_subr.c#2 integrate .. //depot/projects/newisp/netinet/udp_usrreq.c#2 integrate .. //depot/projects/newisp/netinet6/ip6_forward.c#2 integrate .. //depot/projects/newisp/security/audit/audit.h#3 integrate .. //depot/projects/newisp/sparc64/sparc64/mp_machdep.c#2 integrate .. //depot/projects/newisp/sys/param.h#3 integrate .. //depot/projects/newisp/vm/vm_contig.c#2 integrate .. //depot/projects/newisp/vm/vm_page.h#3 integrate Differences ... ==== //depot/projects/newisp/amd64/amd64/local_apic.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.26 2006/07/12 21:22:42 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.27 2006/09/05 17:15:24 sobomax Exp $"); #include "opt_hwpmc_hooks.h" @@ -613,6 +613,16 @@ /* Send EOI first thing. */ lapic_eoi(); + /* + * Don't do any accounting for the disabled HTT cores, since it + * will provide misleading numbers for the userland. + * + * No locking is necessary here, since even if we loose the race + * when hlt_cpus_mask changes it is not a big deal, really. + */ + if ((hlt_cpus_mask & (1 << PCPU_GET(cpuid))) != 0) + return; + /* Look up our local APIC structure for the tick counters. */ la = &lapics[PCPU_GET(apic_id)]; (*la->la_timer_count)++; ==== //depot/projects/newisp/boot/i386/pxeldr/pxeldr.S#2 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.14 2006/04/11 20:53:49 sobomax Exp $ + * $FreeBSD: src/sys/boot/i386/pxeldr/pxeldr.S,v 1.15 2006/09/05 19:28:03 ru Exp $ */ /* @@ -25,6 +25,8 @@ * separate PXE-aware client just to load the loader. */ +#include <sys/reboot.h> + /* * Memory locations. */ @@ -53,10 +55,6 @@ .set KARGS_FLAGS_PXE,0x2 # flag to indicate booting from # PXE loader /* - * Boot howto bits - */ - .set RB_SERIAL,0x1000 # serial console -/* * Segment selectors. */ .set SEL_SDATA,0x8 # Supervisor data @@ -119,11 +117,11 @@ #ifdef PROBE_KEYBOARD /* * Look at the BIOS data area to see if we have an enhanced keyboard. If not, - * set the RBX_SERIAL bit in the howto byte. + * set the RBX_DUAL and RBX_SERIAL bits in the howto byte. */ testb $KEYBOARD_BIT, MEM_BIOS_KEYBOARD # keyboard present? jnz keyb # yes, so skip - orl $RB_SERIAL, (%bx) # enable serial console + orl $(RB_MULTIPLE | RB_SERIAL), (%bx) # enable serial console keyb: #endif /* ==== //depot/projects/newisp/conf/files.amd64#2 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.92 2006/08/15 12:54:28 netchild Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.93 2006/09/05 16:55:12 anholt Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -208,6 +208,7 @@ isa/vga_isa.c optional vga kern/link_elf_obj.c standard pci/agp_amd64.c optional agp +pci/agp_i810.c optional agp pci/agp_intel.c optional agp # # IA32 binary support ==== //depot/projects/newisp/dev/aic7xxx/aic7xxx_osm.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.c,v 1.44 2005/12/04 02:12:40 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.c,v 1.45 2006/09/05 20:28:28 mjacob Exp $"); #include <dev/aic7xxx/aic7xxx_osm.h> #include <dev/aic7xxx/aic7xxx_inline.h> @@ -158,6 +158,8 @@ count = 0; sim = NULL; sim2 = NULL; + path = NULL; + path2 = NULL; /* * Create a thread to perform all recovery. ==== //depot/projects/newisp/dev/atkbdc/atkbdc.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbdc.c,v 1.24 2006/05/12 05:04:41 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbdc.c,v 1.25 2006/09/04 00:19:31 dwhite Exp $"); #include "opt_kbd.h" @@ -857,6 +857,7 @@ { int t; int f; + int waited = 0; #if KBDIO_DEBUG >= 2 int c1 = 0; int c2 = 0; @@ -877,6 +878,16 @@ } else { t -= delta; } + + /* + * Some systems (Intel/IBM blades) do not have keyboard devices and + * will thus hang in this procedure. Time out after delta seconds to + * avoid this hang -- the keyboard attach will fail later on. + */ + waited += (delta * 1000); + if (waited == (delta * 1000000)) + return; + DELAY(delta*1000); } #if KBDIO_DEBUG >= 2 ==== //depot/projects/newisp/dev/mpt/mpt_cam.c#2 (text+ko) ==== @@ -94,7 +94,7 @@ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.31 2006/07/25 00:59:54 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.32 2006/09/05 23:53:07 mjacob Exp $"); #include <dev/mpt/mpt.h> #include <dev/mpt/mpt_cam.h> @@ -104,9 +104,9 @@ #include "dev/mpt/mpilib/mpi_init.h" #include "dev/mpt/mpilib/mpi_targ.h" #include "dev/mpt/mpilib/mpi_fc.h" - +#if __FreeBSD_version >= 500000 #include <sys/sysctl.h> - +#endif #include <sys/callout.h> #include <sys/kthread.h> @@ -248,7 +248,7 @@ * If we support target mode, we register a reply handler for it, * but don't add resources until we actually enable target mode. */ - if ((mpt->role & MPT_ROLE_TARGET) != 0) { + if (mpt->is_fc && (mpt->role & MPT_ROLE_TARGET) != 0) { handler.reply_handler = mpt_scsi_tgt_reply_handler; error = mpt_register_handler(mpt, MPT_HANDLER_REPLY, handler, &mpt->scsi_tgt_handler_id); @@ -816,7 +816,7 @@ * If we're in target mode, hang out resources now * so we don't cause the world to hang talking to us. */ - if (mpt->role & MPT_ROLE_TARGET) { + if (mpt->is_fc && (mpt->role & MPT_ROLE_TARGET)) { /* * Try to add some target command resources */ @@ -3166,7 +3166,7 @@ if ((mpt->role & MPT_ROLE_INITIATOR) == 0) { cpi->hba_misc |= PIM_NOINITIATOR; } - if ((mpt->role & MPT_ROLE_TARGET) != 0) { + if (mpt->is_fc && (mpt->role & MPT_ROLE_TARGET)) { cpi->target_sprt = PIT_PROCESSOR | PIT_DISCONNECT | PIT_TERM_IO; } else { ==== //depot/projects/newisp/dev/puc/pucdata.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.57 2006/06/29 16:27:19 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.58 2006/09/04 18:27:14 marcel Exp $"); /* * PCI "universal" communications card driver configuration data (used to @@ -590,6 +590,12 @@ * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports. */ + { 0x1415, 0x9501, 0x131f, 0x2051, + "SIIG Cyber 4S PCI 16C650 (20x family)", + DEFAULT_RCLK * 10, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x1415, 0x9501, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", DEFAULT_RCLK, ==== //depot/projects/newisp/dev/vge/if_vge.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/vge/if_vge.c,v 1.24 2006/02/14 12:44:56 glebius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/vge/if_vge.c,v 1.25 2006/09/04 13:14:44 mr Exp $"); /* * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver. @@ -2129,8 +2129,10 @@ struct mii_data *mii; sc = ifp->if_softc; + VGE_LOCK(sc); mii = device_get_softc(sc->vge_miibus); mii_mediachg(mii); + VGE_UNLOCK(sc); return (0); } ==== //depot/projects/newisp/geom/gate/g_gate.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/gate/g_gate.c,v 1.23 2006/02/01 12:05:59 pjd Exp $ + * $FreeBSD: src/sys/geom/gate/g_gate.c,v 1.24 2006/09/05 21:56:00 pjd Exp $ */ #include <sys/param.h> @@ -56,12 +56,9 @@ SYSCTL_UINT(_kern_geom_gate, OID_AUTO, debug, CTLFLAG_RW, &g_gate_debug, 0, "Debug level"); -static int g_gate_destroy_geom(struct gctl_req *, struct g_class *, - struct g_geom *); struct g_class g_gate_class = { .name = G_GATE_CLASS_NAME, .version = G_VERSION, - .destroy_geom = g_gate_destroy_geom }; static struct cdev *status_dev; @@ -78,17 +75,11 @@ static struct mtx g_gate_list_mtx; -static void -g_gate_wither(struct g_gate_softc *sc) -{ - - atomic_set_32(&sc->sc_flags, G_GATE_FLAG_DESTROY); -} - static int g_gate_destroy(struct g_gate_softc *sc, boolean_t force) { struct g_provider *pp; + struct g_geom *gp; struct bio *bp; g_topology_assert(); @@ -98,18 +89,15 @@ mtx_unlock(&g_gate_list_mtx); return (EBUSY); } - if ((sc->sc_flags & G_GATE_FLAG_DESTROY) == 0) { - g_gate_wither(sc); - LIST_REMOVE(sc, sc_next); - } mtx_unlock(&g_gate_list_mtx); mtx_lock(&sc->sc_queue_mtx); + if ((sc->sc_flags & G_GATE_FLAG_DESTROY) == 0) + sc->sc_flags |= G_GATE_FLAG_DESTROY; wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); - if (sc->sc_ref > 0) { - G_GATE_DEBUG(1, "Cannot destroy %s yet.", sc->sc_name); - return (0); - } + gp = pp->geom; + pp->flags |= G_PF_WITHER; + g_orphan_provider(pp, ENXIO); callout_drain(&sc->sc_callout); mtx_lock(&sc->sc_queue_mtx); for (;;) { @@ -134,35 +122,26 @@ break; } } + mtx_unlock(&sc->sc_queue_mtx); + g_topology_unlock(); + mtx_lock(&g_gate_list_mtx); + /* One reference is ours. */ + sc->sc_ref--; + while (sc->sc_ref > 0) { + msleep(&sc->sc_ref, &g_gate_list_mtx, 0, "gg:destroy", 0); + } + LIST_REMOVE(sc, sc_next); + mtx_unlock(&g_gate_list_mtx); mtx_destroy(&sc->sc_queue_mtx); - G_GATE_DEBUG(0, "Device %s destroyed.", sc->sc_name); - pp->geom->softc = NULL; - g_wither_geom(pp->geom, ENXIO); + g_topology_lock(); + G_GATE_DEBUG(0, "Device %s destroyed.", gp->name); + gp->softc = NULL; + g_wither_geom(gp, ENXIO); sc->sc_provider = NULL; free(sc, M_GATE); return (0); } -static void -g_gate_destroy_it(void *arg, int flag __unused) -{ - struct g_gate_softc *sc; - - g_topology_assert(); - sc = arg; - mtx_lock(&g_gate_list_mtx); - g_gate_destroy(sc, 1); -} - -static int -g_gate_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) -{ - - g_topology_assert(); - mtx_lock(&g_gate_list_mtx); - return (g_gate_destroy(gp->softc, 0)); -} - static int g_gate_access(struct g_provider *pp, int dr, int dw, int de) { @@ -231,30 +210,17 @@ } static struct g_gate_softc * -g_gate_find(u_int unit) +g_gate_hold(u_int unit) { struct g_gate_softc *sc; + mtx_lock(&g_gate_list_mtx); LIST_FOREACH(sc, &g_gate_list, sc_next) { if (sc->sc_unit == unit) break; } - return (sc); -} - -static struct g_gate_softc * -g_gate_hold(u_int unit) -{ - struct g_gate_softc *sc; - - mtx_lock(&g_gate_list_mtx); - sc = g_gate_find(unit); - if (sc != NULL) { - if ((sc->sc_flags & G_GATE_FLAG_DESTROY) != 0) - sc = NULL; - else - sc->sc_ref++; - } + if (sc != NULL) + sc->sc_ref++; mtx_unlock(&g_gate_list_mtx); return (sc); } @@ -268,8 +234,8 @@ sc->sc_ref--; KASSERT(sc->sc_ref >= 0, ("Negative sc_ref for %s.", sc->sc_name)); if (sc->sc_ref == 0 && (sc->sc_flags & G_GATE_FLAG_DESTROY) != 0) { + wakeup(&sc->sc_ref); mtx_unlock(&g_gate_list_mtx); - g_waitfor_event(g_gate_destroy_it, sc, M_WAITOK, NULL); } else { mtx_unlock(&g_gate_list_mtx); } @@ -485,10 +451,9 @@ g_topology_lock(); mtx_lock(&g_gate_list_mtx); error = g_gate_destroy(sc, ggio->gctl_force); - if (error == 0) - g_gate_wither(sc); g_topology_unlock(); - g_gate_release(sc); + if (error != 0) + g_gate_release(sc); return (error); } case G_GATE_CMD_CANCEL: @@ -534,22 +499,24 @@ struct g_gate_ctl_io *ggio = (void *)addr; G_GATE_CHECK_VERSION(ggio); - sc = g_gate_find(ggio->gctl_unit); + sc = g_gate_hold(ggio->gctl_unit); if (sc == NULL) return (ENXIO); + error = 0; for (;;) { mtx_lock(&sc->sc_queue_mtx); bp = bioq_first(&sc->sc_inqueue); if (bp != NULL) break; + if ((sc->sc_flags & G_GATE_FLAG_DESTROY) != 0) { + ggio->gctl_error = ECANCELED; + mtx_unlock(&sc->sc_queue_mtx); + goto start_end; + } if (msleep(sc, &sc->sc_queue_mtx, PPAUSE | PDROP | PCATCH, "ggwait", 0) != 0) { ggio->gctl_error = ECANCELED; - return (0); - } - if ((sc->sc_flags & G_GATE_FLAG_DESTROY) != 0) { - ggio->gctl_error = ECANCELED; - return (0); + goto start_end; } } ggio->gctl_cmd = bp->bio_cmd; @@ -558,7 +525,7 @@ mtx_unlock(&sc->sc_queue_mtx); ggio->gctl_length = bp->bio_length; ggio->gctl_error = ENOMEM; - return (0); + goto start_end; } bioq_remove(&sc->sc_inqueue, bp); bioq_insert_tail(&sc->sc_outqueue, bp); @@ -580,20 +547,23 @@ bioq_remove(&sc->sc_outqueue, bp); bioq_insert_head(&sc->sc_inqueue, bp); mtx_unlock(&sc->sc_queue_mtx); - return (error); + goto start_end; } break; } - return (0); +start_end: + g_gate_release(sc); + return (error); } case G_GATE_CMD_DONE: { struct g_gate_ctl_io *ggio = (void *)addr; G_GATE_CHECK_VERSION(ggio); - sc = g_gate_find(ggio->gctl_unit); + sc = g_gate_hold(ggio->gctl_unit); if (sc == NULL) return (ENOENT); + error = 0; mtx_lock(&sc->sc_queue_mtx); TAILQ_FOREACH(bp, &sc->sc_outqueue.queue, bio_queue) { if (ggio->gctl_seq == (uintptr_t)bp->bio_driver1) @@ -608,7 +578,7 @@ /* * Request was probably canceled. */ - return (0); + goto done_end; } if (ggio->gctl_error == EAGAIN) { bp->bio_error = 0; @@ -637,6 +607,8 @@ G_GATE_LOGREQ(2, bp, "Request done."); g_io_deliver(bp, bp->bio_error); } +done_end: + g_gate_release(sc); return (error); } } ==== //depot/projects/newisp/geom/gate/g_gate.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/gate/g_gate.h,v 1.8 2006/02/01 12:05:59 pjd Exp $ + * $FreeBSD: src/sys/geom/gate/g_gate.h,v 1.9 2006/09/05 21:56:00 pjd Exp $ */ #ifndef _G_GATE_H_ @@ -68,9 +68,9 @@ */ struct g_gate_softc { int sc_unit; /* P: (read-only) */ - int16_t sc_ref; /* P: g_gate_list_mtx */ + int sc_ref; /* P: g_gate_list_mtx */ struct g_provider *sc_provider; /* P: (read-only) */ - uint32_t sc_flags; /* P: (read-only) */ + uint32_t sc_flags; /* P: sc_queue_mtx */ struct bio_queue_head sc_inqueue; /* P: sc_queue_mtx */ struct bio_queue_head sc_outqueue; /* P: sc_queue_mtx */ ==== //depot/projects/newisp/i386/i386/local_apic.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.28 2006/07/12 21:22:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.29 2006/09/05 17:15:24 sobomax Exp $"); #include "opt_hwpmc_hooks.h" @@ -615,6 +615,16 @@ /* Send EOI first thing. */ lapic_eoi(); + /* + * Don't do any accounting for the disabled HTT cores, since it + * will provide misleading numbers for the userland. + * + * No locking is necessary here, since even if we loose the race + * when hlt_cpus_mask changes it is not a big deal, really. + */ + if ((hlt_cpus_mask & (1 << PCPU_GET(cpuid))) != 0) + return; + /* Look up our local APIC structure for the tick counters. */ la = &lapics[PCPU_GET(apic_id)]; (*la->la_timer_count)++; ==== //depot/projects/newisp/kern/kern_umtx.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.44 2006/09/03 00:07:37 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.45 2006/09/05 12:01:09 davidxu Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -624,6 +624,9 @@ if (timeout == NULL) { error = _do_lock(td, umtx, id, 0); + /* Mutex locking is restarted if it is interrupted. */ + if (error == EINTR) + error = ERESTART; } else { getnanouptime(&ts); timespecadd(&ts, timeout); @@ -641,10 +644,10 @@ timespecsub(&ts3, &ts2); TIMESPEC_TO_TIMEVAL(&tv, &ts3); } + /* Timed-locking is not restarted. */ + if (error == ERESTART) + error = EINTR; } - /* Mutex locking is be restarted if it is interrupted. */ - if (error == EINTR) - error = ERESTART; return (error); } @@ -770,7 +773,6 @@ umtxq_unlock(&uq->uq_key); } umtx_key_release(&uq->uq_key); - /* Mutex locking is be restarted if it is interrupted. */ if (error == ERESTART) error = EINTR; return (error); @@ -903,40 +905,6 @@ /* * Lock PTHREAD_PRIO_NONE protocol POSIX mutex. */ -static int -do_lock_normal(struct thread *td, struct umutex *m, uint32_t flags, - struct timespec *timeout, int try) -{ - struct timespec ts, ts2, ts3; - struct timeval tv; - int error; - - if (timeout == NULL) { - error = _do_lock_normal(td, m, flags, 0, try); - } else { - getnanouptime(&ts); - timespecadd(&ts, timeout); - TIMESPEC_TO_TIMEVAL(&tv, timeout); - for (;;) { - error = _do_lock_normal(td, m, flags, tvtohz(&tv), try); - if (error != ETIMEDOUT) - break; - getnanouptime(&ts2); - if (timespeccmp(&ts2, &ts, >=)) { - error = ETIMEDOUT; - break; - } - ts3 = ts; - timespecsub(&ts3, &ts2); - TIMESPEC_TO_TIMEVAL(&tv, &ts3); - } - } - /* Mutex locking is be restarted if it is interrupted. */ - if (error == EINTR) - error = ERESTART; - return (error); -} - /* * Unlock PTHREAD_PRIO_NONE protocol POSIX mutex. */ @@ -1531,40 +1499,6 @@ return (error); } -static int -do_lock_pi(struct thread *td, struct umutex *m, uint32_t flags, - struct timespec *timeout, int try) -{ - struct timespec ts, ts2, ts3; - struct timeval tv; - int error; - - if (timeout == NULL) { - error = _do_lock_pi(td, m, flags, 0, try); - } else { - getnanouptime(&ts); - timespecadd(&ts, timeout); - TIMESPEC_TO_TIMEVAL(&tv, timeout); - for (;;) { - error = _do_lock_pi(td, m, flags, tvtohz(&tv), try); - if (error != ETIMEDOUT) - break; - getnanouptime(&ts2); - if (timespeccmp(&ts2, &ts, >=)) { - error = ETIMEDOUT; - break; - } - ts3 = ts; - timespecsub(&ts3, &ts2); - TIMESPEC_TO_TIMEVAL(&tv, &ts3); - } - } - /* Mutex locking is be restarted if it is interrupted. */ - if (error == EINTR) - error = ERESTART; - return (error); -} - /* * Unlock a PI mutex. */ @@ -1780,43 +1714,6 @@ } /* - * Lock a PP mutex. - */ -static int -do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, - struct timespec *timeout, int try) -{ - struct timespec ts, ts2, ts3; - struct timeval tv; - int error; - - if (timeout == NULL) { - error = _do_lock_pp(td, m, flags, 0, try); - } else { - getnanouptime(&ts); - timespecadd(&ts, timeout); - TIMESPEC_TO_TIMEVAL(&tv, timeout); - for (;;) { - error = _do_lock_pp(td, m, flags, tvtohz(&tv), try); - if (error != ETIMEDOUT) - break; - getnanouptime(&ts2); - if (timespeccmp(&ts2, &ts, >=)) { - error = ETIMEDOUT; - break; - } - ts3 = ts; - timespecsub(&ts3, &ts2); - TIMESPEC_TO_TIMEVAL(&tv, &ts3); - } - } - /* Mutex locking is be restarted if it is interrupted. */ - if (error == EINTR) - error = ERESTART; - return (error); -} - -/* * Unlock a PP mutex. */ static int @@ -1978,29 +1875,64 @@ return (error); } +static int +_do_lock_umutex(struct thread *td, struct umutex *m, int flags, int timo, + int try) +{ + switch(flags & (UMUTEX_PRIO_INHERIT | UMUTEX_PRIO_PROTECT)) { + case 0: + return (_do_lock_normal(td, m, flags, timo, try)); + case UMUTEX_PRIO_INHERIT: + return (_do_lock_pi(td, m, flags, timo, try)); + case UMUTEX_PRIO_PROTECT: + return (_do_lock_pp(td, m, flags, timo, try)); + } + return (EINVAL); +} + /* * Lock a userland POSIX mutex. */ static int -do_lock_umutex(struct thread *td, struct umutex *m, struct timespec *ts, - int try) +do_lock_umutex(struct thread *td, struct umutex *m, + struct timespec *timeout, int try) { + struct timespec ts, ts2, ts3; + struct timeval tv; uint32_t flags; + int error; flags = fuword32(&m->m_flags); if (flags == -1) return (EFAULT); - switch(flags & (UMUTEX_PRIO_INHERIT | UMUTEX_PRIO_PROTECT)) { - case 0: - return (do_lock_normal(td, m, flags, ts, try)); - case UMUTEX_PRIO_INHERIT: - return (do_lock_pi(td, m, flags, ts, try)); - case UMUTEX_PRIO_PROTECT: - return (do_lock_pp(td, m, flags, ts, try)); + if (timeout == NULL) { + error = _do_lock_umutex(td, m, flags, 0, try); + /* Mutex locking is restarted if it is interrupted. */ + if (error == EINTR) + error = ERESTART; + } else { + getnanouptime(&ts); + timespecadd(&ts, timeout); + TIMESPEC_TO_TIMEVAL(&tv, timeout); + for (;;) { + error = _do_lock_umutex(td, m, flags, tvtohz(&tv), try); + if (error != ETIMEDOUT) + break; + getnanouptime(&ts2); + if (timespeccmp(&ts2, &ts, >=)) { + error = ETIMEDOUT; + break; + } + ts3 = ts; + timespecsub(&ts3, &ts2); + TIMESPEC_TO_TIMEVAL(&tv, &ts3); + } + /* Timed-locking is not restarted. */ + if (error == ERESTART) + error = EINTR; } - - return (EINVAL); + return (error); } /* ==== //depot/projects/newisp/kern/vfs_subr.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.681 2006/08/10 08:56:03 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.682 2006/09/04 22:15:44 pjd Exp $"); #include "opt_ddb.h" #include "opt_mac.h" @@ -81,6 +81,10 @@ #include <vm/vm_kern.h> #include <vm/uma.h> +#ifdef DDB +#include <ddb/ddb.h> +#endif + static MALLOC_DEFINE(M_NETADDR, "subr_export_host", "Export host address structure"); static void delmntque(struct vnode *vp); @@ -2543,7 +2547,6 @@ } #ifdef DDB -#include <ddb/ddb.h> /* * List all of the locked vnodes in the system. * Called when debugging the kernel. @@ -2569,7 +2572,20 @@ nmp = TAILQ_NEXT(mp, mnt_list); } } -#endif + +/* + * Show details about the given vnode. + */ +DB_SHOW_COMMAND(vnode, db_show_vnode) +{ + struct vnode *vp; + + if (!have_addr) + return; + vp = (struct vnode *)addr; + vn_printf(vp, "vnode "); +} +#endif /* DDB */ /* * Fill in a struct xvfsconf based on a struct vfsconf. ==== //depot/projects/newisp/modules/agp/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/agp/Makefile,v 1.17 2006/07/27 19:12:48 marcel Exp $ +# $FreeBSD: src/sys/modules/agp/Makefile,v 1.18 2006/09/05 16:55:13 anholt Exp $ .PATH: ${.CURDIR}/../../pci @@ -12,7 +12,7 @@ SRCS+= agp_amd64.c .endif .if ${MACHINE_ARCH} == "amd64" -SRCS+= agp_amd64.c +SRCS+= agp_amd64.c agp_i810.c .endif SRCS+= device_if.h bus_if.h agp_if.h pci_if.h SRCS+= opt_bus.h ==== //depot/projects/newisp/modules/sound/sound/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/sound/sound/Makefile,v 1.19 2006/08/14 13:28:53 des Exp $ +# $FreeBSD: src/sys/modules/sound/sound/Makefile,v 1.20 2006/09/04 07:40:53 ru Exp $ .PATH: ${.CURDIR}/../../../dev/sound/pcm .PATH: ${.CURDIR}/../../../dev/sound/midi @@ -24,10 +24,17 @@ opt_isa.h: :> ${.TARGET} .else +.if !defined(KERNBUILDDIR) SRCS+= sndbuf_dma.c opt_isa.h: echo "#define DEV_ISA 1" > ${.TARGET} +.else +DEV_ISA!= sed -n '/DEV_ISA/p' ${KERNBUILDDIR}/opt_isa.h +.if !empty(DEV_ISA) +SRCS+= sndbuf_dma.c +.endif +.endif .endif .include <bsd.kmod.mk> ==== //depot/projects/newisp/net/bpf.h#2 (text+ko) ==== @@ -34,7 +34,7 @@ * @(#)bpf.h 8.1 (Berkeley) 6/10/93 * @(#)bpf.h 1.34 (LBL) 6/16/96 * - * $FreeBSD: src/sys/net/bpf.h,v 1.45 2006/06/14 02:23:28 csjp Exp $ + * $FreeBSD: src/sys/net/bpf.h,v 1.46 2006/09/04 19:24:34 sam Exp $ */ #ifndef _NET_BPF_H_ @@ -523,6 +523,18 @@ #define DLT_LINUX_LAPD 177 /* + * Juniper-private data link type, as per request from + * Hannes Gredler <hannes@juniper.net>. + * The DLT_ are used for prepending meta-information + * like interface index, interface name + * before standard Ethernet, PPP, Frelay & C-HDLC Frames + */ +#define DLT_JUNIPER_ETHER 178 +#define DLT_JUNIPER_PPP 179 +#define DLT_JUNIPER_FRELAY 180 +#define DLT_JUNIPER_CHDLC 181 + +/* * The instruction encodings. */ /* instruction classes */ ==== //depot/projects/newisp/netinet/tcp_subr.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 - * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.255 2006/08/26 17:53:19 mohans Exp $ + * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.258 2006/09/05 14:00:59 glebius Exp $ */ #include "opt_compat.h" @@ -177,9 +177,30 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW, &tcp_isn_reseed_interval, 0, "Seconds between reseeding of ISN secret"); +static uma_zone_t tcptw_zone; static int maxtcptw; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, maxtcptw, CTLFLAG_RDTUN, - &maxtcptw, 0, "Maximum number of compressed TCP TIME_WAIT entries"); +static int +sysctl_maxtcptw(SYSCTL_HANDLER_ARGS) +{ + int error, new; + + if (maxtcptw == 0) + new = maxsockets / 5; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609060008.k8608iiu026956>