patch-2.4.7 linux/arch/s390x/mm/fault.c

Next file: linux/arch/sh/kernel/ptrace.c
Previous file: linux/arch/s390x/kernel/smp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/arch/s390x/mm/fault.c linux/arch/s390x/mm/fault.c
@@ -33,6 +33,34 @@
 
 extern void die(const char *,struct pt_regs *,long);
 
+extern spinlock_t timerlist_lock;
+
+/*
+ * Unlock any spinlocks which will prevent us from getting the
+ * message out
+ */
+void bust_spinlocks(int yes)
+{
+        spin_lock_init(&timerlist_lock);
+        if (yes) {
+                oops_in_progress = 1;
+#ifdef CONFIG_SMP
+                atomic_set(&global_irq_lock,0);
+#endif
+        } else {
+                int loglevel_save = console_loglevel;
+                oops_in_progress = 0;
+                /*
+                 * OK, the message is on the console.  Now we call printk()
+                 * without oops_in_progress set so that printk will give klogd
+                 * a poke.  Hold onto your hats...
+                 */
+                console_loglevel = 15;          /* NMI oopser may have shut the console up */
+                printk(" ");
+                console_loglevel = loglevel_save;
+        }
+}
+
 /*
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate

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