svn commit: r235406 - in stable/9/sys: i386/conf kern

Andriy Gapon avg at FreeBSD.org
Sun May 13 17:05:55 UTC 2012


Author: avg
Date: Sun May 13 17:05:54 2012
New Revision: 235406
URL: http://svn.freebsd.org/changeset/base/235406

Log:
  MFC r228632: introduce cngrab/cnungrab stub calls in some places where they
  make sense

Modified:
  stable/9/sys/kern/kern_cons.c
  stable/9/sys/kern/kern_shutdown.c
  stable/9/sys/kern/subr_kdb.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)

Modified: stable/9/sys/kern/kern_cons.c
==============================================================================
--- stable/9/sys/kern/kern_cons.c	Sun May 13 17:04:46 2012	(r235405)
+++ stable/9/sys/kern/kern_cons.c	Sun May 13 17:05:54 2012	(r235406)
@@ -427,8 +427,10 @@ cnputc(int c)
 	if (console_pausing && c == '\n' && !kdb_active) {
 		for (cp = console_pausestr; *cp != '\0'; cp++)
 			cnputc(*cp);
+		cngrab();
 		if (cngetc() == '.')
 			console_pausing = 0;
+		cnungrab();
 		cnputc('\r');
 		for (cp = console_pausestr; *cp != '\0'; cp++)
 			cnputc(' ');

Modified: stable/9/sys/kern/kern_shutdown.c
==============================================================================
--- stable/9/sys/kern/kern_shutdown.c	Sun May 13 17:04:46 2012	(r235405)
+++ stable/9/sys/kern/kern_shutdown.c	Sun May 13 17:05:54 2012	(r235406)
@@ -440,6 +440,8 @@ kern_reboot(int howto)
 
 	print_uptime();
 
+	cngrab();
+
 	/*
 	 * Ok, now do things that assume all filesystem activity has
 	 * been completed.
@@ -610,6 +612,7 @@ panic(const char *fmt, ...)
 	if (newpanic) {
 		(void)vsnprintf(buf, sizeof(buf), fmt, ap);
 		panicstr = buf;
+		cngrab();
 		printf("panic: %s\n", buf);
 	} else {
 		printf("panic: ");

Modified: stable/9/sys/kern/subr_kdb.c
==============================================================================
--- stable/9/sys/kern/subr_kdb.c	Sun May 13 17:04:46 2012	(r235405)
+++ stable/9/sys/kern/subr_kdb.c	Sun May 13 17:05:54 2012	(r235406)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/cons.h>
 #include <sys/kdb.h>
 #include <sys/kernel.h>
 #include <sys/malloc.h>
@@ -617,6 +618,8 @@ kdb_trap(int type, int code, struct trap
 	makectx(tf, &kdb_pcb);
 	kdb_thr_select(curthread);
 
+	cngrab();
+
 	for (;;) {
 		handled = be->dbbe_trap(type, code);
 		if (be == kdb_dbbe)
@@ -627,6 +630,8 @@ kdb_trap(int type, int code, struct trap
 		printf("Switching to %s back-end\n", be->dbbe_name);
 	}
 
+	cnungrab();
+
 	kdb_active--;
 
 #ifdef SMP


More information about the svn-src-stable-9 mailing list