Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2011 18:49:20 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 192541 for review
Message-ID:  <201105031849.p43InKiH092328@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@192541?ac=10

Change 192541 by jhb@jhb_jhbbsd on 2011/05/03 18:49:19

	IFC @192540

Affected files ...

.. //depot/projects/pci/sys/amd64/conf/DEFAULTS#2 integrate
.. //depot/projects/pci/sys/amd64/pci/pci_bus.c#5 integrate
.. //depot/projects/pci/sys/boot/i386/boot2/Makefile#4 integrate
.. //depot/projects/pci/sys/boot/ia64/common/exec.c#3 integrate
.. //depot/projects/pci/sys/cam/cam_xpt.c#3 integrate
.. //depot/projects/pci/sys/conf/makeLINT.mk#2 integrate
.. //depot/projects/pci/sys/conf/options#5 integrate
.. //depot/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c#11 integrate
.. //depot/projects/pci/sys/dev/acpica/acpi_pcib_pci.c#3 integrate
.. //depot/projects/pci/sys/dev/bge/if_bge.c#4 integrate
.. //depot/projects/pci/sys/dev/bxe/bxe_debug.h#3 integrate
.. //depot/projects/pci/sys/dev/bxe/if_bxe.c#3 integrate
.. //depot/projects/pci/sys/dev/bxe/if_bxe.h#3 integrate
.. //depot/projects/pci/sys/dev/cardbus/cardbus.c#3 integrate
.. //depot/projects/pci/sys/dev/coretemp/coretemp.c#2 integrate
.. //depot/projects/pci/sys/dev/mii/brgphy.c#2 integrate
.. //depot/projects/pci/sys/dev/mii/miidevs#2 integrate
.. //depot/projects/pci/sys/dev/pci/pci.c#18 integrate
.. //depot/projects/pci/sys/dev/pci/pci_pci.c#20 integrate
.. //depot/projects/pci/sys/dev/pci/pcib_private.h#12 integrate
.. //depot/projects/pci/sys/dev/sound/pcm/dsp.c#2 integrate
.. //depot/projects/pci/sys/dev/vxge/include/build-version.h#2 integrate
.. //depot/projects/pci/sys/dev/vxge/vxge.c#2 integrate
.. //depot/projects/pci/sys/dev/vxge/vxge.h#2 integrate
.. //depot/projects/pci/sys/i386/conf/DEFAULTS#2 integrate
.. //depot/projects/pci/sys/i386/conf/PAE#3 integrate
.. //depot/projects/pci/sys/i386/pci/pci_bus.c#5 integrate
.. //depot/projects/pci/sys/ia64/include/vmparam.h#4 integrate
.. //depot/projects/pci/sys/kern/kern_jail.c#3 integrate
.. //depot/projects/pci/sys/kern/kern_racct.c#3 integrate
.. //depot/projects/pci/sys/kern/kern_rctl.c#3 integrate
.. //depot/projects/pci/sys/netinet/sctputil.c#4 integrate
.. //depot/projects/pci/sys/netinet/sctputil.h#2 integrate
.. //depot/projects/pci/sys/netinet/tcp_input.c#4 integrate
.. //depot/projects/pci/sys/netinet/tcp_output.c#3 integrate
.. //depot/projects/pci/sys/netinet/tcp_timewait.c#3 integrate
.. //depot/projects/pci/sys/sparc64/pci/apb.c#3 integrate
.. //depot/projects/pci/sys/sparc64/pci/ofw_pcib.c#3 integrate
.. //depot/projects/pci/sys/sys/jail.h#3 integrate
.. //depot/projects/pci/sys/sys/rctl.h#3 integrate
.. //depot/projects/pci/sys/x86/pci/qpi.c#3 integrate
.. //depot/projects/pci/sys/x86/x86/mptable_pci.c#5 integrate
.. //depot/projects/pci/sys/x86/x86/tsc.c#4 integrate

Differences ...

==== //depot/projects/pci/sys/amd64/conf/DEFAULTS#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # DEFAULTS -- Default kernel configuration file for FreeBSD/amd64
 #
-# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.21 2010/01/04 21:30:04 imp Exp $
+# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.22 2011/05/03 18:23:11 jhb Exp $
 
 machine		amd64
 
@@ -20,3 +20,5 @@
 options 	GEOM_PART_EBR
 options 	GEOM_PART_EBR_COMPAT
 options 	GEOM_PART_MBR
+
+options 	NEW_PCIB

==== //depot/projects/pci/sys/amd64/pci/pci_bus.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.125 2011/05/02 14:13:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.126 2011/05/03 17:37:24 jhb Exp $");
 
 #include "opt_cpu.h"
 

==== //depot/projects/pci/sys/boot/i386/boot2/Makefile#4 (text+ko) ====

@@ -1,10 +1,7 @@
-# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.68 2011/04/28 17:44:24 jhb Exp $
+# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.69 2011/05/02 21:13:08 dim Exp $
 
 .include <bsd.own.mk>
 
