Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Aug 2008 21:31:21 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 148556 for review
Message-ID:  <200808262131.m7QLVLDR024924@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148556

Change 148556 by jb@freebsd3 on 2008/08/26 21:30:22

	IF7

Affected files ...

.. //depot/projects/dtrace7/src/Makefile.inc1#9 integrate
.. //depot/projects/dtrace7/src/lib/libkvm/Makefile#2 integrate
.. //depot/projects/dtrace7/src/lib/libkvm/kvm.h#2 integrate
.. //depot/projects/dtrace7/src/lib/libkvm/kvm_cptime.c#1 branch
.. //depot/projects/dtrace7/src/lib/libkvm/kvm_getcptime.3#1 branch
.. //depot/projects/dtrace7/src/lib/libkvm/kvm_getpcpu.3#1 branch
.. //depot/projects/dtrace7/src/lib/libkvm/kvm_pcpu.c#1 branch
.. //depot/projects/dtrace7/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#8 integrate
.. //depot/projects/dtrace7/src/sys/amd64/include/pcpu.h#2 integrate
.. //depot/projects/dtrace7/src/sys/arm/include/pcpu.h#2 integrate
.. //depot/projects/dtrace7/src/sys/dev/dc/if_dc.c#5 integrate
.. //depot/projects/dtrace7/src/sys/dev/gem/if_gem.c#5 integrate
.. //depot/projects/dtrace7/src/sys/i386/include/pcpu.h#2 integrate
.. //depot/projects/dtrace7/src/sys/ia64/include/pcpu.h#2 integrate
.. //depot/projects/dtrace7/src/sys/powerpc/include/pcpu.h#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/central/central.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/conf/GENERIC#3 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/ebus/ebus.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/fhc/fhc.c#3 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/include/cpufunc.h#3 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/include/pcpu.h#3 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/sbus/dma_sbus.c#2 integrate
.. //depot/projects/dtrace7/src/sys/sparc64/sbus/sbus.c#4 integrate
.. //depot/projects/dtrace7/src/sys/sun4v/include/pcpu.h#3 integrate
.. //depot/projects/dtrace7/src/sys/sys/pcpu.h#3 integrate
.. //depot/projects/dtrace7/src/sys/sys/types.h#4 integrate
.. //depot/projects/dtrace7/src/usr.bin/ldd/Makefile#2 integrate
.. //depot/projects/dtrace7/src/usr.bin/ldd/ldd.1#3 integrate
.. //depot/projects/dtrace7/src/usr.bin/ldd/ldd.c#4 integrate

Differences ...

==== //depot/projects/dtrace7/src/Makefile.inc1#9 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/Makefile.inc1,v 1.588.2.4 2008/02/24 14:31:41 remko Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.588.2.5 2008/08/26 17:36:38 jhb Exp $
 #
 # Make command line options:
 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -467,8 +467,8 @@
 	cd ${.CURDIR}; \
 	    ${LIB32WMAKE} -f Makefile.inc1 libraries
 .for _t in obj depend all
-	cd ${.CURDIR}/libexec/rtld-elf; \
-	    PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
+	cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} ${_t}
 .endfor
 
 distribute32 install32:
@@ -487,10 +487,11 @@
 .if ${MK_CRYPT} != "no"
 	cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
 .endif
-	cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
+	cd ${.CURDIR}/libexec/rtld-elf; \
+	    PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
+	cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//}
 .endif
 
-
 WMAKE_TGTS=
 .if !defined(SUBDIR_OVERRIDE)
 WMAKE_TGTS+=	_worldtmp _legacy _bootstrap-tools
