Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2008 14:07:45 GMT
From:      Ed Schouten <ed@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 150206 for review
Message-ID:  <200809211407.m8LE7j6R034738@repoman.freebsd.org>

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

Change 150206 by ed@ed_dull on 2008/09/21 14:06:55

	IFC.

Affected files ...

.. //depot/projects/mpsafetty/crypto/openssl/FREEBSD-Xlist#2 delete
.. //depot/projects/mpsafetty/crypto/openssl/FREEBSD-upgrade#2 delete
.. //depot/projects/mpsafetty/lib/libc/gen/getosreldate.3#2 integrate
.. //depot/projects/mpsafetty/sbin/ipfw/ipfw2.c#3 integrate
.. //depot/projects/mpsafetty/sys/boot/ofw/libofw/Makefile#3 integrate
.. //depot/projects/mpsafetty/sys/boot/ofw/libofw/ofw_console.c#3 integrate
.. //depot/projects/mpsafetty/sys/conf/files.mips#3 integrate
.. //depot/projects/mpsafetty/sys/conf/files.sparc64#4 integrate
.. //depot/projects/mpsafetty/sys/conf/options.sparc64#3 integrate
.. //depot/projects/mpsafetty/sys/dev/ath/if_ath.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/ath/if_athvar.h#3 integrate
.. //depot/projects/mpsafetty/sys/dev/cxgb/cxgb_osdep.h#4 integrate
.. //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_defs.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_tom.c#4 integrate
.. //depot/projects/mpsafetty/sys/dev/pci/vga_pci.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/devfs/devfs_devs.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/devfs/devfs_vnops.c#5 integrate
.. //depot/projects/mpsafetty/sys/fs/fdescfs/fdesc_vnops.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/hpfs/hpfs_vnops.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/msdosfs/msdosfs_vnops.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/ntfs/ntfs_vnops.c#2 integrate
.. //depot/projects/mpsafetty/sys/fs/portalfs/portal_vnops.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/pseudofs/pseudofs_vnops.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/smbfs/smbfs_node.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/tmpfs/tmpfs_vnops.c#4 integrate
.. //depot/projects/mpsafetty/sys/fs/udf/udf_vnops.c#2 integrate
.. //depot/projects/mpsafetty/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c#3 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/pmap.c#6 integrate
.. //depot/projects/mpsafetty/sys/kern/uipc_mqueue.c#4 integrate
.. //depot/projects/mpsafetty/sys/kern/vfs_vnops.c#5 integrate
.. //depot/projects/mpsafetty/sys/net/if_clone.c#2 integrate
.. //depot/projects/mpsafetty/sys/net/if_clone.h#2 integrate
.. //depot/projects/mpsafetty/sys/net/route.c#6 integrate
.. //depot/projects/mpsafetty/sys/net/route.h#4 integrate
.. //depot/projects/mpsafetty/sys/net80211/ieee80211_freebsd.c#3 integrate
.. //depot/projects/mpsafetty/sys/netgraph/ng_source.c#3 integrate
.. //depot/projects/mpsafetty/sys/nfsclient/nfs_vnops.c#4 integrate
.. //depot/projects/mpsafetty/sys/sparc64/include/tick.h#3 integrate
.. //depot/projects/mpsafetty/sys/sparc64/sparc64/mp_machdep.c#7 integrate
.. //depot/projects/mpsafetty/sys/sparc64/sparc64/tick.c#4 integrate
.. //depot/projects/mpsafetty/sys/ufs/ufs/ufs_vnops.c#5 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_mmap.c#4 integrate
.. //depot/projects/mpsafetty/tools/tools/net80211/scripts/config#2 integrate
.. //depot/projects/mpsafetty/usr.bin/ar/Makefile#2 integrate
.. //depot/projects/mpsafetty/usr.bin/ar/acplex.l#1 branch
.. //depot/projects/mpsafetty/usr.bin/ar/acpyacc.y#1 branch
.. //depot/projects/mpsafetty/usr.bin/ar/ar.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/ar/ar.h#2 integrate
.. //depot/projects/mpsafetty/usr.bin/ar/write.c#2 integrate
.. //depot/projects/mpsafetty/usr.sbin/Makefile#6 integrate

Differences ...

==== //depot/projects/mpsafetty/lib/libc/gen/getosreldate.3#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libc/gen/getosreldate.3,v 1.3 2005/12/03 05:11:07 ambrisko Exp $
+.\" $FreeBSD: src/lib/libc/gen/getosreldate.3,v 1.4 2008/09/20 21:12:54 rodrigc Exp $
 .\"
 .Dd December 2, 2005
 .Dt GETOSRELDATE 3
@@ -34,7 +34,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In osreldate.h
 .Ft int
 .Fn getosreldate void
 .Sh DESCRIPTION

==== //depot/projects/mpsafetty/sbin/ipfw/ipfw2.c#3 (text+ko) ====

@@ -17,7 +17,7 @@
  *
  * NEW command line interface for IP firewall facility
  *
- * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.121 2008/09/06 17:23:37 rik Exp $
+ * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.126 2008/09/21 12:54:09 rik Exp $
  */
 
 #include <sys/param.h>