-# XXX: clang can compile the boot code just fine, but boot2 gets too big
-CC:=${CC:C/^(.*\/)?clang$/gcc/1}
-
 FILES=		boot boot1 boot2
 
 NM?=		nm
@@ -45,6 +42,12 @@
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
 	-Winline --param max-inline-insns-single=100
 
+.if ${CC:T:Mclang} == "clang"
+CFLAGS+=	-mllvm -stack-alignment=8 -mllvm -inline-threshold=3
+# XXX: clang integrated-as doesn't grok .codeNN directives yet
+CFLAGS+=	${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/}
+.endif
+
 LDFLAGS=-static -N --gc-sections
 
 # Pick up ../Makefile.inc early.

==== //depot/projects/pci/sys/boot/ia64/common/exec.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ia64/common/exec.c,v 1.20 2011/04/03 23:49:20 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ia64/common/exec.c,v 1.21 2011/05/03 01:43:04 marcel Exp $");
 
 #include <stand.h>
 #include <string.h>
@@ -76,7 +76,7 @@
 
 	shft = 12;	/* Start with 4K */
 	s = 1 << shft;
-	while (s < sz) {
+	while (s <= sz) {
 		shft++;
 		s <<= 1;
 	}

==== //depot/projects/pci/sys/cam/cam_xpt.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.260 2011/04/29 07:14:37 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.261 2011/05/03 13:16:02 mav Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -3600,9 +3600,12 @@
 		}
 		xpt_unlock_buses();
 	}
-	if (path->target != NULL)
-		return (bus_id * 2 + path->target->target_id);
-	else
+	if (path->target != NULL) {
+		if (path->target->target_id < 2)
+			return (bus_id * 2 + path->target->target_id);
+		else
+			return (-1);
+	} else
 		return (bus_id * 2);
 }
 

==== //depot/projects/pci/sys/conf/makeLINT.mk#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/makeLINT.mk,v 1.4 2010/12/28 22:49:28 imp Exp $
+# $FreeBSD: src/sys/conf/makeLINT.mk,v 1.5 2011/05/02 22:54:24 bz Exp $
 
 all:
 	@echo "make LINT only"
@@ -16,6 +16,34 @@
 	echo "include ${.TARGET}"	>  ${.TARGET}-VIMAGE
 	echo "ident ${.TARGET}-VIMAGE"	>> ${.TARGET}-VIMAGE
 	echo "options VIMAGE"		>> ${.TARGET}-VIMAGE
+	echo "include ${.TARGET}"	>  ${.TARGET}-NOINET
+	echo "ident ${.TARGET}-NOINET"	>> ${.TARGET}-NOINET
+	echo 'makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT="'  >> ${.TARGET}-NOINET
+	echo "nooptions INET"		>> ${.TARGET}-NOINET
+	echo "nodevice gre"		>> ${.TARGET}-NOINET
+	echo "include ${.TARGET}"	>  ${.TARGET}-NOINET6
+	echo "ident ${.TARGET}-NOINET6"	>> ${.TARGET}-NOINET6
+	echo "nooptions INET6"		>> ${.TARGET}-NOINET6
+	echo "include ${.TARGET}"	>  ${.TARGET}-NOIP
+	echo "ident ${.TARGET}-NOIP"	>> ${.TARGET}-NOIP
+	echo 'makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT="'  >> ${.TARGET}-NOIP
+	echo 'makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT="' >> ${.TARGET}-NOIP
+	echo "nooptions INET"		>> ${.TARGET}-NOIP
+	echo "nooptions INET6"		>> ${.TARGET}-NOIP
+	echo "nodevice age"		>> ${.TARGET}-NOIP
+	echo "nodevice alc"		>> ${.TARGET}-NOIP
+	echo "nodevice ale"		>> ${.TARGET}-NOIP
+	echo "nodevice bxe"		>> ${.TARGET}-NOIP
+	echo "nodevice em"		>> ${.TARGET}-NOIP
+	echo "nodevice fxp"		>> ${.TARGET}-NOIP
+	echo "nodevice igb"		>> ${.TARGET}-NOIP
+	echo "nodevice jme"		>> ${.TARGET}-NOIP
+	echo "nodevice msk"		>> ${.TARGET}-NOIP
+	echo "nodevice mxge"		>> ${.TARGET}-NOIP
+	echo "nodevice sge"		>> ${.TARGET}-NOIP
+	echo "nodevice sk"		>> ${.TARGET}-NOIP
+	echo "nodevice txp"		>> ${.TARGET}-NOIP
+	echo "nodevice vxge"		>> ${.TARGET}-NOIP
 .endif
 .if ${TARGET} == "powerpc" || ${TARGET} == "mips"
 	echo "machine	${TARGET} ${TARGET_ARCH}" >> ${.TARGET}

==== //depot/projects/pci/sys/conf/options#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.729 2011/05/02 05:39:43 adrian Exp $
+# $FreeBSD: src/sys/conf/options,v 1.730 2011/05/03 17:37:24 jhb Exp $
 #
 #        On the handling of kernel options
 #

