PERFORCE change 150646 for review

Ed Schouten ed at FreeBSD.org
Mon Sep 29 10:16:47 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=150646

Change 150646 by ed at ed_dull on 2008/09/29 10:16:25

	IFC.

Affected files ...

.. //depot/projects/mpsafetty/ObsoleteFiles.inc#14 integrate
.. //depot/projects/mpsafetty/bin/pkill/pkill.1#2 integrate
.. //depot/projects/mpsafetty/bin/pkill/pkill.c#2 integrate
.. //depot/projects/mpsafetty/gnu/lib/csu/Makefile#3 integrate
.. //depot/projects/mpsafetty/gnu/usr.bin/gdb/kgdb/trgt_i386.c#2 integrate
.. //depot/projects/mpsafetty/sbin/ipfw/ipfw.8#5 integrate
.. //depot/projects/mpsafetty/sbin/ipfw/ipfw2.c#5 integrate
.. //depot/projects/mpsafetty/sbin/setkey/setkey.8#2 integrate
.. //depot/projects/mpsafetty/share/examples/drivers/make_pseudo_driver.sh#3 integrate
.. //depot/projects/mpsafetty/share/man/man3/Makefile#2 integrate
.. //depot/projects/mpsafetty/share/man/man3/makedev.3#1 branch
.. //depot/projects/mpsafetty/share/man/man9/Makefile#8 integrate
.. //depot/projects/mpsafetty/share/man/man9/device_ids.9#2 delete
.. //depot/projects/mpsafetty/share/man/man9/make_dev.9#4 integrate
.. //depot/projects/mpsafetty/share/man/man9/spl.9#2 integrate
.. //depot/projects/mpsafetty/sys/amd64/amd64/mp_machdep.c#4 integrate
.. //depot/projects/mpsafetty/sys/amd64/include/smp.h#2 integrate
.. //depot/projects/mpsafetty/sys/arm/arm/pmap.c#2 integrate
.. //depot/projects/mpsafetty/sys/arm/at91/at91_mci.c#3 integrate
.. //depot/projects/mpsafetty/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#4 integrate
.. //depot/projects/mpsafetty/sys/conf/files.powerpc#3 integrate
.. //depot/projects/mpsafetty/sys/conf/files.sparc64#5 integrate
.. //depot/projects/mpsafetty/sys/conf/options.sparc64#4 integrate
.. //depot/projects/mpsafetty/sys/dev/cfe/cfe_console.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mmc/mmc.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mmc/mmcbrvar.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mmc/mmcreg.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mmc/mmcsd.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mmc/mmcvar.h#2 integrate
.. //depot/projects/mpsafetty/sys/geom/part/g_part.c#4 integrate
.. //depot/projects/mpsafetty/sys/geom/part/g_part_bsd.c#2 integrate
.. //depot/projects/mpsafetty/sys/geom/part/g_part_pc98.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/db_trace.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/mp_machdep.c#3 integrate
.. //depot/projects/mpsafetty/sys/i386/include/smp.h#3 integrate
.. //depot/projects/mpsafetty/sys/i386/xen/mp_machdep.c#4 integrate
.. //depot/projects/mpsafetty/sys/ia64/ia64/interrupt.c#2 integrate
.. //depot/projects/mpsafetty/sys/ia64/ia64/mp_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/ia64/ia64/sal.c#3 integrate
.. //depot/projects/mpsafetty/sys/ia64/include/smp.h#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_conf.c#8 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_shutdown.c#2 integrate
.. //depot/projects/mpsafetty/sys/mips/adm5120/if_admsw.c#3 integrate
.. //depot/projects/mpsafetty/sys/mips/include/param.h#2 integrate
.. //depot/projects/mpsafetty/sys/mips/include/smp.h#2 integrate
.. //depot/projects/mpsafetty/sys/mips/mips/mp_machdep.c#3 integrate
.. //depot/projects/mpsafetty/sys/mips/mips/pmap.c#2 integrate
.. //depot/projects/mpsafetty/sys/mips/mips/trap.c#2 integrate
.. //depot/projects/mpsafetty/sys/net80211/ieee80211_scan_sta.c#2 integrate
.. //depot/projects/mpsafetty/sys/netinet/ip_fw2.c#9 integrate
.. //depot/projects/mpsafetty/sys/powerpc/include/dbdma.h#3 integrate
.. //depot/projects/mpsafetty/sys/powerpc/include/smp.h#3 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powermac/ata_dbdma.c#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/ata_dbdma.h#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/ata_kauai.c#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powermac/ata_macio.c#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powermac/dbdma.c#3 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powerpc/cpu.c#4 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powerpc/intr_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powerpc/mp_machdep.c#3 integrate
.. //depot/projects/mpsafetty/sys/sparc64/pci/schizo.c#1 branch
.. //depot/projects/mpsafetty/sys/sparc64/pci/schizoreg.h#1 branch
.. //depot/projects/mpsafetty/sys/sparc64/pci/schizovar.h#1 branch
.. //depot/projects/mpsafetty/sys/sun4v/include/smp.h#2 integrate
.. //depot/projects/mpsafetty/sys/sys/pmc.h#2 integrate
.. //depot/projects/mpsafetty/sys/sys/systm.h#3 integrate
.. //depot/projects/mpsafetty/sys/sys/types.h#3 integrate
.. //depot/projects/mpsafetty/usr.sbin/Makefile#9 integrate