@@ -3569,7 +3569,7 @@
 	char **av, *sep; /* Token separator. */
 	/* Temporary buffer used to hold server pool ip's. */
 	char tmp_spool_buf[NAT_BUF_LEN]; 
-	int ac, i, space, lsnat;
+	int ac, space, lsnat;
 	struct cfg_redir *r;	
 	struct cfg_spool *tmp;		
 
@@ -3788,7 +3788,7 @@
 		 int *_ac, char ***_av) 
 {
 	char **av;
-	int ac, i, space;
+	int ac, space;
 	struct protoent *protoent;
 	struct cfg_redir *r;
 	
@@ -3975,7 +3975,6 @@
 config_nat(int ac, char **av)
 {
 	struct cfg_nat *n;              /* Nat instance configuration. */
-	struct in_addr ip;
 	int i, len, off, tok;
 	char *id, buf[NAT_BUF_LEN]; 	/* Buffer for serialized data. */
 	
@@ -5857,6 +5856,8 @@
 	free(av);
 }
 
+static void table_list(ipfw_table_entry ent);
+
 /*
  * This one handles all table-related commands
  * 	ipfw table N add addr[/masklen] [value]
@@ -5868,11 +5869,8 @@
 table_handler(int ac, char *av[])
 {
 	ipfw_table_entry ent;
-	ipfw_table *tbl;
 	int do_add;
 	char *p;
-	socklen_t l;
-	uint32_t a;
 
 	ac--; av++;
 	if (ac && isdigit(**av)) {
@@ -5933,46 +5931,63 @@
 		if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, sizeof(ent.tbl)) < 0)
 			err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)");
 	} else if (_substrcmp(*av, "list") == 0) {
-		a = ent.tbl;
-		l = sizeof(a);
-		if (do_cmd(IP_FW_TABLE_GETSIZE, &a, (uintptr_t)&l) < 0)
-			err(EX_OSERR, "getsockopt(IP_FW_TABLE_GETSIZE)");
-		l = sizeof(*tbl) + a * sizeof(ipfw_table_entry);
-		tbl = malloc(l);
-		if (tbl == NULL)
-			err(EX_OSERR, "malloc");
-		tbl->tbl = ent.tbl;
-		if (do_cmd(IP_FW_TABLE_LIST, tbl, (uintptr_t)&l) < 0)
-			err(EX_OSERR, "getsockopt(IP_FW_TABLE_LIST)");
-		for (a = 0; a < tbl->cnt; a++) {
-			unsigned int tval;
-			tval = tbl->ent[a].value;
-			if (do_value_as_ip) {
-			    char tbuf[128];
-			    strncpy(tbuf, inet_ntoa(*(struct in_addr *)
+		table_list(ent);
+	} else
+		errx(EX_USAGE, "invalid table command %s", *av);
+}
+
+static void
+table_list(ipfw_table_entry ent)
+{
+	ipfw_table *tbl;
+	socklen_t l;
+	uint32_t a;
+
+	a = ent.tbl;
+	l = sizeof(a);
+	if (do_cmd(IP_FW_TABLE_GETSIZE, &a, (uintptr_t)&l) < 0)
+		err(EX_OSERR, "getsockopt(IP_FW_TABLE_GETSIZE)");
+
+	/* If a is zero we have nothing to do, the table is empty. */
+	if (a == 0)
+		return;
+
+	l = sizeof(*tbl) + a * sizeof(ipfw_table_entry);
+	tbl = malloc(l);
+	if (tbl == NULL)
+		err(EX_OSERR, "malloc");
+	tbl->tbl = ent.tbl;
+	if (do_cmd(IP_FW_TABLE_LIST, tbl, (uintptr_t)&l) < 0)
+		err(EX_OSERR, "getsockopt(IP_FW_TABLE_LIST)");
+	for (a = 0; a < tbl->cnt; a++) {
+		unsigned int tval;
+		tval = tbl->ent[a].value;
+		if (do_value_as_ip) {
+			char tbuf[128];
+			strncpy(tbuf, inet_ntoa(*(struct in_addr *)
 				&tbl->ent[a].addr), 127);
-			    /* inet_ntoa expects network order */
-			    tval = htonl(tval);
-			    printf("%s/%u %s\n", tbuf, tbl->ent[a].masklen,
-			        inet_ntoa(*(struct in_addr *)&tval));
-			} else {
-			    printf("%s/%u %u\n",
-			        inet_ntoa(*(struct in_addr *)&tbl->ent[a].addr),
-			        tbl->ent[a].masklen, tval);
-			}
+			/* inet_ntoa expects network order */
+			tval = htonl(tval);
+			printf("%s/%u %s\n", tbuf, tbl->ent[a].masklen,
+				inet_ntoa(*(struct in_addr *)&tval));
+		} else {
+			printf("%s/%u %u\n",
+				inet_ntoa(*(struct in_addr *)&tbl->ent[a].addr),
+				tbl->ent[a].masklen, tval);
 		}
-	} else
-		errx(EX_USAGE, "invalid table command %s", *av);
+	}
+	free(tbl);
 }
 
 static void
