summaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /kernel/panic.c
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index e040ee454..920e4a1a7 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -8,6 +8,7 @@
* This function is used through-out the kernel (including mm and fs)
* to indicate a major problem.
*/
+#include <linux/config.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/reboot.h>
@@ -32,10 +33,24 @@ static int __init panic_setup(char *str)
__setup("panic=", panic_setup);
+/**
+ * panic - halt the system
+ * @fmt: The text string to print
+ *
+ * Display a message, then unblank the console and perform
+ * cleanups. Functions in the panic notifier list are called
+ * after the filesystem cache is flushed (when possible).
+ *
+ * This function never returns.
+ */
+
NORET_TYPE void panic(const char * fmt, ...)
{
static char buf[1024];
va_list args;
+#if defined(CONFIG_ARCH_S390)
+ unsigned long caller = (unsigned long) __builtin_return_address(0);
+#endif
va_start(args, fmt);
vsprintf(buf, fmt, args);
@@ -79,6 +94,9 @@ NORET_TYPE void panic(const char * fmt, ...)
printk("Press L1-A to return to the boot prom\n");
}
#endif
+#if defined(CONFIG_ARCH_S390)
+ disabled_wait(caller);
+#endif
sti();
for(;;) {
CHECK_EMERGENCY_SYNC