Differences ...

==== //depot/projects/mpsafetty/ObsoleteFiles.inc#14 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.162 2008/09/21 16:11:11 antoine Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.163 2008/09/28 20:15:45 ed Exp $
 #
 # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
 # directories (OLD_DIRS) which should get removed at an update. Recently
@@ -14,6 +14,12 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20080928: removal of inaccurate device_ids(9) manual page
+OLD_FILES+=usr/share/man/man9/device_ids.9.gz
+OLD_FILES+=usr/share/man/man9/major.9.gz
+OLD_FILES+=usr/share/man/man9/minor.9.gz
+OLD_FILES+=usr/share/man/man9/umajor.9.gz
+OLD_FILES+=usr/share/man/man9/uminor.9.gz
 # 20080917: removal of manpage for axed kernel primitive suser(9)
 OLD_FILES+=usr/share/man/man9/suser.9.gz
 OLD_FILES+=usr/share/man/man9/suser_cred.9.gz

==== //depot/projects/mpsafetty/bin/pkill/pkill.1#2 (text+ko) ====

@@ -1,6 +1,6 @@
 .\"	$NetBSD: pkill.1,v 1.8 2003/02/14 15:59:18 grant Exp $
 .\"
-.\" $FreeBSD: src/bin/pkill/pkill.1,v 1.1 2008/08/31 14:27:59 yar Exp $
+.\" $FreeBSD: src/bin/pkill/pkill.1,v 1.2 2008/09/28 16:44:15 ed Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -179,10 +179,9 @@
 Restrict matches to processes associated with a terminal in the
 comma-separated list
 .Ar tty .
-Terminal names may be of the form
-.Pa tty Ns Ar xx
-or the shortened form
-.Ar xx .
+The 
+.Pa /dev/
+prefix of the terminal names must be omitted.
 A single dash
 .Pq Ql -
 matches processes not associated with a terminal.