-show_nat(int ac, char **av) {
+show_nat(int ac, char **av)
+{
 	struct cfg_nat *n;
 	struct cfg_redir *e;
 	int cmd, i, nbytes, do_cfg, do_rule, frule, lrule, nalloc, size;
 	int nat_cnt, redir_cnt, r;
 	uint8_t *data, *p;
-	char **lav, *endptr;
+	char *endptr;
 
 	do_rule = 0;
 	nalloc = 1024;

==== //depot/projects/mpsafetty/sys/boot/ofw/libofw/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/ofw/libofw/Makefile,v 1.12 2008/09/19 11:00:14 sobomax Exp $
+# $FreeBSD: src/sys/boot/ofw/libofw/Makefile,v 1.13 2008/09/19 19:49:58 sobomax Exp $
 
 LIB=		ofw
 INTERNALLIB=
@@ -14,7 +14,7 @@
 
 CFLAGS+=	-ffreestanding
 .if ${MACHINE_ARCH} == "powerpc"
-CFLAGS+=	-msoft-float -DPOWERMAC_SCREEN_HACK
+CFLAGS+=	-msoft-float
 .endif
 
 .ifdef(BOOT_DISK_DEBUG)

==== //depot/projects/mpsafetty/sys/boot/ofw/libofw/ofw_console.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_console.c,v 1.14 2008/09/19 11:00:14 sobomax Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ofw/libofw/ofw_console.c,v 1.15 2008/09/19 19:49:58 sobomax Exp $");
 
 #include <sys/types.h>
 
@@ -42,10 +42,6 @@
 
 static ihandle_t stdin;
 static ihandle_t stdout;
-#ifdef POWERMAC_SCREEN_HACK
-static ihandle_t stdout1;
-static int do_stdout1 = 0;
-#endif
 
 struct console ofwconsole = {
 	"ofw",
@@ -61,26 +57,9 @@
 static void
 ofw_cons_probe(struct console *cp)
 {
-#ifdef POWERMAC_SCREEN_HACK
-	char path1[128], path2[128];
-#endif
 
 	OF_getprop(chosen, "stdin", &stdin, sizeof(stdin));
 	OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
-#ifdef POWERMAC_SCREEN_HACK
-	stdout1 = OF_open("screen");
-	if (stdout1 != -1) {
-		if (OF_instance_to_path(stdout, path1, sizeof(path1)) == -1)
-			path1[0] = '\0';
-		if (OF_instance_to_path(stdout1, path2, sizeof(path2)) == -1)
-			path2[0] = '\0';
-		if (strcmp(path1, path2) == 0) {
-			OF_close(stdout1);
-		} else {
-			do_stdout1 = 1;
-		}
-	}
-#endif
 	cp->c_flags |= C_PRESENTIN|C_PRESENTOUT;
 }
 
@@ -98,18 +77,10 @@
 	if (c == '\n') {
 		cbuf = '\r';
 		OF_write(stdout, &cbuf, 1);
-#ifdef POWERMAC_SCREEN_HACK
-		if (do_stdout1 != 0)
-			OF_write(stdout1, &cbuf, 1);
-#endif
 	}
 
 	cbuf = c;
 	OF_write(stdout, &cbuf, 1);
-#ifdef POWERMAC_SCREEN_HACK
-	if (do_stdout1 != 0)
-		OF_write(stdout1, &cbuf, 1);
-#endif
 }
 
 static int saved_char = -1;

==== //depot/projects/mpsafetty/sys/conf/files.mips#3 (text+ko) ====

@@ -18,7 +18,7 @@
 # Copyright (c) 2001, 2004-2005, Juniper Networks, Inc.
 # All rights reserved.
 # JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta
-# $FreeBSD: src/sys/conf/files.mips,v 1.2 2008/08/27 01:41:32 imp Exp $
+# $FreeBSD: src/sys/conf/files.mips,v 1.4 2008/09/19 19:46:11 imp Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -29,7 +29,6 @@
 # ----------------------------------------------------------------------
 mips/mips/machdep.c		standard
 mips/mips/mp_machdep.c		optional smp
-mips/mips/mips_subr.c		standard
 mips/mips/psraccess.S		standard
 # ----------------------------------------------------------------------
 # Phase 3
@@ -76,6 +75,13 @@
 geom/geom_bsd_enc.c		standard
 geom/geom_mbr.c			standard
 geom/geom_mbr_enc.c		standard
+hal.o				optional	ath_hal		\
+	compile-with		"ATH_HAL_CPU=mips; ATH_ENDIAN=`if ([ x${TARGET_BIG_ENDIAN} = x ]); then echo le; else echo be; fi;`; uudecode < $S/contrib/dev/ath/public/$$ATH_HAL_CPU-$$ATH_ENDIAN-elf.hal.o.uu" \
+	no-implicit-rule
+opt_ah.h			optional	ath_hal		\
+	compile-with		"ATH_HAL_CPU=mips; ATH_ENDIAN=`if ([ x${TARGET_BIG_ENDIAN} = x ]); then echo le; else echo be; fi;`; rm -f opt_ah.h; cp $S/contrib/dev/ath/public/$$ATH_HAL_CPU-$$ATH_ENDIAN-elf.opt_ah.h opt_ah.h" \
+	no-obj no-implicit-rule before-depend			\
+	clean		"opt_ah.h"
 libkern/ashldi3.c		standard
 libkern/ashrdi3.c		standard
 libkern/divdi3.c		standard

==== //depot/projects/mpsafetty/sys/conf/files.sparc64#4 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.sparc64,v 1.97 2008/09/10 20:22:27 marius Exp $
+# $FreeBSD: src/sys/conf/files.sparc64,v 1.99 2008/09/20 11:34:18 marius Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -100,20 +100,23 @@
 sparc64/sparc64/db_hwwatch.c	optional	ddb
 sparc64/sparc64/dump_machdep.c	standard
 sparc64/sparc64/elf_machdep.c	standard
-sparc64/sparc64/exception.S	standard	no-obj
+sparc64/sparc64/exception.S	standard	no-obj			\
+	compile-with "${NORMAL_S} -mcpu=ultrasparc"
 sparc64/sparc64/eeprom.c	optional	eeprom ebus | eeprom fhc | \
 						eeprom sbus
 sparc64/sparc64/gdb_machdep.c	optional	gdb
 sparc64/sparc64/identcpu.c	standard
 sparc64/sparc64/in_cksum.c	optional	inet
-sparc64/sparc64/interrupt.S	standard	no-obj
+sparc64/sparc64/interrupt.S	standard	no-obj			\
+	compile-with "${NORMAL_S} -mcpu=ultrasparc"
 sparc64/sparc64/intr_machdep.c	standard
 sparc64/sparc64/iommu.c		standard
 sparc64/sparc64/jbusppm.c	standard
 sparc64/sparc64/locore.S	standard	no-obj
 sparc64/sparc64/machdep.c	standard
 sparc64/sparc64/mem.c		optional	mem
-sparc64/sparc64/mp_exception.S	optional	smp
+sparc64/sparc64/mp_exception.S	optional	smp			\
+	compile-with "${NORMAL_S} -mcpu=ultrasparc"
 sparc64/sparc64/mp_locore.S	optional	smp
 sparc64/sparc64/mp_machdep.c	optional	smp
 sparc64/sparc64/nexus.c		standard
@@ -127,7 +130,8 @@
 sparc64/sparc64/schppm.c	standard
 sparc64/sparc64/spitfire.c	standard
 sparc64/sparc64/stack_machdep.c	optional	ddb | stack
-sparc64/sparc64/support.S	standard
+sparc64/sparc64/support.S	standard				\
+	compile-with "${NORMAL_S} -mcpu=ultrasparc"
 sparc64/sparc64/sys_machdep.c	standard
 sparc64/sparc64/swtch.S		standard
 sparc64/sparc64/tick.c		standard

==== //depot/projects/mpsafetty/sys/conf/options.sparc64#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.sparc64,v 1.15 2008/08/22 20:28:19 marius Exp $
+# $FreeBSD: src/sys/conf/options.sparc64,v 1.17 2008/09/20 11:46:07 marius Exp $
 
 GFB_DEBUG		opt_gfb.h
 GFB_NO_FONT_LOADING	opt_gfb.h

==== //depot/projects/mpsafetty/sys/dev/ath/if_ath.c#2 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.191 2008/06/07 18:38:02 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.192 2008/09/21 00:30:33 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -2852,7 +2852,8 @@
 		DPRINTF(sc, ATH_DEBUG_BEACON,
 		    "%s: %s beacons bslot %d intval %u tsfadjust %llu\n",
 		    __func__, sc->sc_stagbeacons ? "stagger" : "burst",
-		    avp->av_bslot, ni->ni_intval, le64toh(tsfadjust));
+		    avp->av_bslot, ni->ni_intval,
+		    (long long unsigned) le64toh(tsfadjust));
 
 		wh = mtod(m, struct ieee80211_frame *);
 		memcpy(&wh[1], &tsfadjust, sizeof(tsfadjust));

==== //depot/projects/mpsafetty/sys/dev/ath/if_athvar.h#3 (text+ko) ====

@@ -26,7 +26,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.66 2008/09/09 16:21:25 rpaulo Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.67 2008/09/21 00:28:54 sam Exp $
  */
 
 /*
@@ -505,8 +505,13 @@
 	(ath_hal_getcapability(_ah, HAL_CAP_CIPHER, _cipher, NULL) == HAL_OK)
 #define	ath_hal_getregdomain(_ah, _prd) \
 	(ath_hal_getcapability(_ah, HAL_CAP_REG_DMN, 0, (_prd)) == HAL_OK)
+#if defined(__LP64__)
 #define	ath_hal_setregdomain(_ah, _rd) \
+	(*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 176) = (_rd))
+#else
+#define	ath_hal_setregdomain(_ah, _rd) \
 	(*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 128) = (_rd))
+#endif
 #define	ath_hal_getcountrycode(_ah, _pcc) \
 	(*(_pcc) = (_ah)->ah_countryCode)
 #define	ath_hal_gettkipmic(_ah) \

==== //depot/projects/mpsafetty/sys/dev/cxgb/cxgb_osdep.h#4 (text+ko) ====

@@ -26,7 +26,7 @@
 POSSIBILITY OF SUCH DAMAGE.
 
 
-$FreeBSD: src/sys/dev/cxgb/cxgb_osdep.h,v 1.24 2008/09/16 02:28:08 kmacy Exp $
+$FreeBSD: src/sys/dev/cxgb/cxgb_osdep.h,v 1.25 2008/09/19 21:12:19 kmacy Exp $
 
 ***************************************************************************/
 
@@ -92,7 +92,6 @@
 #define m_get_socket(m) ((m)->m_pkthdr.header)
 
 #define	KTR_CXGB	KTR_SPARE2
-void cxgb_log_tcb(struct adapter *sc, unsigned int tid);
 
 #define MT_DONTFREE  128
 

==== //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_defs.h#2 (text+ko) ====

@@ -27,7 +27,7 @@
 POSSIBILITY OF SUCH DAMAGE.
 
 
-$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_defs.h,v 1.4 2008/04/19 03:22:42 kmacy Exp $
+$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_defs.h,v 1.5 2008/09/19 21:12:19 kmacy Exp $
 
 ***************************************************************************/
 #ifndef CXGB_DEFS_H_
@@ -49,6 +49,7 @@
 struct toepcb;
 struct listen_ctx;
 
+void cxgb_log_tcb(struct adapter *sc, unsigned int tid);
 typedef void (*defer_handler_t)(struct toedev *dev, struct mbuf *m);
 
 void t3tom_register_cpl_handler(unsigned int opcode, cxgb_cpl_handler_func h);

==== //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_tom.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
 ***************************************************************************/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_tom.c,v 1.8 2008/09/16 01:02:17 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_tom.c,v 1.9 2008/09/19 21:12:19 kmacy Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -145,6 +145,35 @@
 	.redirect = NULL
 };
 
