summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/consconfig.c24
-rw-r--r--usr/src/uts/common/os/logsubr.c13
-rw-r--r--usr/src/uts/common/os/panic.c11
-rw-r--r--usr/src/uts/common/sys/log.h8
-rw-r--r--usr/src/uts/i86pc/os/machdep.c11
-rw-r--r--usr/src/uts/intel/ia32/ml/modstubs.s1
-rw-r--r--usr/src/uts/sparc/ml/modstubs.s1
-rw-r--r--usr/src/uts/sun4u/os/mach_cpu_states.c12
-rw-r--r--usr/src/uts/sun4v/os/mach_cpu_states.c12
9 files changed, 45 insertions, 48 deletions
diff --git a/usr/src/uts/common/io/consconfig.c b/usr/src/uts/common/io/consconfig.c
index 4688ae610f..6740bcf031 100644
--- a/usr/src/uts/common/io/consconfig.c
+++ b/usr/src/uts/common/io/consconfig.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -57,8 +58,7 @@
#include <sys/errno.h>
#include <sys/devops.h>
#include <sys/note.h>
-#include <sys/log.h>
-#include <sys/consdev.h>
+
/*
* On supported configurations, the firmware defines the keyboard and mouse
@@ -129,17 +129,3 @@ consconfig_get_usb_ms_path(void) {
return (i_ddi_strdup(usb_ms_path, KM_SLEEP));
return (NULL);
}
-
-void
-consconfig_teardown(void)
-{
- /*
- * rconsvp is set to NULL to ensure that output messages
- * are sent to the underlying "hardware" device using the
- * monitor's printf routine since we are in the process of
- * either rebooting or halting the machine.
- */
- rconsvp = NULL;
-
- log_flushall();
-}
diff --git a/usr/src/uts/common/os/logsubr.c b/usr/src/uts/common/os/logsubr.c
index da7536a071..729db9a130 100644
--- a/usr/src/uts/common/os/logsubr.c
+++ b/usr/src/uts/common/os/logsubr.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -252,7 +252,7 @@ log_init(void)
printf("\rSunOS Release %s Version %s %u-bit\n",
utsname.release, utsname.version, NBBY * (uint_t)sizeof (void *));
printf("Copyright 1983-2007 Sun Microsystems, Inc. "
- "All rights reserved.\nUse is subject to license terms.\n");
+ "All rights reserved.\nUse is subject to license terms.\n");
#ifdef DEBUG
printf("DEBUG enabled\n");
#endif
@@ -742,15 +742,6 @@ log_printq(queue_t *qfirst)
} while ((qlast = q) != qfirst);
}
-void
-log_flushall()
-{
- if (log_intrq != NULL)
- log_flushq(log_intrq);
- if (log_consq != NULL && log_consq != log_backlogq)
- log_printq(log_consq);
-}
-
/* ARGSUSED */
static int
log_cons_constructor(void *buf, void *cdrarg, int kmflags)
diff --git a/usr/src/uts/common/os/panic.c b/usr/src/uts/common/os/panic.c
index 54a922a2a3..c35f9528d7 100644
--- a/usr/src/uts/common/os/panic.c
+++ b/usr/src/uts/common/os/panic.c
@@ -300,7 +300,16 @@ panicsys(const char *format, va_list alist, struct regs *rp, int on_panic_stack)
(void) FTRACE_STOP();
(void) callb_execute_class(CB_CL_PANIC, NULL);
- log_flushall();
+ if (log_intrq != NULL)
+ log_flushq(log_intrq);
+
+ /*
+ * If log_consq has been initialized and syslogd has started,
+ * print any messages in log_consq that haven't been consumed.
+ */
+ if (log_consq != NULL && log_consq != log_backlogq)
+ log_printq(log_consq);
+
fm_banner();
#if defined(__x86)
diff --git a/usr/src/uts/common/sys/log.h b/usr/src/uts/common/sys/log.h
index 8ab867d1cb..2d1fb46b73 100644
--- a/usr/src/uts/common/sys/log.h
+++ b/usr/src/uts/common/sys/log.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -114,7 +115,6 @@ extern void log_flushq(queue_t *);
extern void log_printq(queue_t *);
extern log_t *log_alloc(minor_t);
extern void log_free(log_t *);
-extern void log_flushall();
#endif /* _KERNEL */
diff --git a/usr/src/uts/i86pc/os/machdep.c b/usr/src/uts/i86pc/os/machdep.c
index 94e0009635..dfb3f8efd2 100644
--- a/usr/src/uts/i86pc/os/machdep.c
+++ b/usr/src/uts/i86pc/os/machdep.c
@@ -156,7 +156,6 @@ void debug_enter(char *);
extern void pm_cfb_check_and_powerup(void);
extern void pm_cfb_rele(void);
-extern void consconfig_teardown();
/*
* Machine dependent code to reboot.
@@ -178,6 +177,14 @@ mdboot(int cmd, int fcn, char *mdep, boolean_t invoke_cb)
}
/*
+ * XXX - rconsvp is set to NULL to ensure that output messages
+ * are sent to the underlying "hardware" device using the
+ * monitor's printf routine since we are in the process of
+ * either rebooting or halting the machine.
+ */
+ rconsvp = NULL;
+
+ /*
* Print the reboot message now, before pausing other cpus.
* There is a race condition in the printing support that
* can deadlock multiprocessor machines.
@@ -230,8 +237,6 @@ mdboot(int cmd, int fcn, char *mdep, boolean_t invoke_cb)
mutex_exit(&cpu_lock);
}
- consconfig_teardown();
-
/*
* try and reset leaf devices. reset_leaves() should only
* be called when there are no other threads that could be
diff --git a/usr/src/uts/intel/ia32/ml/modstubs.s b/usr/src/uts/intel/ia32/ml/modstubs.s
index 886f42c6ea..d6f06c6e1f 100644
--- a/usr/src/uts/intel/ia32/ml/modstubs.s
+++ b/usr/src/uts/intel/ia32/ml/modstubs.s
@@ -829,7 +829,6 @@ fcnname/**/_info: \
STUB(consconfig, consconfig, 0);
STUB(consconfig, consconfig_get_usb_kb_path, 0);
STUB(consconfig, consconfig_get_usb_ms_path, 0);
- STUB(consconfig, consconfig_teardown, 0);
END_MODULE(consconfig);
#endif
diff --git a/usr/src/uts/sparc/ml/modstubs.s b/usr/src/uts/sparc/ml/modstubs.s
index faea19f32f..5424c4cce7 100644
--- a/usr/src/uts/sparc/ml/modstubs.s
+++ b/usr/src/uts/sparc/ml/modstubs.s
@@ -741,7 +741,6 @@ stubs_base:
STUB(consconfig, consconfig, 0);
STUB(consconfig, consconfig_get_usb_kb_path, 0);
STUB(consconfig, consconfig_get_usb_ms_path, 0);
- STUB(consconfig, consconfig_teardown, 0);
END_MODULE(consconfig);
#endif
diff --git a/usr/src/uts/sun4u/os/mach_cpu_states.c b/usr/src/uts/sun4u/os/mach_cpu_states.c
index a7c775abef..50c34ed97c 100644
--- a/usr/src/uts/sun4u/os/mach_cpu_states.c
+++ b/usr/src/uts/sun4u/os/mach_cpu_states.c
@@ -51,8 +51,6 @@ extern u_longlong_t gettick();
static void reboot_machine(char *);
int disable_watchdog_on_exit = 0;
-extern void consconfig_teardown();
-
/*
* Machine dependent code to reboot.
* "mdep" is interpreted as a character pointer; if non-null, it is a pointer
@@ -79,6 +77,14 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
}
/*
+ * XXX - rconsvp is set to NULL to ensure that output messages
+ * are sent to the underlying "hardware" device using the
+ * monitor's printf routine since we are in the process of
+ * either rebooting or halting the machine.
+ */
+ rconsvp = NULL;
+
+ /*
* At a high interrupt level we can't:
* 1) bring up the console
* or
@@ -108,8 +114,6 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
*/
stop_other_cpus();
- consconfig_teardown();
-
/*
* try and reset leaf devices. reset_leaves() should only
* be called when there are no other threads that could be
diff --git a/usr/src/uts/sun4v/os/mach_cpu_states.c b/usr/src/uts/sun4v/os/mach_cpu_states.c
index b025531633..120bebb599 100644
--- a/usr/src/uts/sun4v/os/mach_cpu_states.c
+++ b/usr/src/uts/sun4v/os/mach_cpu_states.c
@@ -98,8 +98,6 @@ extern uint64_t get_cpuaddr(uint64_t, uint64_t);
#define BOOT_CMD_MAX_LEN 256
#define BOOT_CMD_BASE "boot "
-extern void consconfig_teardown();
-
/*
* In an LDoms system we do not save the user's boot args in NVRAM
* as is done on legacy systems. Instead, we format and send a
@@ -162,6 +160,14 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
{
extern void pm_cfb_check_and_powerup(void);
+ /*
+ * XXX - rconsvp is set to NULL to ensure that output messages
+ * are sent to the underlying "hardware" device using the
+ * monitor's printf routine since we are in the process of
+ * either rebooting or halting the machine.
+ */
+ rconsvp = NULL;
+
switch (fcn) {
case AD_HALT:
case AD_POWEROFF:
@@ -233,8 +239,6 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
*/
stop_other_cpus();
- consconfig_teardown();
-
/*
* try and reset leaf devices. reset_leaves() should only
* be called when there are no other threads that could be