==== //depot/projects/mpsafetty/bin/pkill/pkill.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/pkill/pkill.c,v 1.1 2008/08/31 14:27:59 yar Exp $");
+__FBSDID("$FreeBSD: src/bin/pkill/pkill.c,v 1.2 2008/09/28 16:44:15 ed Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -607,12 +607,11 @@
 	struct passwd *pw;
 	struct group *gr;
 	struct stat st;
-	const char *cp, *prefix;
+	const char *cp;
 	char *sp, *ep, buf[MAXPATHLEN];
 	int empty;
 
 	empty = 1;
-	prefix = _PATH_DEV;
 
 	while ((sp = strsep(&src, ",")) != NULL) {
 		if (*sp == '\0')
@@ -673,11 +672,9 @@
 				cp = "console";
 			} else {
 				cp = sp;
-				if (strncmp(sp, "tty", 3) != 0)
-					prefix = _PATH_TTY;
 			}
 
-			snprintf(buf, sizeof(buf), "%s%s", prefix, cp);
+			snprintf(buf, sizeof(buf), _PATH_DEV "%s", cp);
 
 			if (stat(buf, &st) == -1) {
 				if (errno == ENOENT) {

==== //depot/projects/mpsafetty/gnu/lib/csu/Makefile#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/lib/csu/Makefile,v 1.30 2008/09/26 15:00:18 marcel Exp $
+# $FreeBSD: src/gnu/lib/csu/Makefile,v 1.31 2008/09/28 19:17:54 marcel Exp $
 
 GCCDIR=	${.CURDIR}/../../../contrib/gcc
 GCCLIB=	${.CURDIR}/../../../contrib/gcclibs
@@ -25,7 +25,7 @@
 BEGINSRC=	crtbegin.asm
 ENDSRC=		crtend.asm
 CFLAGS+=	-x assembler-with-cpp	# Ugly hack
-CFLAGS+=	-D_OSRELDATE_H -include osreldate.h
+CFLAGS+=	-include osreldate.h
 .undef SRCS				# hack for 'make depend'
 .endif
 .if ${MACHINE_ARCH} == "powerpc"

==== //depot/projects/mpsafetty/gnu/usr.bin/gdb/kgdb/trgt_i386.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.12 2008/05/09 19:00:40 jhb Exp $");
+__FBSDID("$FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.13 2008/09/27 15:58:37 kib Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -242,10 +242,14 @@
 };
 
 struct kgdb_frame_cache {
-	int		intrframe;
+	int		frame_type;
 	CORE_ADDR	pc;
 	CORE_ADDR	sp;
 };
+#define	FT_NORMAL		1
+#define	FT_INTRFRAME		2
+#define	FT_INTRTRAPFRAME	3
+#define	FT_TIMERFRAME		4
 
 static int kgdb_trgt_frame_offset[15] = {
 	offsetof(struct trapframe, tf_eax),
@@ -278,7 +282,17 @@
 		*this_cache = cache;
 		cache->pc = frame_func_unwind(next_frame);
 		find_pc_partial_function(cache->pc, &pname, NULL, NULL);
-		cache->intrframe = (pname[0] == 'X') ? 1 : 0;
+		if (pname[0] != 'X')
+			cache->frame_type = FT_NORMAL;
+		else if (strcmp(pname, "Xtimerint") == 0)
+			cache->frame_type = FT_TIMERFRAME;
+		else if (strcmp(pname, "Xcpustop") == 0 ||
+		    strcmp(pname, "Xrendezvous") == 0 ||
+		    strcmp(pname, "Xipi_intr_bitmap_handler") == 0 ||
+		    strcmp(pname, "Xlazypmap") == 0)
+			cache->frame_type = FT_INTRTRAPFRAME;
+		else
+			cache->frame_type = FT_INTRFRAME;
 		frame_unwind_register(next_frame, SP_REGNUM, buf);
 		cache->sp = extract_unsigned_integer(buf,
 		    register_size(current_gdbarch, SP_REGNUM));
@@ -321,7 +335,23 @@
 		return;
 
 	cache = kgdb_trgt_frame_cache(next_frame, this_cache);
-	*addrp = cache->sp + ofs + (cache->intrframe ? 4 : 0);
+	switch (cache->frame_type) {
+	case FT_NORMAL:
+		break;
+	case FT_INTRFRAME:
+		ofs += 4;
+		break;
+	case FT_TIMERFRAME:
+		break;
+	case FT_INTRTRAPFRAME:
+		ofs -= ofs_fix;
+		break;
+	default:
+		fprintf_unfiltered(gdb_stderr, "Correct FT_XXX frame offsets "
+		   "for %d\n", cache->frame_type);
+		break;
+	}
+	*addrp = cache->sp + ofs;
 	*lvalp = lval_memory;
 	target_read_memory(*addrp, valuep, regsz);
 }

==== //depot/projects/mpsafetty/sbin/ipfw/ipfw.8#5 (text+ko) ====

@@ -1,7 +1,7 @@
 .\"
-.\" $FreeBSD: src/sbin/ipfw/ipfw.8,v 1.216 2008/08/27 15:30:09 ivoras Exp $
+.\" $FreeBSD: src/sbin/ipfw/ipfw.8,v 1.217 2008/09/27 15:09:00 rik Exp $
 .\"
-.Dd November 26, 2007
+.Dd September 27, 2008
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -49,9 +49,13 @@
 .Nm
 .Cm table Ar number Cm delete Ar addr Ns Op / Ns Ar masklen
 .Nm
-.Cm table Ar number Cm flush
+.Cm table
+.Brq Ar number | all
+.Cm flush
 .Nm
-.Cm table Ar number Cm list
+.Cm table
+.Brq Ar number | all
+.Cm list
 .Pp
 .Nm
 .Brq Cm pipe | queue
@@ -2242,6 +2246,11 @@
 .It Va net.inet.ip.fw.debug : No 1
 Controls debugging messages produced by
 .Nm .
+.It Va net.inet.ip.fw.default_rule : No 65535
+The default rule number (read-only).
+By the design of
+.Nm , the default rule is the last one, so its number
+can also serve as the highest number allowed for a rule.
 .It Va net.inet.ip.fw.dyn_buckets : No 256
 The number of buckets in the hash table for dynamic rules.
 Must be a power of 2, up to 65536.
@@ -2295,6 +2304,8 @@
 node is not passed though the firewall again.
 Otherwise, after an action, the packet is
 reinjected into the firewall at the next rule.
+.It Va net.inet.ip.fw.tables_max : No 128
+Maximum number of tables (read-only).
 .It Va net.inet.ip.fw.verbose : No 1
 Enables verbose messages.
 .It Va net.inet.ip.fw.verbose_limit : No 0

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

@@ -17,7 +17,7 @@
  *
  * NEW command line interface for IP firewall facility
  *
- * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.128 2008/09/22 04:12:27 keramida Exp $
+ * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.130 2008/09/27 15:58:54 rik Exp $
  */
 
 #include <sys/param.h>
@@ -2721,6 +2721,7 @@
 "set [disable N... enable N...] | move [rule] X to Y | swap X Y | show\n"
 "set N {show|list|zero|resetlog|delete} [N{,N}] | flush\n"
 "table N {add ip[/bits] [value] | delete ip[/bits] | flush | list}\n"
+"table all {flush | list}\n"
 "\n"
 "RULE-BODY:	check-state [PARAMS] | ACTION [PARAMS] ADDR [OPTION_LIST]\n"
 "ACTION:	check-state | allow | count | deny | unreach{,6} CODE |\n"
@@ -5856,22 +5857,24 @@
 	free(av);
 }
 
-static void table_list(ipfw_table_entry ent);
+static void table_list(ipfw_table_entry ent, int need_header);
 
 /*
  * This one handles all table-related commands
  * 	ipfw table N add addr[/masklen] [value]
  * 	ipfw table N delete addr[/masklen]
- * 	ipfw table N flush
- * 	ipfw table N list
+ * 	ipfw table {N | all} flush
+ * 	ipfw table {N | all} list
  */
 static void
 table_handler(int ac, char *av[])
 {
 	ipfw_table_entry ent;
 	int do_add;
+	int is_all;
 	size_t len;
 	char *p;
+	uint32_t a;
 	uint32_t tables_max;
 
 	len = sizeof(tables_max);
@@ -5889,13 +5892,22 @@
 	ac--; av++;
 	if (ac && isdigit(**av)) {
 		ent.tbl = atoi(*av);
+		is_all = 0;
+		ac--; av++;
+	} else if (ac && _substrcmp(*av, "all") == 0) {
+		ent.tbl = 0;
+		is_all = 1;
 		ac--; av++;
 	} else
-		errx(EX_USAGE, "table number required");
+		errx(EX_USAGE, "table number or 'all' keyword required");
 	if (ent.tbl >= tables_max)
 		errx(EX_USAGE, "The table number exceeds the maximum allowed "
 			"value (%d)", tables_max - 1);
 	NEED1("table needs command");
+	if (is_all && _substrcmp(*av, "list") != 0
+		   && _substrcmp(*av, "flush") != 0)
+		errx(EX_USAGE, "table number required");
+
 	if (_substrcmp(*av, "add") == 0 ||
 	    _substrcmp(*av, "delete") == 0) {
 		do_add = **av == 'a';
@@ -5945,16 +5957,23 @@
 			}
 		}
 	} else if (_substrcmp(*av, "flush") == 0) {
-		if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, sizeof(ent.tbl)) < 0)
-			err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)");
+		a = is_all ? tables_max : (ent.tbl + 1);
+		do {
+			if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl,
+			    sizeof(ent.tbl)) < 0)
+				err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)");
+		} while (++ent.tbl < a);
 	} else if (_substrcmp(*av, "list") == 0) {
-		table_list(ent);
+		a = is_all ? tables_max : (ent.tbl + 1);
+		do {
+			table_list(ent, is_all);
+		} while (++ent.tbl < a);
 	} else
 		errx(EX_USAGE, "invalid table command %s", *av);
 }
 
 static void
