patch-2.3.99-pre4 linux/kernel/panic.c

Next file: linux/kernel/sched.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/kernel/panic.c linux/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 @@
 
 __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);
@@ -78,6 +93,9 @@
 		stop_a_enabled = 1;
 		printk("Press L1-A to return to the boot prom\n");
 	}
+#endif
+#if defined(CONFIG_ARCH_S390)
+        disabled_wait(caller);
 #endif
 	sti();
 	for(;;) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)