==== //depot/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c#11 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.63 2011/05/02 14:13:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.65 2011/05/03 17:37:24 jhb Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>

==== //depot/projects/pci/sys/dev/acpica/acpi_pcib_pci.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.20 2010/08/17 15:44:52 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.21 2011/05/03 17:37:24 jhb Exp $");
 
 #include "opt_acpi.h"
 

==== //depot/projects/pci/sys/dev/bge/if_bge.c#4 (text+ko) ====

@@ -32,14 +32,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.342 2011/04/05 17:41:54 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.344 2011/05/02 21:04:23 marius Exp $");
 
 /*
  * Broadcom BCM570x family gigabit ethernet driver for FreeBSD.
  *
  * The Broadcom BCM5700 is based on technology originally developed by
  * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet
- * MAC chips. The BCM5700, sometimes refered to as the Tigon III, has
+ * MAC chips. The BCM5700, sometimes referred to as the Tigon III, has
  * two on-board MIPS R4000 CPUs and can have as much as 16MB of external
  * SSRAM. The BCM5700 supports TCP, UDP and IP checksum offload, jumbo
  * frames, highly configurable RX filtering, and 16 RX and TX queues
@@ -1022,7 +1022,7 @@
 		return (error);
 	}
 
-	if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) {
+	if (sc->bge_cdata.bge_rx_jumbo_chain[i] != NULL) {
 		bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo,
 		    sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD);
 		bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo,
@@ -3419,7 +3419,7 @@
 		pci_write_config(dev, sc->bge_pcixcap + PCIXR_COMMAND,
 		    devctl, 2);
 	}
-	/* Re-enable MSI, if neccesary, and enable the memory arbiter. */
+	/* Re-enable MSI, if necessary, and enable the memory arbiter. */
 	if (BGE_IS_5714_FAMILY(sc)) {
 		/* This chip disables MSI on reset. */
 		if (sc->bge_flags & BGE_FLAG_MSI) {

==== //depot/projects/pci/sys/dev/bxe/bxe_debug.h#3 (text+ko) ====

@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
- /*$FreeBSD: src/sys/dev/bxe/bxe_debug.h,v 1.2 2011/04/21 23:06:00 davidch Exp $*/
+ /*$FreeBSD: src/sys/dev/bxe/bxe_debug.h,v 1.3 2011/05/02 20:43:24 davidch Exp $*/
 
 #ifndef _BXE_DEBUG_H
 #define	_BXE_DEBUG_H
@@ -210,7 +210,7 @@
 /* Returns FALSE in "defects" per 2^31 - 1 calls, otherwise returns TRUE. */
 #define DB_RANDOMFALSE(defects)        (random() > defects)
 #define DB_OR_RANDOMFALSE(defects)  || (random() > defects)
-#define DB_AND_RANDOMFALSE(defects) && (random() > ddfects)
+#define DB_AND_RANDOMFALSE(defects) && (random() > defects)
 
 /* Returns TRUE in "defects" per 2^31 - 1 calls, otherwise returns FALSE. */
 #define DB_RANDOMTRUE(defects)         (random() < defects)

==== //depot/projects/pci/sys/dev/bxe/if_bxe.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bxe/if_bxe.c,v 1.13 2011/04/21 23:06:00 davidch Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bxe/if_bxe.c,v 1.14 2011/05/02 23:34:33 davidch Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -3600,7 +3600,7 @@
 		 * It is recommended to turn off RX flow control for 5771x
 		 * when using jumbo frames for better performance.
 		 */
-		if (!IS_E1HMF(sc) & (sc->mbuf_alloc_size > 5000))
+		if (!IS_E1HMF(sc) && (sc->mbuf_alloc_size > 5000))
 			sc->link_params.req_fc_auto_adv = FLOW_CTRL_TX;
 		else
 			sc->link_params.req_fc_auto_adv = FLOW_CTRL_BOTH;

==== //depot/projects/pci/sys/dev/bxe/if_bxe.h#3 (text+ko) ====

@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
- /*$FreeBSD: src/sys/dev/bxe/if_bxe.h,v 1.10 2011/04/21 23:06:00 davidch Exp $*/
+ /*$FreeBSD: src/sys/dev/bxe/if_bxe.h,v 1.11 2011/05/02 20:43:24 davidch Exp $*/
 
 #ifndef _IF_BXE_H
 #define	_IF_BXE_H
@@ -1150,9 +1150,6 @@
 
 /* ToDo: Audit this structure for unused varaibles. */
 struct bxe_softc {
-	/*
-	 * MUST start with ifnet pointer (see definition of miibus_statchg()).
-	 */
 	struct ifnet		*bxe_ifp;
 	int			media;
 

==== //depot/projects/pci/sys/dev/cardbus/cardbus.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.74 2010/01/05 20:42:25 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.75 2011/05/02 15:01:28 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/pci/sys/dev/coretemp/coretemp.c#2 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/coretemp/coretemp.c,v 1.12 2010/08/04 00:25:13 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/coretemp/coretemp.c,v 1.13 2011/05/02 18:41:54 delphij Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -192,7 +192,7 @@
 	} else if (cpu_model == 0x17) {
 		switch (cpu_stepping) {
 		case 0x6:	/* Mobile Core 2 Duo */
-			sc->sc_tjmax = 104;
+			sc->sc_tjmax = 105;
 			break;
 		default:	/* Unknown stepping */
 			break;

==== //depot/projects/pci/sys/dev/mii/brgphy.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mii/brgphy.c,v 1.101 2011/01/14 19:29:53 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mii/brgphy.c,v 1.102 2011/05/02 20:37:30 marius Exp $");
 
 /*
  * Driver for the Broadcom BCM54xx/57xx 1000baseTX PHY.
@@ -143,6 +143,7 @@
 	MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761),
 	MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S),
 	MII_PHY_DESC(xxBROADCOM_ALT2, BCM5717C),
+	MII_PHY_DESC(xxBROADCOM_ALT2, BCM57765),
 	MII_PHY_DESC(BROADCOM2, BCM5906),
 	MII_PHY_END
 };

==== //depot/projects/pci/sys/dev/mii/miidevs#2 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/sys/dev/mii/miidevs,v 1.79 2011/01/26 21:07:44 yongari Exp $
+$FreeBSD: src/sys/dev/mii/miidevs,v 1.80 2011/05/02 20:37:30 marius Exp $
 /*$NetBSD: miidevs,v 1.6 1999/05/14 11:37:30 drochner Exp $*/
 
 /*-
@@ -159,6 +159,7 @@
 model xxBROADCOM_ALT1 BCM5761	0x003d BCM5761 10/100/1000baseTX PHY
 model xxBROADCOM_ALT1 BCM5709S	0x003f BCM5709S 1000/2500baseSX PHY
 model xxBROADCOM_ALT2 BCM5717C	0x0020 BCM5717C 10/100/1000baseTX PHY
+model xxBROADCOM_ALT2 BCM57765	0x0024 BCM57765 10/100/1000baseTX PHY
 model BROADCOM2 BCM5906		0x0004 BCM5906 10/100baseTX PHY
 
 /* Cicada Semiconductor PHYs (now owned by Vitesse?) */

==== //depot/projects/pci/sys/dev/pci/pci.c#18 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.419 2011/05/02 14:13:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.420 2011/05/03 17:37:24 jhb Exp $");
 
 #include "opt_bus.h"
 

==== //depot/projects/pci/sys/dev/pci/pci_pci.c#20 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.66 2011/05/02 14:13:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.67 2011/05/03 17:37:24 jhb Exp $");
 
 /*
  * PCI:PCI bridge support.

==== //depot/projects/pci/sys/dev/pci/pcib_private.h#12 (text+ko) ====

@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/pci/pcib_private.h,v 1.16 2010/08/05 16:10:12 jhb Exp $
+ * $FreeBSD: src/sys/dev/pci/pcib_private.h,v 1.17 2011/05/03 17:37:24 jhb Exp $
  */
 
 #ifndef __PCIB_PRIVATE_H__

==== //depot/projects/pci/sys/dev/sound/pcm/dsp.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
 #include <sys/ctype.h>
 #include <sys/sysent.h>
 
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.118 2010/03/27 15:39:19 mav Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.119 2011/05/03 15:50:22 avg Exp $");
 
 static int dsp_mmap_allow_prot_exec = 0;
 SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RW,
@@ -1655,7 +1655,7 @@
 				/* XXX abusive DMA update: chn_rdupdate(rdch); */
 	        		a->bytes = sndbuf_gettotal(bs);
 	        		a->blocks = sndbuf_getblocks(bs) - rdch->blocks;
-	        		a->ptr = sndbuf_getreadyptr(bs);
+	        		a->ptr = sndbuf_getfreeptr(bs);
 				rdch->blocks = sndbuf_getblocks(bs);
 				CHN_UNLOCK(rdch);
 	    		} else

==== //depot/projects/pci/sys/dev/vxge/include/build-version.h#2 (text+ko) ====

@@ -1,7 +1,7 @@
-/* $FreeBSD: src/sys/dev/vxge/include/build-version.h,v 1.1 2011/04/28 14:33:15 gnn Exp $ */
+/* $FreeBSD: src/sys/dev/vxge/include/build-version.h,v 1.2 2011/05/03 15:58:24 gnn Exp $ */
 
 #ifndef	BUILD_VERSION_H
 #define	BUILD_VERSION_H
 /* Do not edit! Automatically generated when released. */
-#define	GENERATED_BUILD_VERSION 22708
+#define	GENERATED_BUILD_VERSION 22770
 #endif /* BUILD_VERSION_H */

==== //depot/projects/pci/sys/dev/vxge/vxge.c#2 (text+ko) ====

@@ -28,7 +28,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/vxge/vxge.c,v 1.1 2011/04/28 14:33:15 gnn Exp $*/
+/*$FreeBSD: src/sys/dev/vxge/vxge.c,v 1.2 2011/05/03 15:58:24 gnn Exp $*/
 
 #include <dev/vxge/vxge.h>
 
@@ -357,6 +357,9 @@
 		if (!vpath_handle)
 			continue;
 
+		/* Enabling mcast for all vpath */
+		vxge_hal_vpath_mcast_enable(vpath_handle);
+
 		/* Enabling bcast for all vpath */
 		status = vxge_hal_vpath_bcast_enable(vpath_handle);
 		if (status != VXGE_HAL_OK)
@@ -2879,26 +2882,6 @@
 
 	ifp = vdev->ifp;
 
-	if ((ifp->if_flags & IFF_ALLMULTI) && (!vdev->all_multi_flag)) {
-		for (i = 0; i < vdev->no_of_vpath; i++) {
-			vpath_handle = vxge_vpath_handle_get(vdev, i);
-			if (!vpath_handle)
-				continue;
-
-			vxge_hal_vpath_mcast_enable(vpath_handle);
-			vdev->all_multi_flag = 1;
-		}
-
-	} else if (!(ifp->if_flags & IFF_ALLMULTI) && (vdev->all_multi_flag)) {
-		for (i = 0; i < vdev->no_of_vpath; i++) {
-			vpath_handle = vxge_vpath_handle_get(vdev, i);
-			if (!vpath_handle)
-				continue;
-
-			vxge_hal_vpath_mcast_disable(vpath_handle);
-			vdev->all_multi_flag = 0;
-		}
-	}
 	for (i = 0; i < vdev->no_of_vpath; i++) {
 		vpath_handle = vxge_vpath_handle_get(vdev, i);
 		if (!vpath_handle)

==== //depot/projects/pci/sys/dev/vxge/vxge.h#2 (text+ko) ====

@@ -28,7 +28,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/vxge/vxge.h,v 1.1 2011/04/28 14:33:15 gnn Exp $*/
+/*$FreeBSD: src/sys/dev/vxge/vxge.h,v 1.2 2011/05/03 15:58:24 gnn Exp $*/
 
 #ifndef	_VXGE_H_
 #define	__VXGE_H_
@@ -406,7 +406,6 @@
 	int	no_of_vpath;
 	u64	active_port;
 	u32	no_of_func;
-	u32	all_multi_flag;
 	u32	hw_fw_version;
 	u32	max_supported_vpath;
 	int	rx_mbuf_sz;

==== //depot/projects/pci/sys/i386/conf/DEFAULTS#2 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # DEFAULTS -- Default kernel configuration file for FreeBSD/i386
 #
-# $FreeBSD: src/sys/i386/conf/DEFAULTS,v 1.22 2010/01/04 21:30:04 imp Exp $
+# $FreeBSD: src/sys/i386/conf/DEFAULTS,v 1.23 2011/05/03 18:23:11 jhb Exp $
 
 machine		i386
 
@@ -28,3 +28,5 @@
 # enable support for native hardware
 options 	NATIVE
 device		atpic
+
+options 	NEW_PCIB

==== //depot/projects/pci/sys/i386/conf/PAE#3 (text+ko) ====

@@ -1,7 +1,7 @@
 #
 # PAE -- Generic kernel configuration file for FreeBSD/i386 PAE
 #
-# $FreeBSD: src/sys/i386/conf/PAE,v 1.34 2011/03/31 08:07:13 adrian Exp $
+# $FreeBSD: src/sys/i386/conf/PAE,v 1.35 2011/05/02 16:51:02 bschmidt Exp $
 
 include GENERIC
 
@@ -77,5 +77,11 @@
 nodevice	ath_pci
 nodevice	ath_hal
 nodevice	ath_rate_sample	# SampleRate tx rate control for ath
+nodevice	ipw
+nodevice	iwi
+nodevice	iwn
+nodevice	malo
+nodevice	mwl
 nodevice	ral
 nodevice	wi
+nodevice	wpi

==== //depot/projects/pci/sys/i386/pci/pci_bus.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/pci/pci_bus.c,v 1.133 2011/05/02 14:13:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/pci/pci_bus.c,v 1.134 2011/05/03 17:37:24 jhb Exp $");
 
 #include "opt_cpu.h"
 

==== //depot/projects/pci/sys/ia64/include/vmparam.h#4 (text+ko) ====

@@ -35,7 +35,7 @@
  *
  *	@(#)vmparam.h	8.2 (Berkeley) 4/22/94
  *
- * $FreeBSD: src/sys/ia64/include/vmparam.h,v 1.28 2011/04/30 20:49:00 marcel Exp $
+ * $FreeBSD: src/sys/ia64/include/vmparam.h,v 1.29 2011/05/02 17:49:05 marcel Exp $
  */
 
 #ifndef	_MACHINE_VMPARAM_H_
@@ -182,7 +182,8 @@
 #define	VM_MIN_ADDRESS		0
 #define	VM_MAXUSER_ADDRESS	IA64_RR_BASE(IA64_VM_MINKERN_REGION)
 #define	VM_MIN_KERNEL_ADDRESS	IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1)
-#define	VM_MAX_KERNEL_ADDRESS	(IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1)
+#define	VM_MAX_KERNEL_ADDRESS	\
+		(VM_MIN_KERNEL_ADDRESS + IA64_REGION_GAP_START - 1)
 #define	VM_MAX_ADDRESS		~0UL
 
 #define	KERNBASE		VM_MAXUSER_ADDRESS

==== //depot/projects/pci/sys/kern/kern_jail.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_jail.c,v 1.144 2011/03/30 17:48:15 trasz Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_jail.c,v 1.145 2011/05/03 07:32:58 trasz Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -50,7 +50,7 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/racct.h>
-#include <sys/rctl.h>
+#include <sys/refcount.h>
 #include <sys/sx.h>
 #include <sys/sysent.h>
 #include <sys/namei.h>
@@ -78,6 +78,7 @@
 #define	DEFAULT_HOSTUUID	"00000000-0000-0000-0000-000000000000"
 
 MALLOC_DEFINE(M_PRISON, "prison", "Prison structures");
+MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures");
 
 /* Keep struct prison prison0 and some code in kern_jail_set() readable. */
 #ifdef INET
@@ -114,10 +115,11 @@
 };
 MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF);
 
-/* allprison and lastprid are protected by allprison_lock. */
+/* allprison, allprison_racct and lastprid are protected by allprison_lock. */
 struct	sx allprison_lock;
 SX_SYSINIT(allprison_lock, &allprison_lock, "allprison");
 struct	prisonlist allprison = TAILQ_HEAD_INITIALIZER(allprison);
+LIST_HEAD(, prison_racct) allprison_racct;
 int	lastprid = 0;
 
 static int do_jail_attach(struct thread *td, struct prison *pr);
@@ -125,6 +127,10 @@
 static void prison_deref(struct prison *pr, int flags);
 static char *prison_path(struct prison *pr1, struct prison *pr2);
 static void prison_remove_one(struct prison *pr);
+#ifdef RACCT
+static void prison_racct_attach(struct prison *pr);
+static void prison_racct_detach(struct prison *pr);
+#endif
 #ifdef INET
 static int _prison_check_ip4(struct prison *pr, struct in_addr *ia);
 static int prison_restrict_ip4(struct prison *pr, struct in_addr *newip4);
@@ -1197,7 +1203,6 @@
 			root = mypr->pr_root;
 			vref(root);
 		}
-		racct_create(&pr->pr_racct);
 		strlcpy(pr->pr_hostuuid, DEFAULT_HOSTUUID, HOSTUUIDLEN);
 		pr->pr_flags |= PR_HOST;
 #if defined(INET) || defined(INET6)
@@ -1657,6 +1662,11 @@
 	pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags;
 	mtx_unlock(&pr->pr_mtx);
 
+#ifdef RACCT
+	if (created)
+		prison_racct_attach(pr);
+#endif
+
 	/* Locks may have prevented a complete restriction of child IP
 	 * addresses.  If so, allocate some more memory and try again.
 	 */
@@ -2533,10 +2543,9 @@
 		if (pr->pr_cpuset != NULL)
 			cpuset_rel(pr->pr_cpuset);
 		osd_jail_exit(pr);
-#ifdef RCTL
-		rctl_racct_release(pr->pr_racct);
+#ifdef RACCT
+		prison_racct_detach(pr);
 #endif
-		racct_destroy(&pr->pr_racct);
 		free(pr, M_PRISON);
 
 		/* Removing a prison frees a reference on its parent. */
@@ -4277,14 +4286,103 @@
 prison_racct_foreach(void (*callback)(struct racct *racct,
     void *arg2, void *arg3), void *arg2, void *arg3)
 {
-	struct prison *pr;
+	struct prison_racct *prr;
 
 	sx_slock(&allprison_lock);
-	TAILQ_FOREACH(pr, &allprison, pr_list)
-		(callback)(pr->pr_racct, arg2, arg3);
+	LIST_FOREACH(prr, &allprison_racct, prr_next)
+		(callback)(prr->prr_racct, arg2, arg3);
 	sx_sunlock(&allprison_lock);
 }
 
+static struct prison_racct *
+prison_racct_find_locked(const char *name)
+{
+	struct prison_racct *prr;
+
+	sx_assert(&allprison_lock, SA_XLOCKED);
+
+	if (name[0] == '\0' || strlen(name) >= MAXHOSTNAMELEN)
+		return (NULL);
+
+	LIST_FOREACH(prr, &allprison_racct, prr_next) {
+		if (strcmp(name, prr->prr_name) != 0)
+			continue;
+
+		/* Found prison_racct with a matching name? */
+		prison_racct_hold(prr);
+		return (prr);
+	}
+
+	/* Add new prison_racct. */
+	prr = malloc(sizeof(*prr), M_PRISON_RACCT, M_ZERO | M_WAITOK);
+	racct_create(&prr->prr_racct);
+
+	strcpy(prr->prr_name, name);
+	refcount_init(&prr->prr_refcount, 1);
+	LIST_INSERT_HEAD(&allprison_racct, prr, prr_next);
+
+	return (prr);
+}
+
+struct prison_racct *
+prison_racct_find(const char *name)
+{
+	struct prison_racct *prr;
+
+	sx_xlock(&allprison_lock);
+	prr = prison_racct_find_locked(name);
+	sx_xunlock(&allprison_lock);
+	return (prr);
+}
+
+void
+prison_racct_hold(struct prison_racct *prr)
+{
+
+	refcount_acquire(&prr->prr_refcount);
+}
+
+void
+prison_racct_free(struct prison_racct *prr)
+{
+	int old;
+
+	old = prr->prr_refcount;
+	if (old > 1 && atomic_cmpset_int(&prr->prr_refcount, old, old - 1))
+		return;
+
+	sx_xlock(&allprison_lock);
+	if (refcount_release(&prr->prr_refcount)) {
+		racct_destroy(&prr->prr_racct);
+		LIST_REMOVE(prr, prr_next);
+		sx_xunlock(&allprison_lock);
+		free(prr, M_PRISON_RACCT);
+
+		return;
+	}
+	sx_xunlock(&allprison_lock);
+}
+
+#ifdef RACCT
+static void
+prison_racct_attach(struct prison *pr)
+{
+	struct prison_racct *prr;
+
+	prr = prison_racct_find_locked(pr->pr_name);
+	KASSERT(prr != NULL, ("cannot find prison_racct"));
+
+	pr->pr_prison_racct = prr;
+}
+
+static void
+prison_racct_detach(struct prison *pr)
+{
+	prison_racct_free(pr->pr_prison_racct);
+	pr->pr_prison_racct = NULL;
+}
+#endif /* RACCT */
+
 #ifdef DDB
 
 static void

==== //depot/projects/pci/sys/kern/kern_racct.c#3 (text+ko) ====

@@ -26,11 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/kern_racct.c,v 1.3 2011/04/05 19:50:34 trasz Exp $
+ * $FreeBSD: src/sys/kern/kern_racct.c,v 1.4 2011/05/03 07:32:58 trasz Exp $
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_racct.c,v 1.3 2011/04/05 19:50:34 trasz Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_racct.c,v 1.4 2011/05/03 07:32:58 trasz Exp $");
 
 #include "opt_kdtrace.h"
 
@@ -313,7 +313,8 @@
 
 	racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount);
 	for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent)