@@ -631,7 +632,8 @@
 	@echo "--------------------------------------------------------------"
 	${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
 .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
-	${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32
+	${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \
+	    DISTRIBUTION=lib32
 .endif
 
 distrib-dirs distribution:

==== //depot/projects/dtrace7/src/lib/libkvm/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/lib/libkvm/Makefile,v 1.17 2006/10/09 05:12:54 kmacy Exp $
+# $FreeBSD: src/lib/libkvm/Makefile,v 1.17.2.2 2008/08/26 18:00:06 jhb Exp $
 
 LIB=	kvm
 SHLIBDIR?= /lib
@@ -9,16 +9,18 @@
 CFLAGS+=-DSUN4V
 .endif
 
-SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_file.c kvm_getloadavg.c \
-	kvm_getswapinfo.c kvm_proc.c
+SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
+	kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c
 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
 SRCS+=	kvm_minidump_${MACHINE_ARCH}.c
 .endif
 INCS=	kvm.h
 
-MAN=	kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getprocs.3 \
-	kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 kvm_read.3
+MAN=	kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \
+	kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \
+	kvm_read.3
 
+MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3
 MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3
 MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3
 MLINKS+=kvm_read.3 kvm_write.3

==== //depot/projects/dtrace7/src/lib/libkvm/kvm.h#2 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)kvm.h	8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/lib/libkvm/kvm.h,v 1.17 2007/01/08 17:35:36 imp Exp $
+ * $FreeBSD: src/lib/libkvm/kvm.h,v 1.17.2.2 2008/08/26 18:00:06 jhb Exp $
  */
 
 #ifndef _KVM_H_
@@ -70,10 +70,13 @@
 __BEGIN_DECLS
 int	  kvm_close(kvm_t *);
 char	**kvm_getargv(kvm_t *, const struct kinfo_proc *, int);
+int	  kvm_getcptime(kvm_t *, long *);
 char	**kvm_getenvv(kvm_t *, const struct kinfo_proc *, int);
 char	 *kvm_geterr(kvm_t *);
 char	 *kvm_getfiles(kvm_t *, int, int, int *);
 int	  kvm_getloadavg(kvm_t *, double [], int);
+int	  kvm_getmaxcpu(kvm_t *);
+void	 *kvm_getpcpu(kvm_t *, int);
 struct kinfo_proc *
 	  kvm_getprocs(kvm_t *, int, int, int *);
 int	  kvm_getswapinfo(kvm_t *, struct kvm_swap *, int, int);

==== //depot/projects/dtrace7/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#8 (text+ko) ====

@@ -17,7 +17,7 @@
 
   <corpauthor>The &os; Project</corpauthor>
 
-  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1068.2.25 2008/04/17 00:58:50 delphij Exp $</pubdate>
+  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1068.2.26 2008/08/26 10:20:07 marck Exp $</pubdate>
 
   <copyright>
     <year>2000</year>
@@ -245,6 +245,10 @@
       a <option>-q</option> flag to suppress warnings; it now also
       accepts multiple paths on its command line.</para>
 
+    <para>&man.cron.8; now supports a <option>-m</option> option,
+      which can help managing cron mails in massive hosting
+      environment.</para>
+
     <para>&man.ypserv.8; now supports a <option>-P</option> option to
       specify the port number on which it should listen.</para>
 

==== //depot/projects/dtrace7/src/sys/amd64/include/pcpu.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/amd64/include/pcpu.h,v 1.48 2007/06/04 21:38:45 attilio Exp $
+ * $FreeBSD: src/sys/amd64/include/pcpu.h,v 1.48.2.1 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef _MACHINE_PCPU_H_
@@ -33,8 +33,6 @@
 #error "sys/cdefs.h is a prerequisite for this file"
 #endif
 
-#ifdef _KERNEL
-
 /*
  * The SMP parts are setup in pmap.c and locore.s for the BSP, and
  * mp_machdep.c sets up the data for the AP's to "see" when they awake.
@@ -51,6 +49,8 @@
 	u_int	pc_apic_id;						\
 	u_int   pc_acpi_id		/* ACPI CPU id */
 
+#ifdef _KERNEL
+
 #ifdef lint
 
 extern struct pcpu *pcpup;

==== //depot/projects/dtrace7/src/sys/arm/include/pcpu.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *	from: FreeBSD: src/sys/i386/include/globaldata.h,v 1.27 2001/04/27
- * $FreeBSD: src/sys/arm/include/pcpu.h,v 1.6 2007/06/06 23:23:47 jeff Exp $
+ * $FreeBSD: src/sys/arm/include/pcpu.h,v 1.6.2.1 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
@@ -38,6 +38,8 @@
 
 struct vmspace;
 
+#endif	/* _KERNEL */
+
 /*
  * Inside the kernel, the globally reserved register g7 is used to
  * point at the globaldata structure.
@@ -45,6 +47,8 @@
 #define	PCPU_MD_FIELDS							\
 	struct pcup *pc_prvspace;
 
+#ifdef _KERNEL
+
 struct pcb;
 struct pcpu;
 

==== //depot/projects/dtrace7/src/sys/dev/dc/if_dc.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.192.2.3 2008/06/19 01:36:31 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.192.2.4 2008/08/26 19:14:55 marius Exp $");
 
 /*
  * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
@@ -3138,7 +3138,7 @@
 	bus_dma_segment_t segs[DC_MAXFRAGS];
 	struct dc_desc *f;
 	struct mbuf *m;
-	int chainlen, cur, error, first, frag, i, idx, nseg;
+	int cur, defragged, error, first, frag, i, idx, nseg;
 
 	/*
 	 * If there's no way we can send any packets, return now.
@@ -3146,22 +3146,30 @@
 	if (DC_TX_LIST_CNT - sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_RSVD)
 		return (ENOBUFS);
 
-	/*
-	 * Count the number of frags in this chain to see if
-	 * we need to m_defrag.  Since the descriptor list is shared
-	 * by all packets, we'll m_defrag long chains so that they
-	 * do not use up the entire list, even if they would fit.
-	 */
-	chainlen = 0;
-	for (m = *m_head; m != NULL; m = m->m_next)
-		chainlen++;
-
 	m = NULL;
-	if ((sc->dc_flags & DC_TX_COALESCE && ((*m_head)->m_next != NULL ||
-	    sc->dc_flags & DC_TX_ALIGN)) || (chainlen > DC_TX_LIST_CNT / 4) ||
-	    (DC_TX_LIST_CNT - (chainlen + sc->dc_cdata.dc_tx_cnt) <=
-	    DC_TX_LIST_RSVD)) {
+	defragged = 0;
+	if (sc->dc_flags & DC_TX_COALESCE &&
+	    ((*m_head)->m_next != NULL || sc->dc_flags & DC_TX_ALIGN)) {
 		m = m_defrag(*m_head, M_DONTWAIT);
+		defragged = 1;
+	} else {
+		/*
+		 * Count the number of frags in this chain to see if we
+		 * need to m_collapse.  Since the descriptor list is shared
+		 * by all packets, we'll m_collapse long chains so that they
+		 * do not use up the entire list, even if they would fit.
+		 */
+		i = 0;
+		for (m = *m_head; m != NULL; m = m->m_next)
+			i++;
+		if (i > DC_TX_LIST_CNT / 4 ||
+		    DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <=
+		    DC_TX_LIST_RSVD) {
+			m = m_collapse(*m_head, M_DONTWAIT, DC_MAXFRAGS);
+			defragged = 1;
+		}
+	}
+	if (defragged != 0) {
 		if (m == NULL) {
 			m_freem(*m_head);
 			*m_head = NULL;
@@ -3169,15 +3177,16 @@
 		}
 		*m_head = m;
 	}
+
 	idx = sc->dc_cdata.dc_tx_prod;
 	error = bus_dmamap_load_mbuf_sg(sc->dc_mtag,
 	    sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0);
 	if (error == EFBIG) {
-		m = m_defrag(*m_head, M_DONTWAIT);
-		if (m == NULL) {
+		if (defragged != 0 || (m = m_collapse(*m_head, M_DONTWAIT,
+		    DC_MAXFRAGS)) == NULL) {
 			m_freem(*m_head);
 			*m_head = NULL;
-			return (ENOBUFS);
+			return (defragged != 0 ? error : ENOBUFS);
 		}
 		*m_head = m;
 		error = bus_dmamap_load_mbuf_sg(sc->dc_mtag,

==== //depot/projects/dtrace7/src/sys/dev/gem/if_gem.c#5 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.44.2.5 2008/07/13 17:09:22 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.44.2.6 2008/08/26 18:11:25 marius Exp $");
 
 /*
  * Driver for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers
@@ -87,7 +87,7 @@
 #define	TRIES	10000
 
 /*
- * The GEM hardware support basic TCP/UDP checksum offloading.  However,
+ * The hardware supports basic TCP/UDP checksum offloading.  However,
  * the hardware doesn't compensate the checksum for UDP datagram which
  * can yield to 0x0.  As a safe guard, UDP checksum offload is disabled
  * by default.  It can be reactivated by setting special link option
@@ -536,18 +536,26 @@
 {
 	struct gem_softc *sc = arg;
 	struct ifnet *ifp;
+	uint32_t v;
 
 	GEM_LOCK_ASSERT(sc, MA_OWNED);
 
 	ifp = sc->sc_ifp;
 	/*
-	 * Unload collision counters.
+	 * Unload collision and error counters.
 	 */
 	ifp->if_collisions +=
 	    GEM_BANK1_READ_4(sc, GEM_MAC_NORM_COLL_CNT) +
-	    GEM_BANK1_READ_4(sc, GEM_MAC_FIRST_COLL_CNT) +
-	    GEM_BANK1_READ_4(sc, GEM_MAC_EXCESS_COLL_CNT) +
+	    GEM_BANK1_READ_4(sc, GEM_MAC_FIRST_COLL_CNT);
+	v = GEM_BANK1_READ_4(sc, GEM_MAC_EXCESS_COLL_CNT) +
 	    GEM_BANK1_READ_4(sc, GEM_MAC_LATE_COLL_CNT);
+	ifp->if_collisions += v;
+	ifp->if_oerrors += v;
+	ifp->if_ierrors +=
+	    GEM_BANK1_READ_4(sc, GEM_MAC_RX_LEN_ERR_CNT) +
+	    GEM_BANK1_READ_4(sc, GEM_MAC_RX_ALIGN_ERR) +
+	    GEM_BANK1_READ_4(sc, GEM_MAC_RX_CRC_ERR_CNT) +
+	    GEM_BANK1_READ_4(sc, GEM_MAC_RX_CODE_VIOL);
 
 	/*
 	 * Then clear the hardware counters.
@@ -556,6 +564,10 @@
 	GEM_BANK1_WRITE_4(sc, GEM_MAC_FIRST_COLL_CNT, 0);
 	GEM_BANK1_WRITE_4(sc, GEM_MAC_EXCESS_COLL_CNT, 0);
 	GEM_BANK1_WRITE_4(sc, GEM_MAC_LATE_COLL_CNT, 0);
+	GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_LEN_ERR_CNT, 0);
+	GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_ALIGN_ERR, 0);
+	GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CRC_ERR_CNT, 0);
+	GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CODE_VIOL, 0);
 
 	mii_tick(sc->sc_mii);
 
@@ -1739,7 +1751,7 @@
 /*
  * MII interface
  *
- * The GEM MII interface supports at least three different operating modes:
+ * The MII interface supports at least three different operating modes:
  *
  * Bitbang mode is implemented using data, clock and output enable registers.
  *
@@ -1971,12 +1983,12 @@
 	v |= GEM_MAC_XIF_TX_MII_ENA;
 	if ((sc->sc_flags & GEM_SERDES) == 0) {
 		if ((GEM_BANK1_READ_4(sc, GEM_MIF_CONFIG) &
-		    GEM_MIF_CONFIG_PHY_SEL) != 0 &&
-		    (IFM_OPTIONS(sc->sc_mii->mii_media_active) &
-		    IFM_FDX) == 0)
+		    GEM_MIF_CONFIG_PHY_SEL) != 0) {
 			/* External MII needs echo disable if half duplex. */
-			v |= GEM_MAC_XIF_ECHO_DISABL;
-		else
+		    	if ((IFM_OPTIONS(sc->sc_mii->mii_media_active) &
+			    IFM_FDX) == 0)
+				v |= GEM_MAC_XIF_ECHO_DISABL;
+		} else
 			/*
 			 * Internal MII needs buffer enable.
 			 * XXX buffer enable makes only sense for an

==== //depot/projects/dtrace7/src/sys/i386/include/pcpu.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/i386/include/pcpu.h,v 1.50 2007/06/04 21:38:46 attilio Exp $
+ * $FreeBSD: src/sys/i386/include/pcpu.h,v 1.50.2.1 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef _MACHINE_PCPU_H_
@@ -33,8 +33,6 @@
 #error "sys/cdefs.h is a prerequisite for this file"
 #endif
 
-#ifdef _KERNEL
-
 #include <machine/segments.h>
 #include <machine/tss.h>
 
@@ -57,6 +55,9 @@
 	u_int	pc_apic_id;						\
 	int	pc_private_tss		/* Flag indicating private tss */
 
+
+#ifdef _KERNEL
+
 #ifdef lint
 
 extern struct pcpu *pcpup;

==== //depot/projects/dtrace7/src/sys/ia64/include/pcpu.h#2 (text+ko) ====

@@ -24,14 +24,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/ia64/include/pcpu.h,v 1.20 2007/06/04 21:38:47 attilio Exp $
+ * $FreeBSD: src/sys/ia64/include/pcpu.h,v 1.20.2.1 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
 #define	_MACHINE_PCPU_H_
 
-#ifdef _KERNEL
-
 #include <machine/pcb.h>
 
 #define	PCPU_MD_FIELDS							\
@@ -43,6 +41,8 @@
 	uint32_t	pc_awake:1;		/* CPU is awake? */	\
 	uint32_t	pc_acpi_id		/* ACPI CPU id. */
 
+#ifdef _KERNEL
+
 struct pcpu;
 
 register struct pcpu *pcpup __asm__("r13");

==== //depot/projects/dtrace7/src/sys/powerpc/include/pcpu.h#2 (text+ko) ====

@@ -24,13 +24,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/powerpc/include/pcpu.h,v 1.24 2007/06/04 21:38:47 attilio Exp $
+ * $FreeBSD: src/sys/powerpc/include/pcpu.h,v 1.24.2.1 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
 #define	_MACHINE_PCPU_H_
 
-#ifdef _KERNEL
 #include <machine/cpufunc.h>
 
 struct pmap;
@@ -54,6 +53,8 @@
 #define	CPUSAVE_SRR0	6		/* where SRR0 gets saved */
 #define	CPUSAVE_SRR1	7		/* where SRR1 gets saved */
 
+#ifdef _KERNEL
+
 #define PCPUP	((struct pcpu *) powerpc_get_pcpup())
 
 #define	PCPU_GET(member)	(PCPUP->pc_ ## member)

==== //depot/projects/dtrace7/src/sys/sparc64/central/central.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/central/central.c,v 1.12 2007/03/07 21:13:50 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/central/central.c,v 1.12.2.1 2008/08/26 18:45:56 marius Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,6 +105,7 @@
 static devclass_t central_devclass;
 
 DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0);
+MODULE_VERSION(central, 1);
 
 static int
 central_probe(device_t dev)
@@ -159,7 +160,7 @@
 			resource_list_add(&cdi->cdi_rl, SYS_RES_MEMORY, i,
 			    reg[i].sbr_offset, reg[i].sbr_offset +
 			    reg[i].sbr_size, reg[i].sbr_size);
-    		free(reg, M_OFWPROP);
+		free(reg, M_OFWPROP);
 		cdev = device_add_child(dev, NULL, -1);
 		if (cdev == NULL) {
 			device_printf(dev, "<%s>: device_add_child failed\n",

==== //depot/projects/dtrace7/src/sys/sparc64/conf/GENERIC#3 (text+ko) ====

@@ -18,7 +18,7 @@
 #
 # For hardware specific information check HARDWARE.TXT
 #
-# $FreeBSD: src/sys/sparc64/conf/GENERIC,v 1.127.2.5 2008/04/14 06:30:46 yongari Exp $
+# $FreeBSD: src/sys/sparc64/conf/GENERIC,v 1.127.2.6 2008/08/26 18:06:17 marius Exp $
 
 cpu		SUN4U
 ident		GENERIC
@@ -118,6 +118,8 @@
 device		atkbd		# AT keyboard
 device		psm		# PS/2 mouse
 
+device		kbdmux		# keyboard multiplexer
+
 # syscons is the default console driver, resembling an SCO console
 device		sc
 device		creator		# Creator, Creator3D and Elite3D framebuffers
@@ -148,7 +150,7 @@
 #device		plip		# TCP/IP over parallel
 #device		ppi		# Parallel port interface device
 #device		vpo		# Requires scbus and da
- 
+
 # PCI Ethernet NICs.
 #device		de		# DEC/Intel DC21x4x (``Tulip'')
 device		em		# Intel PRO/1000 adapter Gigabit Ethernet Card

==== //depot/projects/dtrace7/src/sys/sparc64/ebus/ebus.c#2 (text+ko) ====

@@ -30,21 +30,10 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/ebus/ebus.c,v 1.26 2006/04/20 04:20:40 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/ebus/ebus.c,v 1.26.2.1 2008/08/26 18:22:16 marius Exp $");
 
 /*
- * UltraSPARC 5 and beyond Ebus support.
- *
- * note that this driver is not complete:
- *	- ebus2 dma code is completely unwritten
- *	- interrupt establish is written and appears to work
- *	- bus map code is written and appears to work
- * XXX: This is PCI specific, however, there exist SBus-to-EBus bridges...
- * XXX: The EBus was designed to allow easy adaption of ISA devices to it - a
- * compatability layer for ISA devices might be nice, although probably not
- * easily possible because of some cruft (like in[bwl]/out[bwl] and friends).
- * Additionally, the existing ISA code is limited to one ISA bus, however,
- * there are machines with both ISA and EBus.
+ * UltraSPARC 5 and beyond EBus support
  */
 
 #include <sys/param.h>
@@ -88,8 +77,6 @@
 };
 
 struct ebus_softc {
-	phandle_t		sc_node;
-
 	struct isa_ranges	*sc_range;
 	struct ebus_rinfo	*sc_rinfo;
 
@@ -123,7 +110,7 @@
 	/* Bus interface */
 	DEVMETHOD(bus_print_child,	ebus_print_child),
 	DEVMETHOD(bus_probe_nomatch,	ebus_probe_nomatch),
-	DEVMETHOD(bus_setup_intr, 	bus_generic_setup_intr),
+	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
 	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 	DEVMETHOD(bus_alloc_resource,	ebus_alloc_resource),
 	DEVMETHOD(bus_get_resource_list, ebus_get_resource_list),
@@ -152,6 +139,8 @@
 static devclass_t ebus_devclass;
 
 DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0);
+MODULE_DEPEND(ebus, pci, 1, 1, 1);
+MODULE_VERSION(ebus, 1);
 
 static int
 ebus_probe(device_t dev)
@@ -183,8 +172,8 @@
 	int i, rnum, rid;
 
 	sc = device_get_softc(dev);
-	sc->sc_node = node = ofw_bus_get_node(dev);
 
+	node = ofw_bus_get_node(dev);
 	sc->sc_nrange = OF_getprop_alloc(node, "ranges",
 	    sizeof(*sc->sc_range), (void **)&sc->sc_range);
 	if (sc->sc_nrange == -1) {
@@ -215,7 +204,7 @@
 			goto fail;
 		}
 		if (rman_manage_region(&eri->eri_rman, rman_get_start(res),
-		     rman_get_end(res)) != 0) {
+		    rman_get_end(res)) != 0) {
 			printf("ebus_attach: failed to register region!");
 			rman_fini(&eri->eri_rman);
 			goto fail;
@@ -293,7 +282,7 @@
 	sc = (struct ebus_softc *)device_get_softc(bus);
 	rl = BUS_GET_RESOURCE_LIST(bus, child);
 	/*
-	 * Map ebus ranges to PCI ranges. This may include changing the
+	 * Map EBus ranges to PCI ranges.  This may include changing the
 	 * allocation type.
 	 */
 	switch (type) {
@@ -339,11 +328,10 @@
 		return (resource_list_alloc(rl, bus, child, type, rid, start,
 		    end, count, flags));
 	}
-
 	return (NULL);
 }
 
-int
+static int
 ebus_release_resource(device_t bus, device_t child, int type, int rid,
     struct resource *res)
 {
@@ -354,7 +342,7 @@
 
 	rl = BUS_GET_RESOURCE_LIST(bus, child);
 	switch (type) {
- 	case SYS_RES_MEMORY:
+	case SYS_RES_MEMORY:
 		if ((rv = rman_release_resource(res)) != 0)
 			return (rv);
 		if (!passthrough) {

==== //depot/projects/dtrace7/src/sys/sparc64/fhc/fhc.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/fhc/fhc.c,v 1.18.2.1 2008/05/30 19:30:05 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/fhc/fhc.c,v 1.18.2.2 2008/08/26 18:45:56 marius Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -120,6 +120,8 @@
 
 DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0);
 DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0);
+MODULE_DEPEND(fhc, central, 1, 1, 1);
+MODULE_VERSION(fhc, 1);
 
 static const struct intr_controller fhc_ic = {
 	fhc_intr_enable,
@@ -320,7 +322,7 @@
 		if (sc->sc_memres[i] != NULL)
 			bus_release_resource(dev, SYS_RES_MEMORY,
 			    rman_get_rid(sc->sc_memres[i]), sc->sc_memres[i]);
- 	return (error);
+	return (error);
 }
 
 static int
@@ -399,12 +401,12 @@
 	/*
 	 * Make sure the vector is fully specified and we registered
 	 * our interrupt controller for it.
- 	 */
+	 */
 	vec = rman_get_start(r);
 	if (INTIGN(vec) != sc->sc_ign || intr_vectors[vec].iv_ic != &fhc_ic) {
 		device_printf(bus, "invalid interrupt vector 0x%lx\n", vec);
- 		return (EINVAL);
- 	}
+		return (EINVAL);
+	}
 	return (bus_generic_setup_intr(bus, child, r, flags, filt, func,
 	    arg, cookiep));
 }

==== //depot/projects/dtrace7/src/sys/sparc64/include/cpufunc.h#3 (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/sparc64/include/cpufunc.h,v 1.21.2.1 2008/08/24 18:28:13 marius Exp $
+ * $FreeBSD: src/sys/sparc64/include/cpufunc.h,v 1.21.2.2 2008/08/26 18:50:50 marius Exp $
  */
 
 #ifndef	_MACHINE_CPUFUNC_H_
@@ -177,14 +177,16 @@
  * Macro intended to be used instead of wr(asr23, val, xor) for writing to
  * the TICK_COMPARE register in order to avoid a bug in BlackBird CPUs that
  * can cause these writes to fail under certain condidtions which in turn
- * causes the hardclock to stop.  The workaround is to perform the write
- * at the beginning of an I-Cache line directly followed by a dummy read.
+ * causes the hardclock to stop.  The workaround is to read the TICK_COMPARE
+ * register back immediately after writing to it with these two instructions
+ * aligned to a quadword boundary in order to ensure that I$ misses won't
+ * split them up.
  */
 #define	wrtickcmpr(val, xor) ({						\
 	__asm __volatile(						\
 	"	ba,pt	%%xcc, 1f ;		"			\
 	"	 nop	 ;			"			\
-	"	.align	64 ;			"			\
+	"	.align	128 ;			"			\
 	"1:	wr	%0, %1, %%asr23 ;	"			\
 	"	rd	%%asr23, %%g0 ;		"			\
 	: : "r" (val), "rI" (xor));					\

==== //depot/projects/dtrace7/src/sys/sparc64/include/pcpu.h#3 (text+ko) ====

@@ -24,14 +24,12 @@
  * SUCH DAMAGE.
  *
  *	from: FreeBSD: src/sys/i386/include/globaldata.h,v 1.27 2001/04/27
- * $FreeBSD: src/sys/sparc64/include/pcpu.h,v 1.22.2.1 2008/08/24 18:28:13 marius Exp $
+ * $FreeBSD: src/sys/sparc64/include/pcpu.h,v 1.22.2.2 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
 #define	_MACHINE_PCPU_H_
 
-#ifdef _KERNEL
-
 #include <machine/asmacros.h>
 #include <machine/frame.h>
 #include <machine/intr_machdep.h>
@@ -59,6 +57,8 @@
 	u_int	pc_tlb_ctx_max;						\
 	u_int	pc_tlb_ctx_min
 
+#ifdef _KERNEL
+
 struct pcb;
 struct pcpu;
 

==== //depot/projects/dtrace7/src/sys/sparc64/sbus/dma_sbus.c#2 (text+ko) ====

@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/sbus/dma_sbus.c,v 1.5 2007/01/20 14:06:01 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/sbus/dma_sbus.c,v 1.5.2.1 2008/08/26 18:17:28 marius Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -150,6 +150,8 @@
 };
 
 DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0);
+MODULE_DEPEND(dma, sbus, 1, 1, 1);
+MODULE_VERSION(dma, 1);
 
 static int
 dma_probe(device_t dev)

==== //depot/projects/dtrace7/src/sys/sparc64/sbus/sbus.c#4 (text+ko) ====

@@ -99,7 +99,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/sbus/sbus.c,v 1.46.2.2 2008/05/30 19:30:06 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/sbus/sbus.c,v 1.46.2.3 2008/08/26 18:17:28 marius Exp $");
 
 /*
  * SBus support.
@@ -247,6 +247,7 @@
 static devclass_t sbus_devclass;
 
 DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0);
+MODULE_VERSION(sbus, 1);
 
 #define	OFW_SBUS_TYPE	"sbus"
 #define	OFW_SBUS_NAME	"sbus"

==== //depot/projects/dtrace7/src/sys/sun4v/include/pcpu.h#3 (text+ko) ====

@@ -24,14 +24,12 @@
  * SUCH DAMAGE.
  *
  *	from: FreeBSD: src/sys/i386/include/globaldata.h,v 1.27 2001/04/27
- * $FreeBSD: src/sys/sun4v/include/pcpu.h,v 1.9.2.1 2008/05/07 21:14:13 marius Exp $
+ * $FreeBSD: src/sys/sun4v/include/pcpu.h,v 1.9.2.2 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef	_MACHINE_PCPU_H_
 #define	_MACHINE_PCPU_H_
 
-#ifdef _KERNEL
-
 #include <machine/asmacros.h>
 #include <machine/frame.h>
 #include <machine/intr_machdep.h>
@@ -82,6 +80,9 @@
 	 * be L2 cache aligned - they're surrounded by per-cpu data, so there is
 	 * no possibility of false sharing, but this might help in reducing misses
 	 */
+
+#ifdef _KERNEL
+
 struct pcpu;
 
 register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));

