From 47d818975b71d83ab1827deb7cf750cc5e2f479a Mon Sep 17 00:00:00 2001 From: Steve Passe Date: Sat, 24 May 1997 18:35:44 +0000 Subject: [PATCH] Move the printing of "cpu#%d" to AFTER the general panic argument string. When a panic occurs early in the SMP boot process 'cpunumber()' hangs, causing the panic string to be lost. Now the system appears to hang in 'breakpoint()', but at least the user sees the panic string before the hang. --- sys/kern/kern_shutdown.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index e4459594436..f424e1def2e 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 - * $Id: kern_shutdown.c,v 1.13 1997/02/22 09:39:10 peter Exp $ + * $Id: kern_shutdown.c,v 1.14 1997/04/26 11:46:14 peter Exp $ */ #include "opt_ddb.h" @@ -376,15 +376,14 @@ panic(const char *fmt, ...) else panicstr = fmt; -#ifdef SMP - printf("panic (cpu#%d): ", cpunumber()); -#else printf("panic: "); -#endif va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); printf("\n"); +#ifdef SMP + printf(" cpu#%d\n", cpunumber()); +#endif #if defined(DDB) if (debugger_on_panic)