-		racct_alloc_resource(pr->pr_racct, resource, amount);
+		racct_alloc_resource(pr->pr_prison_racct->prr_racct, resource,
+		    amount);
 	racct_alloc_resource(cred->cr_loginclass->lc_racct, resource, amount);
 }
 
@@ -522,7 +523,8 @@
 
 	racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, -amount);
 	for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent)
-		racct_alloc_resource(pr->pr_racct, resource, -amount);
+		racct_alloc_resource(pr->pr_prison_racct->prr_racct, resource,
+		    -amount);
 	racct_alloc_resource(cred->cr_loginclass->lc_racct, resource, -amount);
 }
 
@@ -669,9 +671,11 @@
 	}
 	if (newpr != oldpr) {
 		for (pr = oldpr; pr != NULL; pr = pr->pr_parent)
-			racct_sub_racct(pr->pr_racct, p->p_racct);
+			racct_sub_racct(pr->pr_prison_racct->prr_racct,
+			    p->p_racct);
 		for (pr = newpr; pr != NULL; pr = pr->pr_parent)
-			racct_add_racct(pr->pr_racct, p->p_racct);
+			racct_add_racct(pr->pr_prison_racct->prr_racct,
+			    p->p_racct);
 	}
 	mtx_unlock(&racct_lock);
 