-table_list(ipfw_table_entry ent)
+table_list(ipfw_table_entry ent, int need_header)
 {
 	ipfw_table *tbl;
 	socklen_t l;
@@ -5976,6 +5995,8 @@
 	tbl->tbl = ent.tbl;
 	if (do_cmd(IP_FW_TABLE_LIST, tbl, (uintptr_t)&l) < 0)
 		err(EX_OSERR, "getsockopt(IP_FW_TABLE_LIST)");
+	if (tbl->cnt && need_header)
+		printf("---table(%d)---\n", tbl->tbl);
 	for (a = 0; a < tbl->cnt; a++) {
 		unsigned int tval;
 		tval = tbl->ent[a].value;

==== //depot/projects/mpsafetty/sbin/setkey/setkey.8#2 (text+ko) ====

@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/setkey/setkey.8,v 1.38 2007/05/09 19:37:00 gnn Exp $
+.\" $FreeBSD: src/sbin/setkey/setkey.8,v 1.39 2008/09/29 05:31:27 maxim Exp $
 .\"
 .Dd May 13, 2006
 .Dt SETKEY 8
@@ -475,7 +475,7 @@
 .Li ah ,
 .Li esp
 or
-.Li ipcomp
+.Li ipcomp .
 The
 .Ar mode
 is either

==== //depot/projects/mpsafetty/share/examples/drivers/make_pseudo_driver.sh#3 (text+ko) ====

@@ -6,7 +6,7 @@
 #
 # Trust me, RUN THIS SCRIPT :)
 #
-# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.14 2008/09/22 16:10:12 ed Exp $
+# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.15 2008/09/27 16:52:57 ed Exp $
 #
 #-------cut here------------------
 
@@ -168,7 +168,7 @@
  * device  specific Misc defines
  */
 #define BUFFERSIZE 1024
-#define UNIT(dev) minor(dev)	/* assume one minor number per unit */
+#define UNIT(dev) dev2unit(dev)	/* assume one minor number per unit */
 
 /*
  * One of these per allocated device

==== //depot/projects/mpsafetty/share/man/man3/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.2 (Berkeley) 12/13/93
-# $FreeBSD: src/share/man/man3/Makefile,v 1.48 2008/05/22 14:40:03 ed Exp $
+# $FreeBSD: src/share/man/man3/Makefile,v 1.49 2008/09/28 20:15:45 ed Exp $
 
 .include <bsd.own.mk>
 
@@ -8,6 +8,7 @@
 		end.3 \
 		fpgetround.3 \
 		intro.3 \
+		makedev.3 \
 		${PTHREAD_MAN} \
 		queue.3 \
 		siginfo.3 \
@@ -36,6 +37,8 @@
 		fpgetround.3 fpsetmask.3 \
 		fpgetround.3 fpsetprec.3 \
 		fpgetround.3 fpsetround.3
+MLINKS+=	makedev.3 major.3 \
+		makedev.3 minor.3
 MLINKS+=	${PTHREAD_MLINKS}
 MLINKS+=	queue.3 LIST_EMPTY.3 \
 		queue.3 LIST_ENTRY.3 \

==== //depot/projects/mpsafetty/share/man/man9/Makefile#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/man/man9/Makefile,v 1.341 2008/09/17 15:49:44 attilio Exp $
+# $FreeBSD: src/share/man/man9/Makefile,v 1.342 2008/09/28 20:15:45 ed Exp $
 
 MAN=	accept_filter.9 \
 	accf_data.9 \
@@ -82,7 +82,6 @@
 	device_get_sysctl.9 \
 	device_get_unit.9 \
 	DEVICE_IDENTIFY.9 \
-	device_ids.9 \
 	device_printf.9 \
 	DEVICE_PROBE.9 \
 	device_probe_and_attach.9 \
@@ -570,10 +569,6 @@
 	device_get_state.9 device_unbusy.9
 MLINKS+=device_get_sysctl.9 device_get_sysctl_ctx.9 \
 	device_get_sysctl.9 device_get_sysctl_tree.9
-MLINKS+=device_ids.9 major.9 \
-	device_ids.9 minor.9 \
-	device_ids.9 umajor.9 \
-	device_ids.9 uminor.9
 MLINKS+=device_quiet.9 device_is_quiet.9 \
 	device_quiet.9 device_verbose.9
 MLINKS+=device_set_desc.9 device_get_desc.9 \

==== //depot/projects/mpsafetty/share/man/man9/make_dev.9#4 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/make_dev.9,v 1.25 2008/09/26 14:31:24 ed Exp $
+.\" $FreeBSD: src/share/man/man9/make_dev.9,v 1.26 2008/09/28 20:15:45 ed Exp $
 .\"
-.Dd September 8, 2008
+.Dd September 28, 2008
 .Os
 .Dt MAKE_DEV 9
 .Sh NAME
@@ -186,7 +186,9 @@
 These are designed to replace the
 .Fa unit
 argument to
-.Fn make_dev .
+.Fn make_dev ,
+which can be obtained with
+.Fn dev2unit .
 .Pp
 The
 .Fn destroy_dev

==== //depot/projects/mpsafetty/share/man/man9/spl.9#2 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/spl.9,v 1.20 2005/06/28 20:15:18 hmp Exp $
+.\" $FreeBSD: src/share/man/man9/spl.9,v 1.21 2008/09/28 03:45:16 imp Exp $
 .\"
 .Dd July 21, 1996
 .Os
@@ -74,6 +74,15 @@
 See
 .Xr mutex 9
 for more information.
+The API is now a complete NOP.
+This man page documents historical behavior so you can understand the
+code locking that the spl did when converting code from versions of the
+kernel prior to
+.Fx 5.0 .
+The examples in this man page are also obsolete and should not be viewed
+as documenting 
+.Fx 5.0 
+and newer.
 .Ef
 .Pp
 The
@@ -211,6 +220,9 @@
 the system.
 The historical number scheme can be considered as a
 simple linearly ordered set of interrupt priority groups.
+.Pp
+.Fx 5.0 eliminated spl entirely in favor of locking primitives which scale
+to more than one processor.
 .Sh AUTHORS
 This manual page was written by
 .An J\(:org Wunsch .

==== //depot/projects/mpsafetty/sys/amd64/amd64/mp_machdep.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.293 2008/09/08 09:59:05 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.294 2008/09/28 18:34:14 marius Exp $");
 
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
@@ -1013,21 +1013,6 @@
 }
 
 /*
- * send an IPI INTerrupt containing 'vector' to all CPUs, including myself
- */
-void
-ipi_all(u_int ipi)
-{
-
-	if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) {
-		ipi_selected(all_cpus, ipi);
-		return;
-	}
-	CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
-	lapic_ipi_vectored(ipi, APIC_IPI_DEST_ALL);
-}
-
-/*
  * send an IPI to all CPUs EXCEPT myself
  */
 void
@@ -1042,21 +1027,6 @@
 	lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS);
 }
 