==== //depot/projects/dtrace7/src/sys/sys/pcpu.h#3 (text+ko) ====

@@ -27,16 +27,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/pcpu.h,v 1.22.2.1 2008/04/09 19:05:59 peter Exp $
+ * $FreeBSD: src/sys/sys/pcpu.h,v 1.22.2.2 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef _SYS_PCPU_H_
 #define	_SYS_PCPU_H_
 
-#ifndef _KERNEL
-#error "no user-serviceable parts inside"
-#endif
-
 #ifdef LOCORE
 #error "no assembler-serviceable parts inside"
 #endif
@@ -78,6 +74,8 @@
 	struct device	*pc_device;
 };
 
+#ifdef _KERNEL
+
 SLIST_HEAD(cpuhead, pcpu);
 
 extern struct cpuhead cpuhead;
@@ -101,4 +99,6 @@
 struct	pcpu *pcpu_find(u_int cpuid);
 void	pcpu_init(struct pcpu *pcpu, int cpuid, size_t size);
 
+#endif	/* _KERNEL */
+
 #endif /* !_SYS_PCPU_H_ */

==== //depot/projects/dtrace7/src/sys/sys/types.h#4 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)types.h	8.6 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/types.h,v 1.96.2.1 2008/07/25 17:46:01 jhb Exp $
+ * $FreeBSD: src/sys/sys/types.h,v 1.96.2.2 2008/08/26 17:48:10 jhb Exp $
  */
 
 #ifndef _SYS_TYPES_H_