@@ -744,7 +748,7 @@
 	/*
 	 * XXX: Move this somewhere.
 	 */
-	racct_create(&prison0.pr_racct);
+	prison0.pr_prison_racct = prison_racct_find("0");
 }
 SYSINIT(racct, SI_SUB_RACCT, SI_ORDER_FIRST, racct_init, NULL);
 

==== //depot/projects/pci/sys/kern/kern_rctl.c#3 (text+ko) ====

@@ -26,11 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/kern_rctl.c,v 1.2 2011/04/10 18:35:43 trasz Exp $
+ * $FreeBSD: src/sys/kern/kern_rctl.c,v 1.3 2011/05/03 07:32:58 trasz Exp $
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_rctl.c,v 1.2 2011/04/10 18:35:43 trasz Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_rctl.c,v 1.3 2011/05/03 07:32:58 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -241,7 +241,8 @@
 		break;
 	case RCTL_SUBJECT_TYPE_JAIL:
 		available = rule->rr_amount -
-		    cred->cr_prison->pr_racct->r_resources[resource];
+		    cred->cr_prison->pr_prison_racct->prr_racct->
+		        r_resources[resource];
 		break;
 	default:
 		panic("rctl_compute_available: unknown per %d",
@@ -327,7 +328,7 @@
 			printf("rctl: rule \"%s\" matched by pid %d "
 			    "(%s), uid %d, jail %s\n", sbuf_data(&sb),
 			    p->p_pid, p->p_comm, p->p_ucred->cr_uid,
-			    p->p_ucred->cr_prison->pr_name);
+			    p->p_ucred->cr_prison->pr_prison_racct->prr_name);
 			sbuf_delete(&sb);
 			free(buf, M_RCTL);
 			link->rrl_exceeded = 1;