-/*
- * send an IPI to myself
- */
-void
-ipi_self(u_int ipi)
-{
-
-	if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) {
-		ipi_selected(PCPU_GET(cpumask), ipi);
-		return;
-	}
-	CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi);
-	lapic_ipi_vectored(ipi, APIC_IPI_DEST_SELF);
-}
-
 #ifdef STOP_NMI
 /*
  * send NMI IPI to selected CPUs

==== //depot/projects/mpsafetty/sys/amd64/include/smp.h#2 (text+ko) ====

@@ -6,7 +6,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  *
- * $FreeBSD: src/sys/amd64/include/smp.h,v 1.92 2008/03/02 07:58:40 jeff Exp $
+ * $FreeBSD: src/sys/amd64/include/smp.h,v 1.93 2008/09/28 18:34:14 marius Exp $
  *
  */
 
@@ -55,9 +55,7 @@
 void	cpustop_handler(void);
 void	init_secondary(void);
 void	ipi_selected(u_int cpus, u_int ipi);
-void	ipi_all(u_int ipi);
 void	ipi_all_but_self(u_int ipi);
-void	ipi_self(u_int ipi);
 void 	ipi_bitmap_handler(struct trapframe frame);
 u_int	mp_bootaddress(u_int);
 int	mp_grab_cpu_hlt(void);