@@ -143,6 +143,7 @@
 #define	_CLOCKID_T_DECLARED
 #endif
 
+typedef	__cpumask_t	cpumask_t;
 typedef	__critical_t	critical_t;	/* Critical section value */
 typedef	__int64_t	daddr_t;	/* disk address */
 
@@ -278,7 +279,6 @@
 
 #ifdef _KERNEL
 typedef	int		boolean_t;
-typedef	__cpumask_t	cpumask_t;
 typedef	struct device	*device_t;
 typedef	__intfptr_t	intfptr_t;
 

==== //depot/projects/dtrace7/src/usr.bin/ldd/Makefile#2 (text+ko) ====

@@ -1,6 +1,6 @@
-# $FreeBSD: src/usr.bin/ldd/Makefile,v 1.13 2004/06/29 21:13:15 dwmalone Exp $
+# $FreeBSD: src/usr.bin/ldd/Makefile,v 1.13.18.1 2008/08/26 17:36:38 jhb Exp $
 
-PROG=		ldd
+PROG?=		ldd
 SRCS=		ldd.c
 .if ${MACHINE_ARCH} == "i386"
 SRCS+=		sods.c

==== //depot/projects/dtrace7/src/usr.bin/ldd/ldd.1#3 (text+ko) ====

@@ -1,4 +1,4 @@
-.\" $FreeBSD: src/usr.bin/ldd/ldd.1,v 1.24.2.1 2008/07/10 01:32:08 edwin Exp $
+.\" $FreeBSD: src/usr.bin/ldd/ldd.1,v 1.24.2.2 2008/08/26 17:36:38 jhb Exp $
 .\"
 .Dd October 22, 1993
 .Dt LDD 1