+void
+cxgb_log_tcb(struct adapter *sc, unsigned int tid)
+{
+
+	char buf[TCB_SIZE];
+	uint64_t *tcb = (uint64_t *)buf;
+	int i, error;
+	struct mc7 *mem = &sc->cm;
+
+	error = t3_mc7_bd_read(mem, tid*TCB_SIZE/8, TCB_SIZE/8, tcb);
+	if (error)
+		printf("cxgb_tcb_log failed\n");
+
+
+	CTR1(KTR_CXGB, "TCB tid=%u", tid);
+	for (i = 0; i < TCB_SIZE / 32; i++) {
+
+		CTR5(KTR_CXGB, "%1d: %08x %08x %08x %08x",
+		    i, (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32),
+		    (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32));
+
+		tcb += 2;
+		CTR4(KTR_CXGB, "   %08x %08x %08x %08x",
+		    (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32),
+		    (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32));
+		tcb += 2;
+	}
+}
+
 /*
  * Add an skb to the deferred skb queue for processing from process context.
  */

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

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/vga_pci.c,v 1.6 2008/09/16 19:52:02 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/vga_pci.c,v 1.7 2008/09/19 19:11:35 rnoland Exp $");
 
 /*
  * Simple driver for PCI VGA display devices.  Drivers such as agp(4) and
@@ -110,6 +110,22 @@
 	return (EINVAL);
 }
 
+static int
+vga_pci_setup_intr(device_t dev, device_t child, struct resource *irq,
+    int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg,
+    void **cookiep)
+{
+	return (BUS_SETUP_INTR(device_get_parent(dev), dev, irq, flags,
+	    filter, intr, arg, cookiep));
+}
+
+static int
+vga_pci_teardown_intr(device_t dev, device_t child, struct resource *irq,
+    void *cookie)
+{
+	return (BUS_TEARDOWN_INTR(device_get_parent(dev), dev, irq, cookie));
+}
+
 static struct resource *
 vga_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
     u_long start, u_long end, u_long count, u_int flags)
@@ -311,8 +327,8 @@
 	/* Bus interface */
 	DEVMETHOD(bus_read_ivar,	vga_pci_read_ivar),
 	DEVMETHOD(bus_write_ivar,	vga_pci_write_ivar),