==== //depot/projects/mpsafetty/sys/arm/arm/pmap.c#2 (text+ko) ====

@@ -147,7 +147,7 @@
 #include "opt_vm.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.101 2008/05/18 04:16:55 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.102 2008/09/28 05:36:25 imp Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -2592,7 +2592,6 @@
 	cpu_tlb_flushD();
 	cpu_cpwait();
 	kernel_vm_end = pmap_curmaxkvaddr;
-
 }
 
 

==== //depot/projects/mpsafetty/sys/arm/at91/at91_mci.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.5 2008/09/05 22:30:59 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.6 2008/09/28 23:37:56 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -642,6 +642,9 @@
 	case MMCBR_IVAR_VDD:
 		*(int *)result = sc->host.ios.vdd;
 		break;
+	case MMCBR_IVAR_CAPS:
+		*(int *)result = sc->host.ios.caps;
+		break;
 	}
 	return (0);
 }
@@ -678,9 +681,11 @@
 	case MMCBR_IVAR_VDD:
 		sc->host.ios.vdd = value;
 		break;
+	/* These are read-only */
 	case MMCBR_IVAR_HOST_OCR:
 	case MMCBR_IVAR_F_MIN:
 	case MMCBR_IVAR_F_MAX:
+	case MMCBR_IVAR_CAPS:
 		return (EINVAL);
 	}
 	return (0);

==== //depot/projects/mpsafetty/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#4 (text+ko) ====

@@ -18,7 +18,7 @@
  *
  * CDDL HEADER END
  *
- * $FreeBSD: src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c,v 1.7 2008/09/27 08:51:18 ed Exp $
+ * $FreeBSD: src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c,v 1.8 2008/09/27 17:52:48 jb Exp $
  */
 
 /*
@@ -12815,7 +12815,11 @@
 	state = ddi_get_soft_state(dtrace_softstate, minor);
 #else
 	if (dev != NULL) {
-		cr = dev->si_cred;
+		/*
+		 * Disable this until we have the ability to set user
+		 * credentials for DTrace.
+		 * cr = dev->si_cred;
+		 */
 		m = dev2unit(dev);
 		}
 

