Date: Fri, 24 Oct 2003 10:59:36 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 40410 for review Message-ID: <200310241759.h9OHxacX006581@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=40410 Change 40410 by sam@sam_ebb on 2003/10/24 10:58:46 IFC @ 40409 Affected files ... .. //depot/projects/netperf/sys/conf/NOTES#14 integrate .. //depot/projects/netperf/sys/conf/files#18 integrate .. //depot/projects/netperf/sys/conf/files.ia64#8 integrate .. //depot/projects/netperf/sys/conf/options#13 integrate .. //depot/projects/netperf/sys/dev/dcons/dcons.c#1 branch .. //depot/projects/netperf/sys/dev/dcons/dcons.h#1 branch .. //depot/projects/netperf/sys/dev/dcons/dcons_crom.c#1 branch .. //depot/projects/netperf/sys/dev/firewire/firewire.c#6 integrate .. //depot/projects/netperf/sys/dev/firewire/fwdev.c#4 integrate .. //depot/projects/netperf/sys/dev/hatm/if_hatm.c#6 integrate .. //depot/projects/netperf/sys/dev/pccbb/pccbb.c#6 integrate .. //depot/projects/netperf/sys/ia64/ia64/db_disasm.c#2 delete .. //depot/projects/netperf/sys/ia64/ia64/db_interface.c#2 integrate .. //depot/projects/netperf/sys/ia64/ia64/machdep.c#14 integrate .. //depot/projects/netperf/sys/ia64/include/inst.h#2 delete .. //depot/projects/netperf/sys/modules/Makefile#7 integrate .. //depot/projects/netperf/sys/modules/dcons/Makefile#1 branch .. //depot/projects/netperf/sys/modules/dcons_crom/Makefile#1 branch .. //depot/projects/netperf/sys/modules/netgraph/atm/Makefile#3 integrate .. //depot/projects/netperf/sys/modules/netgraph/atm/atmbase/Makefile#1 branch .. //depot/projects/netperf/sys/modules/netgraph/atm/sscfu/Makefile#1 branch .. //depot/projects/netperf/sys/modules/netgraph/atm/sscop/Makefile#1 branch .. //depot/projects/netperf/sys/net/if.c#10 integrate .. //depot/projects/netperf/sys/net/if_var.h#3 integrate .. //depot/projects/netperf/sys/netgraph/atm/ng_sscfu.h#1 branch .. //depot/projects/netperf/sys/netgraph/atm/ng_sscop.h#1 branch .. //depot/projects/netperf/sys/netgraph/atm/ngatmbase.c#1 branch .. //depot/projects/netperf/sys/netgraph/atm/ngatmbase.h#1 branch .. //depot/projects/netperf/sys/netgraph/atm/sscfu/ng_sscfu.c#1 branch .. //depot/projects/netperf/sys/netgraph/atm/sscfu/ng_sscfu_cust.h#1 branch .. //depot/projects/netperf/sys/netgraph/atm/sscop/ng_sscop.c#1 branch .. //depot/projects/netperf/sys/netgraph/atm/sscop/ng_sscop_cust.h#1 branch .. //depot/projects/netperf/sys/netinet/tcp_subr.c#7 integrate .. //depot/projects/netperf/sys/vm/swap_pager.c#7 integrate .. //depot/projects/netperf/sys/vm/vm_pageout.c#11 integrate .. //depot/projects/netperf/sys/vm/vm_pager.h#3 integrate .. //depot/projects/netperf/sys/vm/vnode_pager.c#9 integrate Differences ... ==== //depot/projects/netperf/sys/conf/NOTES#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1179 2003/10/22 22:27:49 njl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1180 2003/10/24 15:44:08 simokawa Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2241,11 +2241,21 @@ options UVSCOM_DEFAULT_OPKTSIZE=8 # default output packet size ##################################################################### -# Firewire support +# FireWire support -device firewire # Firewire bus code +device firewire # FireWire bus code device sbp # SCSI over Firewire (Requires scbus and da) -device fwe # Ethernet over Firewire (non-standard!) +device fwe # Ethernet over FireWire (non-standard!) + +##################################################################### +# dcons support (Dumb Console Device) + +device dcons # dumb console driver +device dcons_crom # FireWire attachment +options DCONS_BUF_SIZE=16384 # buffer size +options DCONS_POLL_HZ=100 # polling rate +options DCONS_FORCE_CONSOLE=0 # force to be the primary console +options DCONS_FORCE_GDB=1 # force to be the gdb device ##################################################################### # crypto subsystem ==== //depot/projects/netperf/sys/conf/files#18 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.837 2003/10/22 20:39:33 rwatson Exp $ +# $FreeBSD: src/sys/conf/files,v 1.838 2003/10/24 15:44:08 simokawa Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -351,6 +351,8 @@ dev/cs/if_cs_isa.c optional cs isa dev/cs/if_cs_pccard.c optional cs card dev/cs/if_cs_pccard.c optional cs pccard +dev/dcons/dcons.c optional dcons +dev/dcons/dcons_crom.c optional dcons_crom dev/digi/digi.c optional digi dev/digi/digi_isa.c optional digi isa dev/digi/digi_pci.c optional digi pci ==== //depot/projects/netperf/sys/conf/files.ia64#8 (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.ia64,v 1.60 2003/10/23 06:11:37 marcel Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.61 2003/10/24 06:48:41 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -92,7 +92,6 @@ ia64/ia64/clock_if.m standard ia64/ia64/context.S standard ia64/ia64/critical.c standard -ia64/ia64/db_disasm.c optional ddb ia64/ia64/db_interface.c optional ddb ia64/ia64/db_trace.c optional ddb ia64/ia64/dump_machdep.c standard ==== //depot/projects/netperf/sys/conf/options#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.416 2003/10/22 22:27:49 njl Exp $ +# $FreeBSD: src/sys/conf/options,v 1.417 2003/10/24 15:44:08 simokawa Exp $ # # On the handling of kernel options # @@ -675,3 +675,9 @@ AH_DEBUG opt_ah.h AH_DEBUG_ALQ opt_ah.h AH_ASSERT opt_ah.h + +# dcons options +DCONS_BUF_SIZE opt_dcons.h +DCONS_POLL_HZ opt_dcons.h +DCONS_FORCE_CONSOLE opt_dcons.h +DCONS_FORCE_GDB opt_dcons.h ==== //depot/projects/netperf/sys/dev/firewire/firewire.c#6 (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/firewire.c,v 1.62 2003/10/06 07:17:43 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.63 2003/10/24 07:42:21 simokawa Exp $ * */ @@ -338,15 +338,27 @@ splx(s); } +#define WATCHDOC_HZ 10 static void firewire_watchdog(void *arg) { struct firewire_comm *fc; + static int watchdoc_clock = 0; fc = (struct firewire_comm *)arg; - firewire_xfer_timeout(fc); - fc->timeout(fc); - callout_reset(&fc->timeout_callout, hz / 10, + + /* + * At boot stage, the device interrupt is disabled and + * We encounter a timeout easily. To avoid this, + * ignore clock interrupt for a while. + */ + if (watchdoc_clock > WATCHDOC_HZ * 15) { + firewire_xfer_timeout(fc); + fc->timeout(fc); + } else + watchdoc_clock ++; + + callout_reset(&fc->timeout_callout, hz / WATCHDOC_HZ, (void *)firewire_watchdog, (void *)fc); } ==== //depot/projects/netperf/sys/dev/firewire/fwdev.c#4 (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/fwdev.c,v 1.33 2003/10/02 04:06:55 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.34 2003/10/24 13:55:51 simokawa Exp $ * */ @@ -471,13 +471,11 @@ it->flag |= (0x3f & ichreq->ch); it->flag |= ((0x3 & ichreq->tag) << 6); d->it = it; - err = 0; break; case FW_GTSTREAM: if (it != NULL) { ichreq->ch = it->flag & 0x3f; ichreq->tag = it->flag >> 2 & 0x3; - err = 0; } else err = EINVAL; break; @@ -507,13 +505,11 @@ if (d->ir != NULL) { ichreq->ch = ir->flag & 0x3f; ichreq->tag = ir->flag >> 2 & 0x3; - err = 0; } else err = EINVAL; break; case FW_SSTBUF: bcopy(ibufreq, &d->bufreq, sizeof(d->bufreq)); - err = 0; break; case FW_GSTBUF: bzero(&ibufreq->rx, sizeof(ibufreq->rx)); @@ -532,14 +528,18 @@ case FW_ASYREQ: { struct tcode_info *tinfo; + int pay_len = 0; - xfer = fw_xfer_alloc_buf(M_FWXFER, asyreq->req.len, - PAGE_SIZE/*XXX*/); - if(xfer == NULL){ - err = ENOMEM; - return err; - } fp = &asyreq->pkt; + tinfo = &sc->fc->tcode[fp->mode.hdr.tcode]; + + if ((tinfo->flag & FWTI_BLOCK_ASY) != 0) + pay_len = MAX(0, asyreq->req.len - tinfo->hdr_len); + + xfer = fw_xfer_alloc_buf(M_FWXFER, pay_len, PAGE_SIZE/*XXX*/); + if (xfer == NULL) + return (ENOMEM); + switch (asyreq->req.type) { case FWASREQNODE: break; @@ -550,7 +550,7 @@ device_printf(sc->fc->bdev, "cannot find node\n"); err = EINVAL; - goto error; + goto out; } fp->mode.hdr.dst = FWLOCALBUS | fwdev->dst; break; @@ -561,38 +561,35 @@ /* nothing to do */ break; } - xfer->send.spd = asyreq->req.sped; - tinfo = &sc->fc->tcode[fp->mode.hdr.tcode]; + bcopy(fp, (void *)&xfer->send.hdr, tinfo->hdr_len); - if ((tinfo->flag & FWTI_BLOCK_ASY) != 0) + if (pay_len > 0) bcopy((char *)fp + tinfo->hdr_len, - (void *)&xfer->send.payload, - asyreq->req.len - tinfo->hdr_len); + (void *)&xfer->send.payload, pay_len); + xfer->send.spd = asyreq->req.sped; xfer->act.hand = fw_asy_callback; - err = fw_asyreq(sc->fc, -1, xfer); - if(err){ - fw_xfer_free_buf(xfer); - return err; + + if ((err = fw_asyreq(sc->fc, -1, xfer)) != 0) + goto out; + if ((err = tsleep(xfer, FWPRI, "asyreq", hz)) != 0) + goto out; + if (xfer->resp != 0) { + err = EIO; + goto out; } - err = tsleep(xfer, FWPRI, "asyreq", hz); - if (err == 0) { - if (xfer->resp != 0) { - err = EIO; - goto error; - } - tinfo = &sc->fc->tcode[xfer->recv.hdr.mode.hdr.tcode]; - if (asyreq->req.len >= xfer->recv.pay_len + - tinfo->hdr_len) { - asyreq->req.len = xfer->recv.pay_len; - }else{ - err = EINVAL; - } - bcopy(&xfer->recv.hdr, fp, tinfo->hdr_len); - bcopy(xfer->recv.payload, - (char *)fp + tinfo->hdr_len, - asyreq->req.len - tinfo->hdr_len); - } -error: + if ((tinfo->flag & FWTI_TLABEL) == 0) + goto out; + + /* copy response */ + tinfo = &sc->fc->tcode[xfer->recv.hdr.mode.hdr.tcode]; + if (asyreq->req.len >= xfer->recv.pay_len + tinfo->hdr_len) + asyreq->req.len = xfer->recv.pay_len; + else + err = EINVAL; + bcopy(&xfer->recv.hdr, fp, tinfo->hdr_len); + bcopy(xfer->recv.payload, (char *)fp + tinfo->hdr_len, + MAX(0, asyreq->req.len - tinfo->hdr_len)); +out: fw_xfer_free_buf(xfer); break; } ==== //depot/projects/netperf/sys/dev/hatm/if_hatm.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/hatm/if_hatm.c,v 1.10 2003/09/02 17:30:35 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hatm/if_hatm.c,v 1.11 2003/10/24 16:44:26 harti Exp $"); #include "opt_inet.h" #include "opt_natm.h" @@ -1334,61 +1334,61 @@ hatm_configure(struct hatm_softc *sc) { /* Receive buffer pool 0 small */ - kenv_getuint(sc, "rbps0.size", &sc->rbp_s0.size, + kenv_getuint(sc, "rbps0_size", &sc->rbp_s0.size, HE_CONFIG_RBPS0_SIZE, 0); - kenv_getuint(sc, "rbps0.thresh", &sc->rbp_s0.thresh, + kenv_getuint(sc, "rbps0_thresh", &sc->rbp_s0.thresh, HE_CONFIG_RBPS0_THRESH, 0); sc->rbp_s0.bsize = MBUF0_SIZE; /* Receive buffer pool 0 large */ - kenv_getuint(sc, "rbpl0.size", &sc->rbp_l0.size, + kenv_getuint(sc, "rbpl0_size", &sc->rbp_l0.size, HE_CONFIG_RBPL0_SIZE, 0); - kenv_getuint(sc, "rbpl0.thresh", &sc->rbp_l0.thresh, + kenv_getuint(sc, "rbpl0_thresh", &sc->rbp_l0.thresh, HE_CONFIG_RBPL0_THRESH, 0); sc->rbp_l0.bsize = MCLBYTES - MBUFL_OFFSET; /* Receive buffer return queue 0 */ - kenv_getuint(sc, "rbrq0.size", &sc->rbrq_0.size, + kenv_getuint(sc, "rbrq0_size", &sc->rbrq_0.size, HE_CONFIG_RBRQ0_SIZE, 0); - kenv_getuint(sc, "rbrq0.thresh", &sc->rbrq_0.thresh, + kenv_getuint(sc, "rbrq0_thresh", &sc->rbrq_0.thresh, HE_CONFIG_RBRQ0_THRESH, 0); - kenv_getuint(sc, "rbrq0.tout", &sc->rbrq_0.tout, + kenv_getuint(sc, "rbrq0_tout", &sc->rbrq_0.tout, HE_CONFIG_RBRQ0_TOUT, 0); - kenv_getuint(sc, "rbrq0.pcnt", &sc->rbrq_0.pcnt, + kenv_getuint(sc, "rbrq0_pcnt", &sc->rbrq_0.pcnt, HE_CONFIG_RBRQ0_PCNT, 0); /* Receive buffer pool 1 small */ - kenv_getuint(sc, "rbps1.size", &sc->rbp_s1.size, + kenv_getuint(sc, "rbps1_size", &sc->rbp_s1.size, HE_CONFIG_RBPS1_SIZE, 0); - kenv_getuint(sc, "rbps1.thresh", &sc->rbp_s1.thresh, + kenv_getuint(sc, "rbps1_thresh", &sc->rbp_s1.thresh, HE_CONFIG_RBPS1_THRESH, 0); sc->rbp_s1.bsize = MBUF1_SIZE; /* Receive buffer return queue 1 */ - kenv_getuint(sc, "rbrq1.size", &sc->rbrq_1.size, + kenv_getuint(sc, "rbrq1_size", &sc->rbrq_1.size, HE_CONFIG_RBRQ1_SIZE, 0); - kenv_getuint(sc, "rbrq1.thresh", &sc->rbrq_1.thresh, + kenv_getuint(sc, "rbrq1_thresh", &sc->rbrq_1.thresh, HE_CONFIG_RBRQ1_THRESH, 0); - kenv_getuint(sc, "rbrq1.tout", &sc->rbrq_1.tout, + kenv_getuint(sc, "rbrq1_tout", &sc->rbrq_1.tout, HE_CONFIG_RBRQ1_TOUT, 0); - kenv_getuint(sc, "rbrq1.pcnt", &sc->rbrq_1.pcnt, + kenv_getuint(sc, "rbrq1_pcnt", &sc->rbrq_1.pcnt, HE_CONFIG_RBRQ1_PCNT, 0); /* Interrupt queue 0 */ - kenv_getuint(sc, "irq0.size", &sc->irq_0.size, + kenv_getuint(sc, "irq0_size", &sc->irq_0.size, HE_CONFIG_IRQ0_SIZE, 0); - kenv_getuint(sc, "irq0.thresh", &sc->irq_0.thresh, + kenv_getuint(sc, "irq0_thresh", &sc->irq_0.thresh, HE_CONFIG_IRQ0_THRESH, 0); sc->irq_0.line = HE_CONFIG_IRQ0_LINE; /* Transmit buffer return queue 0 */ - kenv_getuint(sc, "tbrq0.size", &sc->tbrq.size, + kenv_getuint(sc, "tbrq0_size", &sc->tbrq.size, HE_CONFIG_TBRQ_SIZE, 0); - kenv_getuint(sc, "tbrq0.thresh", &sc->tbrq.thresh, + kenv_getuint(sc, "tbrq0_thresh", &sc->tbrq.thresh, HE_CONFIG_TBRQ_THRESH, 0); /* Transmit buffer ready queue */ - kenv_getuint(sc, "tpdrq.size", &sc->tpdrq.size, + kenv_getuint(sc, "tpdrq_size", &sc->tpdrq.size, HE_CONFIG_TPDRQ_SIZE, 0); /* Max TPDs per VCC */ kenv_getuint(sc, "tpdmax", &sc->max_tpd, ==== //depot/projects/netperf/sys/dev/pccbb/pccbb.c#6 (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/dev/pccbb/pccbb.c,v 1.95 2003/08/22 08:49:56 imp Exp $ + * $FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.96 2003/10/24 07:20:13 imp Exp $ */ /* @@ -1162,10 +1162,10 @@ */ if (sc->flags & CBB_CARD_OK) { STAILQ_FOREACH(ih, &sc->intr_handlers, entries) { - if ((ih->flags & INTR_MPSAFE) != 0) + if ((ih->flags & INTR_MPSAFE) == 0) mtx_lock(&Giant); (*ih->intr)(ih->arg); - if ((ih->flags & INTR_MPSAFE) != 0) + if ((ih->flags & INTR_MPSAFE) == 0) mtx_unlock(&Giant); } } ==== //depot/projects/netperf/sys/ia64/ia64/db_interface.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/ia64/ia64/db_interface.c,v 1.23 2003/05/16 21:26:40 marcel Exp $ */ +/* $FreeBSD: src/sys/ia64/ia64/db_interface.c,v 1.24 2003/10/24 06:42:03 marcel Exp $ */ /* * Mach Operating System @@ -50,16 +50,16 @@ #include <vm/vm.h> -#include <machine/inst.h> #include <machine/db_machdep.h> #include <machine/mutex.h> +#include <machine/setjmp.h> #include <ddb/ddb.h> - #include <ddb/db_access.h> #include <ddb/db_sym.h> #include <ddb/db_variables.h> -#include <machine/setjmp.h> + +#include <ia64/disasm/disasm.h> static jmp_buf *db_nofault = 0; extern jmp_buf db_jmpbuf; @@ -398,10 +398,7 @@ * Read bytes from kernel address space for debugger. */ void -db_read_bytes(addr, size, data) - vm_offset_t addr; - register size_t size; - register char *data; +db_read_bytes(vm_offset_t addr, size_t size, char *data) { db_nofault = &db_jmpbuf; @@ -418,10 +415,7 @@ * Write bytes to kernel address space for debugger. */ void -db_write_bytes(addr, size, data) - vm_offset_t addr; - register size_t size; - register char *data; +db_write_bytes(vm_offset_t addr, size_t size, char *data) { db_nofault = &db_jmpbuf; @@ -442,9 +436,7 @@ } u_long -db_register_value(regs, regno) - db_regs_t *regs; - int regno; +db_register_value(db_regs_t *regs, int regno) { uint64_t *rsp; uint64_t bsp; @@ -479,68 +471,95 @@ } void -db_read_bundle(db_addr_t addr, struct ia64_bundle *bp) +db_write_breakpoint(vm_offset_t addr, u_int64_t *storage) { - u_int64_t low, high; - - db_read_bytes(addr, 8, (caddr_t) &low); - db_read_bytes(addr+8, 8, (caddr_t) &high); - - ia64_unpack_bundle(low, high, bp); } void -db_write_bundle(db_addr_t addr, struct ia64_bundle *bp) +db_clear_breakpoint(vm_offset_t addr, u_int64_t *storage) { - u_int64_t low, high; - - ia64_pack_bundle(&low, &high, bp); - - db_write_bytes(addr, 8, (caddr_t) &low); - db_write_bytes(addr+8, 8, (caddr_t) &high); - - ia64_fc(addr); - ia64_sync_i(); } void -db_write_breakpoint(vm_offset_t addr, u_int64_t *storage) +db_skip_breakpoint() { - struct ia64_bundle b; - int slot; - slot = addr & 15; - addr &= ~15; - db_read_bundle(addr, &b); - *storage = b.slot[slot]; - b.slot[slot] = 0x80100 << 6; /* break.* 0x80100 */ - db_write_bundle(addr, &b); + ddb_regs.tf_special.psr += IA64_PSR_RI_1; + if ((ddb_regs.tf_special.psr & IA64_PSR_RI) > IA64_PSR_RI_2) { + ddb_regs.tf_special.psr &= ~IA64_PSR_RI; + ddb_regs.tf_special.iip += 16; + } } -void -db_clear_breakpoint(vm_offset_t addr, u_int64_t *storage) +db_addr_t +db_disasm(db_addr_t loc, boolean_t altfmt) { - struct ia64_bundle b; - int slot; + char buf[32]; + struct asm_bundle bundle; + const struct asm_inst *i; + const char *tmpl; + int n, slot; + + slot = loc & 0xf; + loc &= ~0xful; + db_read_bytes(loc, 16, buf); + if (asm_decode((uintptr_t)buf, &bundle)) { + i = bundle.b_inst + slot; + tmpl = bundle.b_templ + slot; + if (*tmpl == ';' || (slot == 2 && bundle.b_templ[1] == ';')) + tmpl++; + if (*tmpl == 'L' || i->i_op == ASM_OP_NONE) { + db_printf("\n"); + goto out; + } + + /* Unit + slot. */ + db_printf("[%c%d] ", *tmpl, slot); + + /* Predicate. */ + if (i->i_oper[0].o_value != 0) { + asm_operand(i->i_oper+0, buf, loc); + db_printf("(%s) ", buf); + } else + db_printf(" "); - slot = addr & 15; - addr &= ~15; - db_read_bundle(addr, &b); - b.slot[slot] = *storage; - db_write_bundle(addr, &b); -} + /* Mnemonic & completers. */ + asm_mnemonic(i->i_op, buf); + db_printf(buf); + n = 0; + while (n < i->i_ncmpltrs) { + asm_completer(i->i_cmpltr + n, buf); + db_printf(buf); + n++; + } + db_printf(" "); -void -db_skip_breakpoint(void) -{ - /* - * Skip past the break instruction. - */ - ddb_regs.tf_special.psr += IA64_PSR_RI_1; - if ((ddb_regs.tf_special.psr & IA64_PSR_RI) > IA64_PSR_RI_2) { - ddb_regs.tf_special.psr &= ~IA64_PSR_RI; - ddb_regs.tf_special.iip += 16; + /* Operands. */ + n = 1; + while (n < 7 && i->i_oper[n].o_type != ASM_OPER_NONE) { + if (n > 1) { + if (n == i->i_srcidx) + db_printf("="); + else + db_printf(","); + } + asm_operand(i->i_oper + n, buf, loc); + db_printf(buf); + n++; + } + } else { + tmpl = NULL; + slot = 2; } + db_printf("\n"); + +out: + slot++; + if (slot == 1 && tmpl[1] == 'L') + slot++; + if (slot > 2) + slot = 16; + return (loc + slot); } void ==== //depot/projects/netperf/sys/ia64/ia64/machdep.c#14 (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/ia64/ia64/machdep.c,v 1.160 2003/10/21 01:13:49 marcel Exp $ + * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.162 2003/10/24 06:52:21 marcel Exp $ */ #include "opt_compat.h" @@ -85,7 +85,6 @@ #include <sys/ucontext.h> #include <machine/sigframe.h> #include <machine/efi.h> -#include <machine/inst.h> #include <machine/unwind.h> #include <i386/include/specialreg.h> @@ -418,8 +417,7 @@ __asm __volatile("rsm psr.ic|psr.i"); __asm __volatile("srlz.d"); __asm __volatile("mov cr.ifa=%0" :: "r"(ia64_port_base)); - /* XXX We should use the size from the memory descriptor. */ - __asm __volatile("mov cr.itir=%0" :: "r"(24 << 2)); + __asm __volatile("mov cr.itir=%0" :: "r"(IA64_ID_PAGE_SHIFT << 2)); __asm __volatile("itr.d dtr[%0]=%1" :: "r"(2), "r"(*(u_int64_t*)&pte)); __asm __volatile("mov psr.l=%0" :: "r" (psr)); __asm __volatile("srlz.d"); @@ -1439,30 +1437,6 @@ } #endif /* no DDB */ -/* - * Utility functions for manipulating instruction bundles. - */ -void -ia64_unpack_bundle(u_int64_t low, u_int64_t high, struct ia64_bundle *bp) -{ - bp->template = low & 0x1f; - bp->slot[0] = (low >> 5) & ((1L<<41) - 1); - bp->slot[1] = (low >> 46) | ((high & ((1L<<23) - 1)) << 18); - bp->slot[2] = (high >> 23); -} - -void -ia64_pack_bundle(u_int64_t *lowp, u_int64_t *highp, - const struct ia64_bundle *bp) -{ - u_int64_t low, high; - - low = bp->template | (bp->slot[0] << 5) | (bp->slot[1] << 46); - high = (bp->slot[1] >> 18) | (bp->slot[2] << 23); - *lowp = low; - *highp = high; -} - int sysbeep(int pitch, int period) { ==== //depot/projects/netperf/sys/modules/Makefile#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.351 2003/09/26 20:26:24 fjoe Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.352 2003/10/24 15:44:09 simokawa Exp $ .if !defined(NOCRYPT) || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) @@ -32,6 +32,8 @@ ${_cryptodev} \ cue \ dc \ + dcons \ + dcons_crom \ de \ digi \ dummynet \ ==== //depot/projects/netperf/sys/modules/netgraph/atm/Makefile#3 (text+ko) ==== @@ -1,8 +1,11 @@ -# $FreeBSD: src/sys/modules/netgraph/atm/Makefile,v 1.2 2003/08/11 08:40:01 harti Exp $ +# $FreeBSD: src/sys/modules/netgraph/atm/Makefile,v 1.3 2003/10/24 07:42:08 harti Exp $ SUBDIR= \ atm \ - atmpif + atmbase \ + atmpif \ + sscfu \ + sscop .include <bsd.subdir.mk> ==== //depot/projects/netperf/sys/net/if.c#10 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.5 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/net/if.c,v 1.170 2003/10/23 13:49:10 des Exp $ + * $FreeBSD: src/sys/net/if.c,v 1.171 2003/10/24 16:57:59 ume Exp $ */ #include "opt_compat.h" @@ -369,6 +369,8 @@ struct sockaddr_dl *sdl; struct ifaddr *ifa; + IF_AFDATA_LOCK_INIT(ifp); + ifp->if_afdata_initialized = 0; IFNET_WLOCK(); TAILQ_INSERT_TAIL(&ifnet, ifp, if_link); IFNET_WUNLOCK(); @@ -456,10 +458,8 @@ int s; s = splnet(); - IFNET_RLOCK(); for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) if_attachdomain1(ifp); - IFNET_RUNLOCK(); splx(s); } SYSINIT(domainifattach, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST, @@ -473,6 +473,22 @@ s = splnet(); + /* + * Since dp->dom_ifattach calls malloc() with M_WAITOK, we + * cannot lock ifp->if_afdata initialization, entirely. + */ + if (IF_AFDATA_TRYLOCK(ifp) == 0) { + splx(s); + return; + } + if (ifp->if_afdata_initialized) { + IF_AFDATA_UNLOCK(ifp); + splx(s); + return; + } + ifp->if_afdata_initialized = 1; + IF_AFDATA_UNLOCK(ifp); + /* address family dependent data region */ bzero(ifp->if_afdata, sizeof(ifp->if_afdata)); for (dp = domains; dp; dp = dp->dom_next) { @@ -576,11 +592,13 @@ /* Announce that the interface is gone. */ rt_ifannouncemsg(ifp, IFAN_DEPARTURE); + IF_AFDATA_LOCK(ifp); for (dp = domains; dp; dp = dp->dom_next) { if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family]) (*dp->dom_ifdetach)(ifp, ifp->if_afdata[dp->dom_family]); } + IF_AFDATA_UNLOCK(ifp); #ifdef MAC mac_destroy_ifnet(ifp); @@ -590,6 +608,7 @@ TAILQ_REMOVE(&ifnet, ifp, if_link); IFNET_WUNLOCK(); mtx_destroy(&ifp->if_snd.ifq_mtx); + IF_AFDATA_DESTROY(ifp); splx(s); } ==== //depot/projects/netperf/sys/net/if_var.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)if.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/net/if_var.h,v 1.59 2003/10/17 15:46:30 ume Exp $ + * $FreeBSD: src/sys/net/if_var.h,v 1.60 2003/10/24 16:57:59 ume Exp $ */ #ifndef _NET_IF_VAR_H_ @@ -180,6 +180,8 @@ struct label if_label; /* interface MAC label */ void *if_afdata[AF_MAX]; + int if_afdata_initialized; + struct mtx if_afdata_mtx; }; typedef void if_init_f_t(void *); @@ -289,6 +291,13 @@ } while (0) #ifdef _KERNEL +#define IF_AFDATA_LOCK_INIT(ifp) \ + mtx_init(&(ifp)->if_afdata_mtx, "if_afdata", NULL, MTX_DEF) +#define IF_AFDATA_LOCK(ifp) mtx_lock(&(ifp)->if_afdata_mtx) +#define IF_AFDATA_TRYLOCK(ifp) mtx_trylock(&(ifp)->if_afdata_mtx) +#define IF_AFDATA_UNLOCK(ifp) mtx_unlock(&(ifp)->if_afdata_mtx) +#define IF_AFDATA_DESTROY(ifp) mtx_destroy(&(ifp)->if_afdata_mtx) + #define IF_HANDOFF(ifq, m, ifp) if_handoff(ifq, m, ifp, 0) #define IF_HANDOFF_ADJ(ifq, m, ifp, adj) if_handoff(ifq, m, ifp, adj) ==== //depot/projects/netperf/sys/netinet/tcp_subr.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 - * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.163 2003/10/21 18:28:35 silby Exp $ + * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.164 2003/10/24 05:44:14 silby Exp $ */ #include "opt_compat.h" @@ -259,7 +259,7 @@ uma_zone_set_max(tcpcb_zone, maxsockets); tcptw_zone = uma_zcreate("tcptw", sizeof(struct tcptw), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(tcptw_zone, maxsockets); + uma_zone_set_max(tcptw_zone, maxsockets / 5); tcp_timer_init(); syncache_init(); } ==== //depot/projects/netperf/sys/vm/swap_pager.c#7 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/vm/swap_pager.c,v 1.231 2003/10/18 14:10:27 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/swap_pager.c,v 1.232 2003/10/24 06:43:04 alc Exp $"); #include "opt_mac.h" #include "opt_swap.h" @@ -1187,6 +1187,7 @@ m[0]->object ); } + VM_OBJECT_UNLOCK(object); /* * Step 1 * @@ -1368,6 +1369,7 @@ swp_pager_async_iodone(bp); splx(s); } + VM_OBJECT_LOCK(object); } /* @@ -1652,13 +1654,13 @@ m = vm_page_grab(object, pindex + idx, VM_ALLOC_NORMAL|VM_ALLOC_RETRY); if (m->valid == VM_PAGE_BITS_ALL) { vm_object_pip_subtract(object, 1); - VM_OBJECT_UNLOCK(object); vm_page_lock_queues(); vm_page_activate(m); vm_page_dirty(m); vm_page_wakeup(m); vm_page_unlock_queues(); vm_pager_page_unswapped(m); + VM_OBJECT_UNLOCK(object); return; } @@ -1666,14 +1668,13 @@ VM_PAGER_OK) panic("swap_pager_force_pagein: read from swap failed");/*XXX*/ vm_object_pip_subtract(object, 1); - VM_OBJECT_UNLOCK(object); - vm_page_lock_queues(); vm_page_dirty(m); vm_page_dontneed(m); vm_page_wakeup(m); vm_page_unlock_queues(); vm_pager_page_unswapped(m); + VM_OBJECT_UNLOCK(object); } ==== //depot/projects/netperf/sys/vm/vm_pageout.c#11 (text+ko) ==== @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/vm/vm_pageout.c,v 1.248 2003/10/22 18:41:32 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_pageout.c,v 1.249 2003/10/24 06:43:04 alc Exp $"); #include "opt_vm.h" #include <sys/param.h> @@ -362,12 +362,13 @@ int vm_pageout_flush(vm_page_t *mc, int count, int flags) { - vm_object_t object; + vm_object_t object = mc[0]->object; int pageout_status[count]; int numpagedout = 0; int i; mtx_assert(&vm_page_queue_mtx, MA_OWNED); + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); /* * Initiate I/O. Bump the vm_page_t->busy counter and * mark the pages read-only. @@ -385,16 +386,13 @@ vm_page_io_start(mc[i]); pmap_page_protect(mc[i], VM_PROT_READ); } - object = mc[0]->object; vm_page_unlock_queues(); vm_object_pip_add(object, count); - VM_OBJECT_UNLOCK(object); vm_pager_put_pages(object, mc, count, (flags | ((object == kernel_object) ? VM_PAGER_PUT_SYNC : 0)), pageout_status); - VM_OBJECT_LOCK(object); vm_page_lock_queues(); for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; @@ -669,7 +667,7 @@ int s; struct thread *td; - GIANT_REQUIRED; + mtx_lock(&Giant); /* * Decrease registered cache sizes. */ @@ -1224,6 +1222,7 @@ wakeup(&cnt.v_free_count); } } + mtx_unlock(&Giant); } /* @@ -1324,8 +1323,6 @@ { int error, pass, s; - mtx_lock(&Giant); - /* * Initialize some paging parameters. */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310241759.h9OHxacX006581>