-	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
-	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
+	DEVMETHOD(bus_setup_intr,	vga_pci_setup_intr),
+	DEVMETHOD(bus_teardown_intr,	vga_pci_teardown_intr),
 
 	DEVMETHOD(bus_alloc_resource,	vga_pci_alloc_resource),
 	DEVMETHOD(bus_release_resource,	vga_pci_release_resource),

==== //depot/projects/mpsafetty/sys/fs/devfs/devfs_devs.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  *
  * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36
  *
- * $FreeBSD: src/sys/fs/devfs/devfs_devs.c,v 1.54 2008/06/16 17:34:59 kib Exp $
+ * $FreeBSD: src/sys/fs/devfs/devfs_devs.c,v 1.55 2008/09/21 14:02:43 ed Exp $
  */
 
 #include "opt_mac.h"

==== //depot/projects/mpsafetty/sys/fs/devfs/devfs_vnops.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  *	@(#)kernfs_vnops.c	8.15 (Berkeley) 5/21/95
  * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
  *
- * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.166 2008/08/28 15:23:18 attilio Exp $
+ * $FreeBSD: src/sys/fs/devfs/devfs_vnops.c,v 1.167 2008/09/20 19:50:52 kib Exp $
  */
 
 /*
@@ -499,8 +499,6 @@
 		KASSERT(de != NULL,
 		    ("Null dir dirent in devfs_getattr vp=%p", vp));
 	}
-	bzero((caddr_t) vap, sizeof(*vap));
-	vattr_null(vap);
 	vap->va_uid = de->de_uid;
 	vap->va_gid = de->de_gid;
 	vap->va_mode = de->de_mode;
@@ -543,6 +541,7 @@
 	}
 	vap->va_gen = 0;
 	vap->va_flags = 0;
+	vap->va_filerev = 0;
 	vap->va_nlink = de->de_links;
 	vap->va_fileid = de->de_inode;
 

==== //depot/projects/mpsafetty/sys/fs/fdescfs/fdesc_vnops.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  *
  *	@(#)fdesc_vnops.c	8.9 (Berkeley) 1/21/94
  *
- * $FreeBSD: src/sys/fs/fdescfs/fdesc_vnops.c,v 1.110 2008/08/28 15:23:18 attilio Exp $
+ * $FreeBSD: src/sys/fs/fdescfs/fdesc_vnops.c,v 1.112 2008/09/20 19:50:52 kib Exp $
  */
 
 /*
@@ -391,8 +391,6 @@
 
 	switch (VTOFDESC(vp)->fd_type) {
 	case Froot:
-		VATTR_NULL(vap);
-
 		vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
 		vap->va_type = VDIR;
 		vap->va_nlink = 2;
@@ -407,8 +405,9 @@
 		vap->va_ctime = vap->va_mtime;
 		vap->va_gen = 0;
 		vap->va_flags = 0;
-		vap->va_rdev = 0;
+		vap->va_rdev = NODEV;
 		vap->va_bytes = 0;
+		vap->va_filerev = 0;
 		break;
 
 	case Fdesc:
@@ -421,7 +420,6 @@
 		error = fo_stat(fp, &stb, td->td_ucred, td);
 		fdrop(fp, td);
 		if (error == 0) {
-			VATTR_NULL(vap);
 			vap->va_type = IFTOVT(stb.st_mode);
 			vap->va_mode = stb.st_mode;
 #define FDRX (VREAD|VEXEC)
@@ -456,6 +454,8 @@
 			vap->va_ctime = stb.st_ctimespec;
 			vap->va_uid = stb.st_uid;
 			vap->va_gid = stb.st_gid;
+			vap->va_gen = 0;
+			vap->va_filerev = 0;
 		}
 		break;
 

==== //depot/projects/mpsafetty/sys/fs/hpfs/hpfs_vnops.c#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/fs/hpfs/hpfs_vnops.c,v 1.73 2008/08/28 15:23:18 attilio Exp $
+ * $FreeBSD: src/sys/fs/hpfs/hpfs_vnops.c,v 1.74 2008/09/20 19:49:15 kib Exp $
  */
 
 #include <sys/param.h>