==== //depot/projects/mpsafetty/sys/conf/files.powerpc#3 (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.powerpc,v 1.80 2008/08/26 10:41:49 raj Exp $
+# $FreeBSD: src/sys/conf/files.powerpc,v 1.81 2008/09/27 15:13:44 nwhitehorn Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -109,6 +109,7 @@
 powerpc/ofw/ofw_syscons.c	optional	sc aim
 powerpc/powermac/ata_kauai.c	optional	powermac ata
 powerpc/powermac/ata_macio.c	optional	powermac ata
+powerpc/powermac/ata_dbdma.c	optional	powermac ata
 powerpc/powermac/dbdma.c	optional	powermac pci
 powerpc/powermac/grackle.c	optional	powermac pci
 powerpc/powermac/hrowpic.c	optional	powermac pci

==== //depot/projects/mpsafetty/sys/conf/files.sparc64#5 (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.99 2008/09/20 11:34:18 marius Exp $
+# $FreeBSD: src/sys/conf/files.sparc64,v 1.100 2008/09/28 00:07:05 marius Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -84,6 +84,7 @@
 sparc64/pci/ofw_pcib_subr.c	optional	pci
 sparc64/pci/ofw_pcibus.c	optional	pci
 sparc64/pci/psycho.c		optional	pci
+sparc64/pci/schizo.c		optional	pci
 sparc64/sbus/dma_sbus.c		optional	sbus
 sparc64/sbus/sbus.c		optional	sbus
 sparc64/sbus/lsi64854.c		optional	sbus

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

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.sparc64,v 1.17 2008/09/20 11:46:07 marius Exp $
+# $FreeBSD: src/sys/conf/options.sparc64,v 1.18 2008/09/28 00:07:05 marius Exp $
 
 GFB_DEBUG		opt_gfb.h
 GFB_NO_FONT_LOADING	opt_gfb.h
@@ -24,5 +24,7 @@
 DEBUGGER_ON_POWERFAIL	opt_psycho.h
 PSYCHO_DEBUG		opt_psycho.h
 
+SCHIZO_DEBUG		opt_schizo.h
+
 SUNKBD_DFLT_KEYMAP	opt_sunkbd.h
 SUNKBD_EMULATE_ATKBD	opt_sunkbd.h

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

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cfe/cfe_console.c,v 1.3 2008/09/26 05:37:54 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cfe/cfe_console.c,v 1.4 2008/09/28 03:33:01 imp Exp $");
 
 #include "opt_comconsole.h"
 
@@ -126,7 +126,7 @@
 		if (len == 0)
 			break;
 		while (cfe_write(conhandle, buf, len) == 0)
-			;
+			continue;
 	}
 }
 
@@ -190,7 +190,7 @@
 	unsigned char ch;
 
 	while ((result = cfe_read(conhandle, &ch, 1)) == 0)
-		;
+		continue;
 
 	if (result > 0) {
 #if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER)
@@ -228,7 +228,7 @@
 
 	cbuf = c;
 	while (cfe_write(conhandle, &cbuf, 1) == 0)
-		;
+		continue;
 }
 
 SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, cn_drvinit, NULL);

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

@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mmc/mmc.c,v 1.4 2007/06/05 17:04:44 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mmc/mmc.c,v 1.11 2008/09/29 01:32:21 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -86,6 +86,7 @@
 	enum mmc_card_mode mode;
 	struct mmc_cid cid;	/* cid decoded */
 	struct mmc_csd csd;	/* csd decoded */
+	u_char read_only;	/* True when the device is read-only */
 };
 
 #define CMD_RETRIES	3
@@ -97,14 +98,15 @@
 
 #define MMC_LOCK(_sc)		mtx_lock(&(_sc)->sc_mtx)
 #define	MMC_UNLOCK(_sc)		mtx_unlock(&(_sc)->sc_mtx)
-#define MMC_LOCK_INIT(_sc) \
-	mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \
+#define MMC_LOCK_INIT(_sc)					\
+	mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev),	\
 	    "mmc", MTX_DEF)
 #define MMC_LOCK_DESTROY(_sc)	mtx_destroy(&_sc->sc_mtx);
 #define MMC_ASSERT_LOCKED(_sc)	mtx_assert(&_sc->sc_mtx, MA_OWNED);
 #define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
 
 static void mmc_delayed_attach(void *);
+static void mmc_power_down(struct mmc_softc *sc);
 static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd,
     int retries);
 static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode,
@@ -120,7 +122,7 @@
 mmc_probe(device_t dev)
 {
 
-	device_set_desc(dev, "mmc/sd bus");
+	device_set_desc(dev, "MMC/SD bus");
 	return (0);
 }
 
@@ -160,6 +162,7 @@
 		free(ivar, M_DEVBUF);
 	}
 	free(kids, M_TEMP);