@@ -346,7 +347,7 @@
 			rctl_rule_to_sbuf(&sb, rule);
 			sbuf_printf(&sb, " pid=%d ruid=%d jail=%s",
 			    p->p_pid, p->p_ucred->cr_ruid,
-			    p->p_ucred->cr_prison->pr_name);
+			    p->p_ucred->cr_prison->pr_prison_racct->prr_name);
 			sbuf_finish(&sb);
 			devctl_notify_f("RCTL", "rule", "matched",
 			    sbuf_data(&sb), M_NOWAIT);
@@ -481,9 +482,9 @@
 				return (0);
 			break;
 		case RCTL_SUBJECT_TYPE_JAIL:
-			if (filter->rr_subject.rs_prison != NULL &&
-			    rule->rr_subject.rs_prison !=
-			    filter->rr_subject.rs_prison)
+			if (filter->rr_subject.rs_prison_racct != NULL &&
+			    rule->rr_subject.rs_prison_racct !=
+			    filter->rr_subject.rs_prison_racct)
 				return (0);
 			break;
 		default:
@@ -635,7 +636,10 @@
 	switch (rule->rr_subject_type) {
 	case RCTL_SUBJECT_TYPE_UNDEFINED:
 	case RCTL_SUBJECT_TYPE_PROCESS:
+		break;
 	case RCTL_SUBJECT_TYPE_JAIL:
+		if (rule->rr_subject.rs_prison_racct != NULL)
+			prison_racct_hold(rule->rr_subject.rs_prison_racct);
 		break;
 	case RCTL_SUBJECT_TYPE_USER:
 		if (rule->rr_subject.rs_uip != NULL)
@@ -658,7 +662,10 @@
 	switch (rule->rr_subject_type) {
 	case RCTL_SUBJECT_TYPE_UNDEFINED:
 	case RCTL_SUBJECT_TYPE_PROCESS:
+		break;
 	case RCTL_SUBJECT_TYPE_JAIL:
+		if (rule->rr_subject.rs_prison_racct != NULL)
+			prison_racct_free(rule->rr_subject.rs_prison_racct);
 		break;
 	case RCTL_SUBJECT_TYPE_USER:
 		if (rule->rr_subject.rs_uip != NULL)
@@ -686,7 +693,7 @@
 	rule->rr_subject.rs_proc = NULL;
 	rule->rr_subject.rs_uip = NULL;
 	rule->rr_subject.rs_loginclass = NULL;
-	rule->rr_subject.rs_prison = NULL;
+	rule->rr_subject.rs_prison_racct = NULL;
 	rule->rr_per = RCTL_SUBJECT_TYPE_UNDEFINED;
 	rule->rr_resource = RACCT_UNDEFINED;
 	rule->rr_action = RCTL_ACTION_UNDEFINED;
@@ -708,7 +715,7 @@
 	copy->rr_subject.rs_proc = rule->rr_subject.rs_proc;
 	copy->rr_subject.rs_uip = rule->rr_subject.rs_uip;
 	copy->rr_subject.rs_loginclass = rule->rr_subject.rs_loginclass;
-	copy->rr_subject.rs_prison = rule->rr_subject.rs_prison;
+	copy->rr_subject.rs_prison_racct = rule->rr_subject.rs_prison_racct;
 	copy->rr_per = rule->rr_per;
 	copy->rr_resource = rule->rr_resource;
 	copy->rr_action = rule->rr_action;
@@ -784,7 +791,7 @@
 			return (0);
 		break;
 	case RCTL_SUBJECT_TYPE_JAIL:
-		if (rule->rr_subject.rs_prison == NULL)
+		if (rule->rr_subject.rs_prison_racct == NULL)
 			return (0);
 		break;
 	default:
@@ -833,7 +840,7 @@
 		rule->rr_subject.rs_proc = NULL;
 		rule->rr_subject.rs_uip = NULL;
 		rule->rr_subject.rs_loginclass = NULL;
-		rule->rr_subject.rs_prison = NULL;
+		rule->rr_subject.rs_prison_racct = NULL;
 	} else {
 		switch (rule->rr_subject_type) {
 		case RCTL_SUBJECT_TYPE_UNDEFINED:
@@ -866,23 +873,12 @@
 			}
 			break;
 		case RCTL_SUBJECT_TYPE_JAIL:
-			rule->rr_subject.rs_prison =
-			    prison_find_name(&prison0, subject_idstr);
-			if (rule->rr_subject.rs_prison == NULL) {
-				/*
-				 * No jail with that name; try with the JID.

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105031849.p43InKiH092328>