@@ -57,12 +57,6 @@
 encoded in the executable.
 See the source code and include
 files for the definitive meaning of all the fields.
-.Sh BUGS
-On 64 bit architectures, dlopen() cannot open 32 bit dynamic libraries,
-so
-.Nm
-will show the error
-.Qq "unsupported file layout" .
 .Sh SEE ALSO
 .Xr ld 1 ,
 .Xr nm 1 ,

==== //depot/projects/dtrace7/src/usr.bin/ldd/ldd.c#4 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/ldd/ldd.c,v 1.33.24.2 2008/07/30 03:33:49 edwin Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/ldd/ldd.c,v 1.33.24.3 2008/08/26 17:36:38 jhb Exp $");
 
 #include <sys/wait.h>
 
@@ -44,10 +44,17 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 #include "extern.h"
 
+#ifdef COMPAT_32BIT
+#define	LD_	"LD_32_"
+#else
+#define	LD_	"LD_"
+#endif
+
 /*
  * 32-bit ELF data structures can only be used if the system header[s] declare
  * them.  There is no official macro for determining whether they are declared,
@@ -66,30 +73,57 @@
 #define	TYPE_ELF	2	/* Architecture default */
 #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED)
 #define	TYPE_ELF32	3	/* Explicit 32 bits on architectures >32 bits */