@@ -424,7 +424,7 @@
 	vap->va_nlink = 1;
 	vap->va_uid = hp->h_uid;
 	vap->va_gid = hp->h_gid;
-	vap->va_rdev = 0;				/* XXX UNODEV ? */
+	vap->va_rdev = NODEV;
 	vap->va_size = hp->h_fn.fn_size;
 	vap->va_bytes = ((hp->h_fn.fn_size + DEV_BSIZE-1) & ~(DEV_BSIZE-1)) +
 			DEV_BSIZE;

==== //depot/projects/mpsafetty/sys/fs/msdosfs/msdosfs_vnops.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vnops.c,v 1.187 2008/08/28 15:23:18 attilio Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vnops.c,v 1.188 2008/09/20 19:49:15 kib Exp $ */
 /*	$NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $	*/
 
 /*-
@@ -334,7 +334,7 @@
 	vap->va_uid = pmp->pm_uid;
 	vap->va_gid = pmp->pm_gid;
 	vap->va_nlink = 1;
-	vap->va_rdev = 0;
+	vap->va_rdev = NODEV;
 	vap->va_size = dep->de_FileSize;
 	fattime2timespec(dep->de_MDate, dep->de_MTime, 0, 0, &vap->va_mtime);
 	vap->va_ctime = vap->va_mtime;

==== //depot/projects/mpsafetty/sys/fs/ntfs/ntfs_vnops.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/fs/ntfs/ntfs_vnops.c,v 1.62 2008/01/13 14:44:04 attilio Exp $
+ * $FreeBSD: src/sys/fs/ntfs/ntfs_vnops.c,v 1.63 2008/09/20 19:49:15 kib Exp $
  *
  */
 
@@ -191,7 +191,7 @@
 	vap->va_nlink = (ip->i_nlink || ip->i_flag & IN_LOADED ? ip->i_nlink : 1);
 	vap->va_uid = ip->i_mp->ntm_uid;
 	vap->va_gid = ip->i_mp->ntm_gid;
