diff options
Diffstat (limited to 'kernel/printk.c')
| -rw-r--r-- | kernel/printk.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 8212c1aef12..bf785e0ce73 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -51,6 +51,10 @@ #define CREATE_TRACE_POINTS #include <trace/events/printk.h> +#ifdef CONFIG_EARLY_PRINTK_DIRECT +extern void printascii(char *); +#endif + /* printk's without a loglevel use this.. */ #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL @@ -1353,7 +1357,7 @@ static int console_trylock_for_printk(unsigned int cpu) { int retval = 0, wake = 0; - if (console_trylock()) { + if (console_trylock() || oops_in_progress) { retval = 1; /* @@ -1578,6 +1582,10 @@ asmlinkage int vprintk_emit(int facility, int level, } } +#ifdef CONFIG_EARLY_PRINTK_DIRECT + printascii(text); +#endif + if (level == -1) level = default_message_loglevel; @@ -2035,7 +2043,7 @@ void console_unlock(void) bool wake_klogd = false; bool retry; - if (console_suspended) { + if (console_suspended && !oops_in_progress) { up(&console_sem); return; } |