aboutsummaryrefslogtreecommitdiff
path: root/lib/bust_spinlocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bust_spinlocks.c')
-rw-r--r--lib/bust_spinlocks.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c
index 6bb7319e09a..f8e0e536739 100644
--- a/lib/bust_spinlocks.c
+++ b/lib/bust_spinlocks.c
@@ -7,33 +7,25 @@
* and panic() information from reaching the user.
*/
-#include <linux/config.h>
#include <linux/kernel.h>
+#include <linux/printk.h>
#include <linux/spinlock.h>
#include <linux/tty.h>
#include <linux/wait.h>
#include <linux/vt_kern.h>
+#include <linux/console.h>
-void bust_spinlocks(int yes)
+void __attribute__((weak)) bust_spinlocks(int yes)
{
if (yes) {
- oops_in_progress = 1;
+ ++oops_in_progress;
} else {
- int loglevel_save = console_loglevel;
#ifdef CONFIG_VT
unblank_screen();
#endif
- 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
- * and the blanked console a poke. Hold onto your hats...
- */
- console_loglevel = 15; /* NMI oopser may have shut the console up */
- printk(" ");
- console_loglevel = loglevel_save;
+ console_unblank();
+ if (--oops_in_progress == 0)
+ wake_up_klogd();
}
}
-
-