-	vap->va_rdev = 0;				/* XXX UNODEV ? */
+	vap->va_rdev = NODEV;
 	vap->va_size = fp->f_size;
 	vap->va_bytes = fp->f_allocated;
 	vap->va_atime = ntfs_nttimetounix(fp->f_times.t_access);

==== //depot/projects/mpsafetty/sys/fs/portalfs/portal_vnops.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  *
  *	@(#)portal_vnops.c	8.14 (Berkeley) 5/21/95
  *
- * $FreeBSD: src/sys/fs/portalfs/portal_vnops.c,v 1.75 2008/08/28 15:23:18 attilio Exp $
+ * $FreeBSD: src/sys/fs/portalfs/portal_vnops.c,v 1.77 2008/09/20 19:50:52 kib Exp $
  */
 
 /*
@@ -452,8 +452,6 @@
 	struct vnode *vp = ap->a_vp;
 	struct vattr *vap = ap->a_vap;
 
-	bzero(vap, sizeof(*vap));
-	vattr_null(vap);
 	vap->va_uid = 0;
 	vap->va_gid = 0;
 	vap->va_size = DEV_BSIZE;
@@ -463,9 +461,10 @@
 	vap->va_ctime = vap->va_mtime;
 	vap->va_gen = 0;
 	vap->va_flags = 0;
-	vap->va_rdev = 0;
+	vap->va_rdev = NODEV;
 	/* vap->va_qbytes = 0; */
 	vap->va_bytes = 0;
+	vap->va_filerev = 0;
 	/* vap->va_qsize = 0; */
 	if (vp->v_vflag & VV_ROOT) {
 		vap->va_type = VDIR;

==== //depot/projects/mpsafetty/sys/fs/pseudofs/pseudofs_vnops.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/fs/pseudofs/pseudofs_vnops.c,v 1.68 2008/08/28 15:23:18 attilio Exp $");
+__FBSDID("$FreeBSD: src/sys/fs/pseudofs/pseudofs_vnops.c,v 1.69 2008/09/20 19:50:52 kib Exp $");
 
 #include "opt_pseudofs.h"
 
@@ -191,12 +191,12 @@
 	if (!pfs_visible(curthread, pn, pvd->pvd_pid, &proc))
 		PFS_RETURN (ENOENT);
 
-	VATTR_NULL(vap);
 	vap->va_type = vn->v_type;
 	vap->va_fileid = pn_fileno(pn, pvd->pvd_pid);
 	vap->va_flags = 0;
 	vap->va_blocksize = PAGE_SIZE;
 	vap->va_bytes = vap->va_size = 0;
+	vap->va_filerev = 0;
 	vap->va_fsid = vn->v_mount->mnt_stat.f_fsid.val[0];
 	vap->va_nlink = 1;
 	nanotime(&vap->va_ctime);

==== //depot/projects/mpsafetty/sys/fs/smbfs/smbfs_node.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/fs/smbfs/smbfs_node.c,v 1.40 2008/08/28 15:23:18 attilio Exp $
+ * $FreeBSD: src/sys/fs/smbfs/smbfs_node.c,v 1.41 2008/09/20 19:49:15 kib Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -438,7 +438,7 @@
 	va->va_atime = va->va_ctime = va->va_mtime;	/* time file changed */
 	va->va_gen = VNOVAL;		/* generation number of file */
 	va->va_flags = 0;		/* flags defined for file */
-	va->va_rdev = VNOVAL;		/* device the special file represents */
+	va->va_rdev = NODEV;		/* device the special file represents */
 	va->va_bytes = va->va_size;	/* bytes of disk space held by file */
 	va->va_filerev = 0;		/* file modification number */
 	va->va_vaflags = 0;		/* operations flags */

==== //depot/projects/mpsafetty/sys/fs/tmpfs/tmpfs_vnops.c#4 (text+ko) ====

@@ -34,7 +34,7 @@
  * tmpfs vnode interface.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.20 2008/09/03 18:53:48 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.23 2008/09/20 19:50:52 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/fcntl.h>
@@ -344,8 +344,6 @@
 
 	node = VP_TO_TMPFS_NODE(vp);
 
-	VATTR_NULL(vap);
-
 	tmpfs_update(vp);
 
 	vap->va_type = vp->v_type;
@@ -364,11 +362,9 @@
 	vap->va_gen = node->tn_gen;
 	vap->va_flags = node->tn_flags;
 	vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ?
-		node->tn_rdev : VNOVAL;
+		node->tn_rdev : NODEV;
 	vap->va_bytes = round_page(node->tn_size);
-	vap->va_filerev = VNOVAL;
-	vap->va_vaflags = 0;
-	vap->va_spare = VNOVAL; /* XXX */
+	vap->va_filerev = 0;
 
 	return 0;
 }

==== //depot/projects/mpsafetty/sys/fs/udf/udf_vnops.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/fs/udf/udf_vnops.c,v 1.69 2008/05/16 22:31:17 markus Exp $
+ * $FreeBSD: src/sys/fs/udf/udf_vnops.c,v 1.70 2008/09/20 19:49:15 kib Exp $
  */
 
 /* udf_vnops.c */
@@ -291,7 +291,7 @@
 	udf_timetotimespec(&fentry->atime, &vap->va_atime);
 	udf_timetotimespec(&fentry->mtime, &vap->va_mtime);
 	vap->va_ctime = vap->va_mtime; /* XXX Stored as an Extended Attribute */
-	vap->va_rdev = 0; /* XXX */
+	vap->va_rdev = NODEV;
 	if (vp->v_type & VDIR) {
 		/*
 		 * Directories that are recorded within their ICB will show

==== //depot/projects/mpsafetty/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c,v 1.10 2008/08/28 15:23:18 attilio Exp $
+ * $FreeBSD: src/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c,v 1.12 2008/09/20 19:50:52 kib Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -240,7 +240,6 @@
 	/* extract the xfs vnode from the private data */
 	//xfs_vnode_t	*xvp = (xfs_vnode_t *)vp->v_data;
 
-	VATTR_NULL(vap);
 	memset(&va,0,sizeof(xfs_vattr_t));
 	va.va_mask = XFS_AT_STAT|XFS_AT_GENCOUNT|XFS_AT_XFLAGS;
 
@@ -273,15 +272,9 @@
 
 	/*
 	 * Fields with no direct equivalent in XFS
-	 * leave initialized by VATTR_NULL
 	 */
-#if 0
 	vap->va_filerev = 0;
-	vap->va_birthtime = va.va_ctime;
-	vap->va_vaflags = 0;
 	vap->va_flags = 0;
-	vap->va_spare = 0;
-#endif
 
 	return (0);
 }

==== //depot/projects/mpsafetty/sys/i386/i386/pmap.c#6 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.628 2008/09/19 03:33:49 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.629 2008/09/20 16:24:42 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -2861,10 +2861,10 @@
 
 /*
  * Tries to promote the 512 or 1024, contiguous 4KB page mappings that are
- * within a single page table page to a single 2- or 4MB page mapping.  For
- * promotion to occur, two conditions must be met: (1) the 4KB page mappings
- * must map aligned, contiguous physical memory and (2) the 4KB page mappings
- * must have identical characteristics. 
+ * within a single page table page (PTP) to a single 2- or 4MB page mapping.
+ * For promotion to occur, two conditions must be met: (1) the 4KB page
+ * mappings must map aligned, contiguous physical memory and (2) the 4KB page
+ * mappings must have identical characteristics.
  *
  * Managed (PG_MANAGED) mappings within the kernel address space are not
  * promoted.  The reason is that kernel PDEs are replicated in each pmap but
@@ -2876,15 +2876,21 @@
 {
 	pd_entry_t newpde;
 	pmap_t allpmaps_entry;
-	pt_entry_t *firstpte, oldpte, *pte;
+	pt_entry_t *firstpte, oldpte, pa, *pte;
 	vm_offset_t oldpteva;
-	vm_paddr_t pa;
 	vm_page_t mpte;
 
 	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+
+	/*
+	 * Examine the first PTE in the specified PTP.  Abort if this PTE is
+	 * either invalid, unused, or does not map the first 4KB physical page
+	 * within a 2- or 4MB page.
+	 */
 	firstpte = vtopte(trunc_4mpage(va));
+setpde:
 	newpde = *firstpte;
-	if ((newpde & (PG_A | PG_V)) != (PG_A | PG_V)) {
+	if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V)) {
 		pmap_pde_p_failures++;
 		CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x"
 		    " in pmap %p", va, pmap);