-#endif
+
+#define	_PATH_LDD32	"/usr/bin/ldd32"
+
+static int
+execldd32(char *file, char *fmt1, char *fmt2, int aflag, int vflag)
+{
+	char *argv[8];
+	int i, rval, status;
 
-#define	ENV_OBJECTS		0
-#define	ENV_OBJECTS_FMT1	1
-#define	ENV_OBJECTS_FMT2	2
-#define	ENV_OBJECTS_PROGNAME	3
-#define	ENV_OBJECTS_ALL		4
-#define	ENV_LAST		5
+	unsetenv(LD_ "TRACE_LOADED_OBJECTS");
+	rval = 0;
+	i = 0;
+	argv[i++] = strdup(_PATH_LDD32);
+	if (aflag)
+		argv[i++] = strdup("-a");
+	if (vflag)
+		argv[i++] = strdup("-v");
+	if (fmt1 != NULL) {
+		argv[i++] = strdup("-f");
+		argv[i++] = strdup(fmt1);
+	}
+	if (fmt2 != NULL) {
+		argv[i++] = strdup("-f");
+		argv[i++] = strdup(fmt2);
+	}
+	argv[i++] = strdup(file);
+	argv[i++] = NULL;
 
-const char	*envdef[ENV_LAST] = {
-	"LD_TRACE_LOADED_OBJECTS",
-	"LD_TRACE_LOADED_OBJECTS_FMT1",
-	"LD_TRACE_LOADED_OBJECTS_FMT2",
-	"LD_TRACE_LOADED_OBJECTS_PROGNAME",
-	"LD_TRACE_LOADED_OBJECTS_ALL",
-};
-#if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED)

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



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