From owner-p4-projects@FreeBSD.ORG Wed Sep 15 20:25:40 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A87E516A4D8; Wed, 15 Sep 2004 20:25:39 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63DB816A4CF for ; Wed, 15 Sep 2004 20:25:39 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B87943D55 for ; Wed, 15 Sep 2004 20:25:39 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8FKPd2a099734 for ; Wed, 15 Sep 2004 20:25:39 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8FKPcnc099731 for perforce@freebsd.org; Wed, 15 Sep 2004 20:25:38 GMT (envelope-from peter@freebsd.org) Date: Wed, 15 Sep 2004 20:25:38 GMT Message-Id: <200409152025.i8FKPcnc099731@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 61560 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2004 20:25:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=61560 Change 61560 by peter@peter_daintree on 2004/09/15 20:25:15 IFC @61557 Affected files ... .. //depot/projects/hammer/UPDATING#55 integrate .. //depot/projects/hammer/etc/defaults/rc.conf#34 integrate .. //depot/projects/hammer/etc/rc.d/Makefile#26 integrate .. //depot/projects/hammer/etc/rc.d/ntpdate#9 branch .. //depot/projects/hammer/etc/rc.d/rpcbind#6 integrate .. //depot/projects/hammer/release/Makefile#59 integrate .. //depot/projects/hammer/sbin/atacontrol/atacontrol.c#12 integrate .. //depot/projects/hammer/share/man/man5/rc.conf.5#32 integrate .. //depot/projects/hammer/share/man/man9/vm_map.9#4 integrate .. //depot/projects/hammer/sys/alpha/isa/isa_dma.c#6 integrate .. //depot/projects/hammer/sys/amd64/isa/isa_dma.c#14 integrate .. //depot/projects/hammer/sys/amd64/isa/isa_dma.h#7 delete .. //depot/projects/hammer/sys/dev/aha/aha_mca.c#8 integrate .. //depot/projects/hammer/sys/dev/buslogic/bt_mca.c#7 integrate .. //depot/projects/hammer/sys/dev/nge/if_nge.c#22 integrate .. //depot/projects/hammer/sys/dev/nge/if_ngereg.h#5 integrate .. //depot/projects/hammer/sys/dev/pst/pst-iop.h#5 integrate .. //depot/projects/hammer/sys/dev/pst/pst-pci.c#6 integrate .. //depot/projects/hammer/sys/dev/pst/pst-raid.c#10 integrate .. //depot/projects/hammer/sys/i386/isa/isa_dma.c#6 integrate .. //depot/projects/hammer/sys/i386/isa/isa_dma.h#3 delete .. //depot/projects/hammer/sys/ia64/isa/isa_dma.c#4 integrate .. //depot/projects/hammer/sys/isa/isavar.h#4 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#28 integrate .. //depot/projects/hammer/sys/kern/kern_thread.c#64 integrate .. //depot/projects/hammer/sys/net/if_clone.c#3 integrate .. //depot/projects/hammer/sys/netinet/ip_icmp.c#20 integrate .. //depot/projects/hammer/sys/netinet/ip_input.c#39 integrate .. //depot/projects/hammer/sys/netinet/ip_var.h#21 integrate .. //depot/projects/hammer/sys/netinet/tcp_syncache.c#22 integrate .. //depot/projects/hammer/sys/pc98/pc98/isa_dma.c#4 integrate .. //depot/projects/hammer/sys/sys/mbuf.h#30 integrate .. //depot/projects/hammer/sys/vm/vm_page.c#34 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.freebsd#25 integrate .. //depot/projects/hammer/usr.sbin/burncd/burncd.8#9 integrate .. //depot/projects/hammer/usr.sbin/burncd/burncd.c#8 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/disks.c#15 integrate Differences ... ==== //depot/projects/hammer/UPDATING#55 (text+ko) ==== @@ -24,16 +24,6 @@ to maximize performance. 20040914: - /etc/rc.d/ntpdate has been removed in favor of using the -g - flag to ntpd(1). By default, if ntpd is enabled, it will sync - with the time servers listed in /etc/ntp.conf regardless of the - time difference (slew). To prevent this, add - ntpd_sync_on_start="NO" to /etc/rc.conf. - - NOTE: Doing a sync (ntpd -g) is noticably slower than ntpdate(1), - but is also more accurate (hence ntpdate(1) being depreciated). - -20040914: The format of the pflogd(8) logfile "/var/log/pflog" has changed for architectures that have a 64 bit long type to make it compatible to the standard pcap format. In order to prevent corruption move away @@ -1869,4 +1859,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.358 2004/09/14 03:01:38 seanc Exp $ +$FreeBSD: src/UPDATING,v 1.359 2004/09/15 01:08:32 seanc Exp $ ==== //depot/projects/hammer/etc/defaults/rc.conf#34 (text+ko) ==== @@ -13,7 +13,7 @@ # # All arguments must be in double or single quotes. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.213 2004/09/14 03:01:38 seanc Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.214 2004/09/15 01:08:32 seanc Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -219,9 +219,12 @@ ### Network Time Services options: ### timed_enable="NO" # Run the time daemon (or NO). timed_flags="" # Flags to timed (if enabled). +ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). +ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different one. +ntpdate_flags="-b" # Flags to ntpdate (if enabled). ntpd_enable="NO" # Run ntpd Network Time Protocol (or NO). ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. -ntpd_sync_on_start="YES" # Sync time on ntpd startup, even if offset is high +ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift" # Flags to ntpd (if enabled). ==== //depot/projects/hammer/etc/rc.d/Makefile#26 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.42 2004/09/14 03:01:38 seanc Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.43 2004/09/15 01:08:33 seanc Exp $ FILES= DAEMON LOGIN NETWORKING SERVERS \ abi accounting addswap adjkerntz amd \ @@ -23,7 +23,7 @@ mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ network_ipv6 nfsclient nfsd \ - nfslocking nfsserver nisdomain nsswitch ntpd \ + nfslocking nfsserver nisdomain nsswitch ntpd ntpdate \ othermta \ pccard pcvt pf pflog preseedrandom \ power_profile ppp-user pppoed pwcheck \ ==== //depot/projects/hammer/etc/rc.d/rpcbind#6 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: rpcbind,v 1.6 2002/01/31 01:26:06 lukem Exp $ -# $FreeBSD: src/etc/rc.d/rpcbind,v 1.10 2004/09/14 03:01:38 seanc Exp $ +# $FreeBSD: src/etc/rc.d/rpcbind,v 1.11 2004/09/15 01:08:33 seanc Exp $ # # PROVIDE: rpcbind -# REQUIRE: NETWORKING ntpd syslogd named +# REQUIRE: NETWORKING ntpdate syslogd named # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/hammer/release/Makefile#59 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile,v 1.860 2004/09/14 04:01:57 brooks Exp $ +# $FreeBSD: src/release/Makefile,v 1.861 2004/09/15 05:14:21 brooks Exp $ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] @@ -919,8 +919,7 @@ @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/boot/loader.conf .if exists(${HINTSFILE}) # Break the link to device.hints so we can modify it - @rm ${CD_DISC2}/boot/device.hints - @cp ${HINTSFILE} ${CD_DISC2}/boot/device.hints + @cp -f ${HINTSFILE} ${CD_DISC2}/boot/device.hints .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64" @echo 'hint.atkbd.0.flags="0x1"' >> ${CD_DISC2}/boot/device.hints .endif ==== //depot/projects/hammer/sbin/atacontrol/atacontrol.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.31 2004/05/20 15:01:26 des Exp $ + * $FreeBSD: src/sbin/atacontrol/atacontrol.c,v 1.32 2004/09/15 11:22:05 sos Exp $ */ #include @@ -187,16 +187,18 @@ parm->enabled.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no"); if (parm->satacapabilities && parm->satacapabilities != 0xffff) { - printf("SATA NCQ %s %s %d/0x%02X\n", - parm->satacapabilities & ATA_SUPPORT_NCQ ? "yes" : "no", - " -", ATA_QUEUE_LEN(parm->queue), - ATA_QUEUE_LEN(parm->queue)); + printf("Native Command Queuing (NCQ) %s %s %d/0x%02X\n", + parm->satacapabilities & ATA_SUPPORT_NCQ ? + "yes" : "no", " -", + (parm->satacapabilities & ATA_SUPPORT_NCQ) ? + ATA_QUEUE_LEN(parm->queue) : 0, + (parm->satacapabilities & ATA_SUPPORT_NCQ) ? + ATA_QUEUE_LEN(parm->queue) : 0); } - else - printf("dma queued %s %s %d/0x%02X\n", - parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue)); + printf("Tagged Command Queuing (TCQ) %s %s %d/0x%02X\n", + parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", + parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", + ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue)); printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", ==== //depot/projects/hammer/share/man/man5/rc.conf.5#32 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.221 2004/07/18 18:01:48 simon Exp $ +.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.222 2004/09/15 01:39:25 seanc Exp $ .\" .Dd April 25, 2004 .Dt RC.CONF 5 @@ -1604,6 +1604,25 @@ these are the flags to pass to the .Xr ntpd 8 daemon. +.It Va ntpd_sync_on_start +.Pq Vt bool +If set to +.Dq Li YES , +.Xr ntpd 8 +is run with the +.Op Fl g +flag, which syncs the system's clock on startup. +See +.Xr ntpd 8 +for more information regarding the +.Op Fl g +option. +This is a preferred alternative to using +.Xr ntpdate 1 +or specifying the +.Pa /etc/rc.conf +tunable +.Op Ar ntpdate_enable . .It Va nis_client_enable .Pq Vt bool If set to ==== //depot/projects/hammer/share/man/man9/vm_map.9#4 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/vm_map.9,v 1.4 2004/07/06 07:02:31 ru Exp $ +.\" $FreeBSD: src/share/man/man9/vm_map.9,v 1.5 2004/09/15 18:41:10 alc Exp $ .\" .Dd July 19, 2003 .Dt VM_MAP 9 @@ -52,17 +52,18 @@ .Bd -literal -offset indent struct vm_map { struct vm_map_entry header; - struct lock lock; + struct sx lock; struct mtx system_mtx; int nentries; vm_size_t size; + u_int timestamp; u_char needs_wakeup; u_char system_map; - u_char infork; + vm_flags_t flags; vm_map_entry_t root; - unsigned int timestamp; - vm_map_entry_t first_free; pmap_t pmap; +#define min_offset header.start +#define max_offset header.end }; .Ed .Pp @@ -83,23 +84,38 @@ A count of the members in use within the circular map entry list. .It Va size Specifies the size of the virtual address space. -.It Va infork -Indicates if the map structure is currently undergoing fork processing. +.It Va timestamp +Used to determine if the map has changed since its last access. .It Va needs_wakeup Indicates if a thread is waiting for an allocation within the map. Used only by system maps. .It Va system_map Set to TRUE to indicate that map is a system map; otherwise, it belongs to a user process. +.It Va flags +Map flags. .It Va root Root node of a binary search tree used for fast lookup of map entries. -.It Va timestamp -Used to determine if the map has changed since its last access. -.It Va first_free -Provides a hint to the first free space within the map. .It Va pmap Pointer to the underlying physical map with which this virtual map is associated. +.It Va min_offset +The minimum +.Va vm_offset_t +in this map. +Programs should never use +.Va header.start +or +.Va header.end +directly, use +.Va min_offset +and +.Va max_offset +instead. +.It Va max_offset +The maximum +.Va vm_offset_t +in this map. .El .Pp The following flags can be passed to @@ -141,6 +157,8 @@ vm_offset_t start; vm_offset_t end; vm_offset_t avail_ssize; + vm_size_t adj_free; + vm_size_t max_free; union vm_map_object object; vm_ooffset_t offset; vm_eflags_t eflags; @@ -171,6 +189,11 @@ Upper address bound of this entry's region. .It Va avail_ssize If the entry is for a process stack, specifies how much the entry can grow. +.It Va adj_free +The amount of free, unmapped address space adjacent to and immediately +following this map entry. +.It Va max_free +The maximum amount of contiguous free space in this map entry's subtree. .It Va object Pointer to the .Vt struct vm_map_object ==== //depot/projects/hammer/sys/alpha/isa/isa_dma.c#6 (text+ko) ==== @@ -44,7 +44,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/isa/isa_dma.c,v 1.11 2004/04/05 21:00:51 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/isa/isa_dma.c,v 1.12 2004/09/15 12:09:49 phk Exp $"); #include #include @@ -93,10 +93,8 @@ /* * Setup a DMA channel's bounce buffer. */ -void -isa_dmainit(chan, bouncebufsize) - int chan; - u_int bouncebufsize; +int +isa_dma_init(int chan, u_int bouncebufsize, int flag __unused) { static int initted = 0; bus_addr_t boundary = chan >= 4 ? 0x20000 : 0x10000; @@ -114,10 +112,10 @@ #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) - panic("isa_dmainit: channel out of range"); + panic("isa_dma_init: channel out of range"); if (dma_tag[chan] || dma_map[chan]) - panic("isa_dmainit: impossible request"); + panic("isa_dma_init: impossible request"); #endif if (bus_dma_tag_create(/*parent*/NULL, @@ -132,13 +130,13 @@ /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, &dma_tag[chan]) != 0) { - panic("isa_dmainit: unable to create dma tag\n"); + panic("isa_dma_init: unable to create dma tag\n"); } if (bus_dmamap_create(dma_tag[chan], 0, &dma_map[chan])) { - panic("isa_dmainit: unable to create dma map\n"); + panic("isa_dma_init: unable to create dma map\n"); } - + return (0); } /* @@ -349,7 +347,7 @@ #endif if (!dma_tag || !dma_map[chan]) - panic("isa_dmastart: called without isa_dmainit"); + panic("isa_dmastart: called without isa_dma_init"); dma_busy |= (1 << chan); ==== //depot/projects/hammer/sys/amd64/isa/isa_dma.c#14 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.19 2004/08/16 22:51:13 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.20 2004/09/15 12:09:49 phk Exp $"); /* * code to manage AT bus @@ -96,15 +96,13 @@ /* * Setup a DMA channel's bounce buffer. */ -void -isa_dmainit(chan, bouncebufsize) - int chan; - u_int bouncebufsize; +int +isa_dma_init(int chan, u_int bouncebufsize, int flag) { void *buf; /* - * If a DMA channel is shared, both drivers have to call isa_dmainit + * If a DMA channel is shared, both drivers have to call isa_dma_init * since they don't know that the other driver will do it. * Just return if we're already set up good. * XXX: this only works if they agree on the bouncebuf size. This @@ -112,30 +110,30 @@ * XXX: the same driver. */ if (dma_bouncebuf[chan] != NULL) - return; + return (0); #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) - panic("isa_dmainit: channel out of range"); + panic("isa_dma_init: channel out of range"); #endif dma_bouncebufsize[chan] = bouncebufsize; /* Try malloc() first. It works better if it works. */ - buf = malloc(bouncebufsize, M_DEVBUF, M_NOWAIT); + buf = malloc(bouncebufsize, M_DEVBUF, flag); if (buf != NULL) { if (isa_dmarangecheck(buf, bouncebufsize, chan) == 0) { dma_bouncebuf[chan] = buf; - return; + return (0); } free(buf, M_DEVBUF); } - buf = contigmalloc(bouncebufsize, M_DEVBUF, M_NOWAIT, 0ul, 0xfffffful, + buf = contigmalloc(bouncebufsize, M_DEVBUF, flag, 0ul, 0xfffffful, 1ul, chan & 4 ? 0x20000ul : 0x10000ul); if (buf == NULL) - printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize); - else - dma_bouncebuf[chan] = buf; + return (ENOMEM); + dma_bouncebuf[chan] = buf; + return (0); } /* ==== //depot/projects/hammer/sys/dev/aha/aha_mca.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aha/aha_mca.c,v 1.11 2004/03/17 17:50:24 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aha/aha_mca.c,v 1.12 2004/09/15 11:58:34 phk Exp $"); #include #include @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include ==== //depot/projects/hammer/sys/dev/buslogic/bt_mca.c#7 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/buslogic/bt_mca.c,v 1.9 2004/03/17 17:50:29 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/buslogic/bt_mca.c,v 1.10 2004/09/15 11:58:34 phk Exp $"); /* * Written using the bt_isa/bt_pci code as a reference. @@ -55,7 +55,7 @@ #include #include -#include +#include #include ==== //depot/projects/hammer/sys/dev/nge/if_nge.c#22 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.67 2004/09/14 22:32:58 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.68 2004/09/15 03:39:17 alc Exp $"); /* * National Semiconductor DP83820/DP83821 gigabit ethernet driver @@ -151,7 +151,7 @@ static int nge_newbuf(struct nge_softc *, struct nge_desc *, struct mbuf *); static int nge_encap(struct nge_softc *, struct mbuf *, u_int32_t *); -#ifdef VGE_FIXUP_RX +#ifdef NGE_FIXUP_RX static __inline void nge_fixup_rx (struct mbuf *); #endif static void nge_rxeof(struct nge_softc *); ==== //depot/projects/hammer/sys/dev/nge/if_ngereg.h#5 (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/dev/nge/if_ngereg.h,v 1.10 2004/09/14 22:06:25 wpaul Exp $ + * $FreeBSD: src/sys/dev/nge/if_ngereg.h,v 1.11 2004/09/15 03:39:18 alc Exp $ */ #define NGE_CSR 0x00 @@ -637,7 +637,7 @@ #define NGE_JUMBO_MTU (NGE_JUMBO_FRAMELEN-ETHER_HDR_LEN-ETHER_CRC_LEN) #if !defined(__i386__) -#define VGE_FIXUP_RX +#define NGE_FIXUP_RX #endif struct nge_ring_data { ==== //depot/projects/hammer/sys/dev/pst/pst-iop.h#5 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pst/pst-iop.h,v 1.4 2003/04/28 08:10:27 sos Exp $ + * $FreeBSD: src/sys/dev/pst/pst-iop.h,v 1.5 2004/09/15 15:39:28 sos Exp $ */ /* misc defines */ @@ -42,7 +42,6 @@ struct resource *r_mem; struct resource *r_irq; caddr_t ibase; - u_int32_t phys_ibase; caddr_t obase; u_int32_t phys_obase; struct i2o_registers *reg; ==== //depot/projects/hammer/sys/dev/pst/pst-pci.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pst/pst-pci.c,v 1.6 2004/03/17 17:50:39 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pst/pst-pci.c,v 1.7 2004/09/15 15:39:28 sos Exp $"); #include #include @@ -93,7 +93,6 @@ PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, 1); sc->ibase = rman_get_virtual(sc->r_mem); - sc->phys_ibase = vtophys(sc->ibase); sc->reg = (struct i2o_registers *)sc->ibase; sc->dev = dev; mtx_init(&sc->mtx, "pst lock", MTX_DEF, 0); ==== //depot/projects/hammer/sys/dev/pst/pst-raid.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pst/pst-raid.c,v 1.13 2004/02/18 21:36:52 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pst/pst-raid.c,v 1.14 2004/09/15 15:39:28 sos Exp $"); #include #include @@ -123,11 +123,11 @@ if (!(psc->info = (struct i2o_bsa_device *) malloc(sizeof(struct i2o_bsa_device), M_PSTRAID, M_NOWAIT))) { - contigfree(reply, PAGE_SIZE, M_PSTRAID); + contigfree(reply, PAGE_SIZE, M_PSTIOP); return ENOMEM; } bcopy(reply->result, psc->info, sizeof(struct i2o_bsa_device)); - contigfree(reply, PAGE_SIZE, M_PSTRAID); + contigfree(reply, PAGE_SIZE, M_PSTIOP); if (!(reply = iop_get_util_params(psc->iop, psc->lct->local_tid, I2O_PARAMS_OPERATION_FIELD_GET, @@ -145,7 +145,7 @@ bpack(ident->vendor, ident->vendor, 16); bpack(ident->product, ident->product, 16); sprintf(name, "%s %s", ident->vendor, ident->product); - contigfree(reply, PAGE_SIZE, M_PSTRAID); + contigfree(reply, PAGE_SIZE, M_PSTIOP); bioq_init(&psc->queue); ==== //depot/projects/hammer/sys/i386/isa/isa_dma.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/isa/isa_dma.c,v 1.16 2004/07/05 20:37:42 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/isa/isa_dma.c,v 1.17 2004/09/15 12:09:50 phk Exp $"); /* * code to manage AT bus @@ -94,15 +94,13 @@ /* * Setup a DMA channel's bounce buffer. */ -void -isa_dmainit(chan, bouncebufsize) - int chan; - u_int bouncebufsize; +int +isa_dma_init(int chan, u_int bouncebufsize, int flag) { void *buf; /* - * If a DMA channel is shared, both drivers have to call isa_dmainit + * If a DMA channel is shared, both drivers have to call isa_dma_init * since they don't know that the other driver will do it. * Just return if we're already set up good. * XXX: this only works if they agree on the bouncebuf size. This @@ -110,30 +108,30 @@ * XXX: the same driver. */ if (dma_bouncebuf[chan] != NULL) - return; + return (0); #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) - panic("isa_dmainit: channel out of range"); + panic("isa_dma_init: channel out of range"); #endif dma_bouncebufsize[chan] = bouncebufsize; /* Try malloc() first. It works better if it works. */ - buf = malloc(bouncebufsize, M_DEVBUF, M_NOWAIT); + buf = malloc(bouncebufsize, M_DEVBUF, flag); if (buf != NULL) { if (isa_dmarangecheck(buf, bouncebufsize, chan) == 0) { dma_bouncebuf[chan] = buf; - return; + return (0); } free(buf, M_DEVBUF); } - buf = contigmalloc(bouncebufsize, M_DEVBUF, M_NOWAIT, 0ul, 0xfffffful, + buf = contigmalloc(bouncebufsize, M_DEVBUF, flag, 0ul, 0xfffffful, 1ul, chan & 4 ? 0x20000ul : 0x10000ul); if (buf == NULL) - printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize); - else - dma_bouncebuf[chan] = buf; + return (ENOMEM); + dma_bouncebuf[chan] = buf; + return (0); } /* ==== //depot/projects/hammer/sys/ia64/isa/isa_dma.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 * from: isa_dma.c,v 1.3 1999/05/09 23:56:00 peter Exp $ - * $FreeBSD: src/sys/ia64/isa/isa_dma.c,v 1.6 2004/04/07 20:46:08 imp Exp $ + * $FreeBSD: src/sys/ia64/isa/isa_dma.c,v 1.7 2004/09/15 12:09:50 phk Exp $ */ /* @@ -91,10 +91,8 @@ /* * Setup a DMA channel's bounce buffer. */ -void -isa_dmainit(chan, bouncebufsize) - int chan; - u_int bouncebufsize; +int +isa_dma_init(int chan, u_int bouncebufsize, int flag __unused) { static int initted = 0; bus_addr_t boundary = chan >= 4 ? 0x20000 : 0x10000; @@ -112,10 +110,10 @@ #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) - panic("isa_dmainit: channel out of range"); + panic("isa_dma_init: channel out of range"); if (dma_tag[chan] || dma_map[chan]) - panic("isa_dmainit: impossible request"); + panic("isa_dma_init: impossible request"); #endif if (bus_dma_tag_create(/*parent*/NULL, @@ -130,13 +128,14 @@ /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, &dma_tag[chan]) != 0) { - panic("isa_dmainit: unable to create dma tag\n"); + panic("isa_dma_init: unable to create dma tag\n"); } if (bus_dmamap_create(dma_tag[chan], 0, &dma_map[chan])) { - panic("isa_dmainit: unable to create dma map\n"); + panic("isa_dma_init: unable to create dma map\n"); } + return (0); } /* @@ -351,7 +350,7 @@ #endif if (!dma_tag || !dma_map[chan]) - panic("isa_dmastart: called without isa_dmainit"); + panic("isa_dmastart: called without isa_dma_init"); dma_busy |= (1 << chan); ==== //depot/projects/hammer/sys/isa/isavar.h#4 (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/isa/isavar.h,v 1.25 2003/07/08 18:56:58 jhb Exp $ + * $FreeBSD: src/sys/isa/isavar.h,v 1.26 2004/09/15 12:09:50 phk Exp $ */ #ifndef _ISA_ISAVAR_H_ @@ -160,13 +160,19 @@ extern void isa_dmacascade(int chan); extern void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan); -extern void isa_dmainit(int chan, u_int bouncebufsize); +extern int isa_dma_init(int chan, u_int bouncebufsize, int flag); extern void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan); extern int isa_dma_acquire(int chan); extern void isa_dma_release(int chan); extern int isa_dmastatus(int chan); extern int isa_dmastop(int chan); +#define isa_dmainit(chan, size) do { \ + if (isa_dma_init(chan, size, M_NOWAIT)) \ + printf("WARNING: isa_dma_init(%d, %ju) failed\n", \ + (int)(chan), (uintmax_t)(size)); \ + } while (0) + int isab_attach(device_t dev); #ifdef PC98 ==== //depot/projects/hammer/sys/kern/kern_switch.c#28 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.91 2004/09/13 23:06:39 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.92 2004/09/15 03:51:51 julian Exp $"); #include "opt_sched.h" @@ -224,6 +224,7 @@ } } +#ifdef SCHED_4BSD /* * Remove a thread from its KSEGRP's run queue. * This in turn may remove it from a KSE if it was already assigned @@ -273,6 +274,7 @@ /* slot_fill(kg); */ /* will replace it with another */ } } +#endif /* * Change the priority of a thread that is on the run queue. ==== //depot/projects/hammer/sys/kern/kern_thread.c#64 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.196 2004/09/05 02:09:53 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.197 2004/09/15 18:39:09 julian Exp $"); #include #include @@ -829,12 +829,22 @@ remaining = p->p_numthreads - p->p_suspcount; } if (force_exit == SINGLE_EXIT) { + /* + * We have gotten rid of all the other threads and we + * are about to either exit or exec. In either case, + * we try our utmost to revert to being a non-threaded + * process. + */ upcall_remove(td); p->p_flag &= ~(P_SA|P_HADTHREADS); td->td_mailbox = NULL; - td->td_pflags &= ~TDP_SA; + td->td_pflags &= ~(TDP_SA | TDP_CAN_UNBIND); p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); p->p_singlethread = NULL; + if (td->td_standin != NULL) { + thread_stash(td->td_standin); + td->td_standin = NULL; + } sched_set_concurrency(td->td_ksegrp, 1); mtx_unlock_spin(&sched_lock); } else { ==== //depot/projects/hammer/sys/net/if_clone.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.5 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/net/if_clone.c,v 1.2 2004/07/20 21:44:28 mlaier Exp $ + * $FreeBSD: src/sys/net/if_clone.c,v 1.3 2004/09/15 04:41:56 brooks Exp $ */ #include @@ -235,9 +235,24 @@ int if_clone_list(struct if_clonereq *ifcr) { - char outbuf[IFNAMSIZ], *dst; + char *buf, *dst, *outbuf = NULL; struct if_clone *ifc; - int count, err = 0; + int buf_count, count, err = 0; + + IF_CLONERS_LOCK(); + /* + * Set our internal output buffer size. We could end up not + * reporting a cloner that is added between the unlock and lock + * below, but that's not a major problem. Not caping our + * allocation to the number of cloners actually in the system + * could be because that would let arbitrary users cause us to + * allocate abritrary amounts of kernel memory. + */ + buf_count = (if_cloners_count < ifcr->ifcr_count) ? + if_cloners_count : ifcr->ifcr_count; + IF_CLONERS_UNLOCK(); + + outbuf = malloc(IFNAMSIZ*buf_count, M_CLONE, M_WAITOK | M_ZERO); IF_CLONERS_LOCK(); @@ -252,19 +267,21 @@ goto done; } - count = (if_cloners_count < ifcr->ifcr_count) ? - if_cloners_count : ifcr->ifcr_count; + count = (if_cloners_count < buf_count) ? + if_cloners_count : buf_count; - for (ifc = LIST_FIRST(&if_cloners); ifc != NULL && count != 0; - ifc = LIST_NEXT(ifc, ifc_list), count--, dst += IFNAMSIZ) { - strlcpy(outbuf, ifc->ifc_name, IFNAMSIZ); - err = copyout(outbuf, dst, IFNAMSIZ); - if (err) - break; + for (ifc = LIST_FIRST(&if_cloners), buf = outbuf; + ifc != NULL && count != 0; + ifc = LIST_NEXT(ifc, ifc_list), count--, buf += IFNAMSIZ) { + strlcpy(buf, ifc->ifc_name, IFNAMSIZ); } done: IF_CLONERS_UNLOCK(); + if (err == 0) + err = copyout(outbuf, dst, buf_count*IFNAMSIZ); + if (outbuf != NULL) + free(outbuf, M_CLONE); return (err); } ==== //depot/projects/hammer/sys/netinet/ip_icmp.c#20 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/netinet/ip_icmp.c,v 1.96 2004/08/16 18:32:07 rwatson Exp $ + * $FreeBSD: src/sys/netinet/ip_icmp.c,v 1.97 2004/09/15 20:13:26 andre Exp $ */ #include "opt_ipsec.h" @@ -711,7 +711,7 @@ * add on any record-route or timestamp options. */ cp = (u_char *) (ip + 1); - if ((opts = ip_srcroute()) == 0 && + if ((opts = ip_srcroute(m)) == 0 && (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) { opts->m_len = sizeof(struct in_addr); mtod(opts, struct in_addr *)->s_addr = 0; ==== //depot/projects/hammer/sys/netinet/ip_input.c#39 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/netinet/ip_input.c,v 1.286 2004/08/27 15:16:22 andre Exp $ + * $FreeBSD: src/sys/netinet/ip_input.c,v 1.287 2004/09/15 20:13:26 andre Exp $ */ #include "opt_bootp.h" @@ -213,28 +213,22 @@ int fw_one_pass = 1; /* - * XXX this is ugly -- the following two global variables are - * used to store packet state while it travels through the stack. - * Note that the code even makes assumptions on the size and - * alignment of fields inside struct ip_srcrt so e.g. adding some - * fields will break the code. This needs to be fixed. - * - * We need to save the IP options in case a protocol wants to respond - * to an incoming packet over the same route if the packet got here - * using IP source routing. This allows connection establishment and - * maintenance when the remote end is on a network that is not known - * to us. - * XXX: Broken on SMP and possibly preemption! + * XXX this is ugly. IP options source routing magic. */ -static int ip_nhops = 0; -static struct ip_srcrt { +struct ipoptrt { struct in_addr dst; /* final destination */ char nop; /* one NOP to align */ char srcopt[IPOPT_OFFSET + 1]; /* OPTVAL, OLEN and OFFSET */ struct in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)]; -} ip_srcrt; +}; + +struct ipopt_tag { + struct m_tag tag; + int ip_nhops; + struct ipoptrt ip_srcrt; +}; -static void save_rte(u_char *, struct in_addr); +static void save_rte(struct mbuf *, u_char *, struct in_addr); static int ip_dooptions(struct mbuf *m, int); static void ip_forward(struct mbuf *m, int srcrt); static void ip_freef(struct ipqhead *, struct ipq *); @@ -1244,7 +1238,7 @@ */ if (!ip_acceptsourceroute) goto nosourcerouting; >>> TRUNCATED FOR MAIL (1000 lines) <<<