@@ -2896,17 +2902,27 @@
 		    " in pmap %p", va, pmap);
 		return;
 	}
-	if ((newpde & (PG_M | PG_RW)) == PG_RW)
+	if ((newpde & (PG_M | PG_RW)) == PG_RW) {
+		/*
+		 * When PG_M is already clear, PG_RW can be cleared without
+		 * a TLB invalidation.
+		 */
+		if (!atomic_cmpset_int((u_int *)firstpte, newpde, newpde &
+		    ~PG_RW))  
+			goto setpde;
 		newpde &= ~PG_RW;
+	}
 
 	/* 
-	 * Check all the ptes before promotion
+	 * Examine each of the other PTEs in the specified PTP.  Abort if this
+	 * PTE maps an unexpected 4KB physical page or does not have identical
+	 * characteristics to the first PTE.
 	 */
-	pa = newpde & PG_PS_FRAME;
-	for (pte = firstpte; pte < firstpte + NPTEPG; pte++) {
-retry:
+	pa = (newpde & (PG_PS_FRAME | PG_A | PG_V)) + NBPDR - PAGE_SIZE;
+	for (pte = firstpte + NPTEPG - 1; pte > firstpte; pte--) {
+setpte:
 		oldpte = *pte;
-		if ((oldpte & PG_FRAME) != pa) {
+		if ((oldpte & (PG_FRAME | PG_A | PG_V)) != pa) {
 			pmap_pde_p_failures++;
 			CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x"
 			    " in pmap %p", va, pmap);

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



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