+	mmc_power_down(sc);
 
 	MMC_LOCK_DESTROY(sc);
 
@@ -173,7 +176,7 @@
 	int err;
 	int rca;
 
-	err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), dev);
+	err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev);
 	if (err)
 		return (err);
 	sc = device_get_softc(busdev);
@@ -184,24 +187,29 @@
 	MMC_UNLOCK(sc);
 
 	if (busdev != dev) {
-		// Keep track of the last rca that we've selected.  If
-		// we're asked to do it again, don't.  We never unselect
-		// unless the bus code itself wants the mmc bus.
+		/*
+		 * Keep track of the last rca that we've selected.  If
+		 * we're asked to do it again, don't.  We never
+		 * unselect unless the bus code itself wants the mmc
+		 * bus, and constantly reselecting causes problems.
+		 */
 		rca = mmc_get_rca(dev);
 		if (sc->last_rca != rca) {
 			mmc_wait_for_command(sc, MMC_SELECT_CARD, rca << 16,
 			    MMC_RSP_R1 | MMC_CMD_AC, NULL, CMD_RETRIES);
 			sc->last_rca = rca;
 		}
-		// XXX should set bus width here?
+		/* XXX should set bus width here? */
 	} else {
-		// If there's a card selected, stand down.
+		/*
+		 * If there's a card selected, stand down.
+		 */
 		if (sc->last_rca != 0) {
 			mmc_wait_for_command(sc, MMC_SELECT_CARD, 0,
 			    MMC_RSP_R1 | MMC_CMD_AC, NULL, CMD_RETRIES);
 			sc->last_rca = 0;
 		}
-		// XXX should set bus width here?
+		/* XXX should set bus width here? */
 	}
 
 	return (0);
@@ -221,7 +229,7 @@
 	if (sc->owner != dev)
 		panic("mmc: you don't own the bus.  game over.");
 	MMC_UNLOCK(sc);
-	err = MMCBR_RELEASE_HOST(device_get_parent(busdev), dev);
+	err = MMCBR_RELEASE_HOST(device_get_parent(busdev), busdev);
 	if (err)
 		return (err);
 	MMC_LOCK(sc);
@@ -239,8 +247,8 @@
 static uint32_t
 mmc_select_vdd(struct mmc_softc *sc, uint32_t ocr)
 {
-    // XXX
-	return ocr;
+
+	return ocr & MMC_OCR_VOLTAGE;
 }
 
 static int
@@ -259,7 +267,7 @@
 {
 	struct mmc_softc *sc;
 
-//	printf("Wakeup for req %p done_data %p\n", req, req->done_data);
+/*	printf("Wakeup for req %p done_data %p\n", req, req->done_data); */
 	sc = (struct mmc_softc *)req->done_data;
 	MMC_LOCK(sc);
 	req->flags |= MMC_REQ_DONE;
@@ -274,14 +282,14 @@
 
 	req->done = mmc_wakeup;
 	req->done_data = sc;
-//	printf("Submitting request %p sc %p\n", req, sc);
+/*	printf("Submitting request %p sc %p\n", req, sc); */
 	MMCBR_REQUEST(device_get_parent(sc->dev), sc->dev, req);
 	MMC_LOCK(sc);
 	do {
 		err = msleep(req, &sc->sc_mtx, PZERO | PCATCH, "mmcreq",
 		    hz / 10);
 	} while (!(req->flags & MMC_REQ_DONE) && err == EAGAIN);
-//	printf("Request %p done with error %d\n", req, err);
+/*	printf("Request %p done with error %d\n", req, err); */
 	MMC_UNLOCK(sc);
 	return (err);
 }
@@ -304,7 +312,7 @@
 	cmd->retries = retries;
 	cmd->data = NULL;
 	mreq.cmd = cmd;
-//	printf("CMD: %x ARG %x\n", cmd->opcode, cmd->arg);
+/*	printf("CMD: %x ARG %x\n", cmd->opcode, cmd->arg); */
 	mmc_wait_for_req(sc, &mreq);
 	return (cmd->error);
 }
@@ -453,7 +461,19 @@
 	mmc_ms_delay(2);
 }
 
-// I wonder if the following is endian safe.
+static void
+mmc_power_down(struct mmc_softc *sc)
+{
+	device_t dev = sc->dev;
+
+	mmcbr_set_bus_mode(dev, opendrain);
+	mmcbr_set_chip_select(dev, cs_dontcare);
+	mmcbr_set_bus_width(dev, bus_width_1);
+	mmcbr_set_power_mode(dev, power_off);
+	mmcbr_set_clock(dev, 0);
+	mmcbr_update_ios(dev);
+}
+
 static uint32_t

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


More information about the p4-projects mailing list