Re: [PATCH 1/1] Make sure that any oops is flushed to the mtdoopsconsole

From: Andrew Morton
Date: Thu Oct 30 2008 - 16:18:44 EST


On Wed, 22 Oct 2008 18:16:28 +0300
Viktor Rosendahl <viktor.rosendahl@xxxxxxxxx> wrote:

> This used to work unpatched with older kernels, during the development phase
> of mtdoops. Before commit e3e8a75d2acfc61ebf25524666a0a2c6abb0620c a space was
> printed with console_loglevel set to 15, which probably flushed the oops
> message as a side effect.
>
> This is another patch from the Nokia N810 kernel.
>
> Signed-off-by: Viktor Rosendahl <viktor.rosendahl@xxxxxxxxx>
> ---
> lib/bust_spinlocks.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c
> index 486da62..9681d54 100644
> --- a/lib/bust_spinlocks.c
> +++ b/lib/bust_spinlocks.c
> @@ -12,6 +12,7 @@
> #include <linux/tty.h>
> #include <linux/wait.h>
> #include <linux/vt_kern.h>
> +#include <linux/console.h>
>
>
> void __attribute__((weak)) bust_spinlocks(int yes)
> @@ -22,6 +23,7 @@ void __attribute__((weak)) bust_spinlocks(int yes)
> #ifdef CONFIG_VT
> unblank_screen();
> #endif
> + console_unblank();
> if (--oops_in_progress == 0)
> wake_up_klogd();
> }

That looks logical. From my reading we can now remove that
unblank_screen(), because the console_unblank() will call
vt_console_driver.unblank() for us?

--- a/lib/bust_spinlocks.c~oops-handling-ensure-that-any-oops-is-flushed-to-the-mtdoops-console-fix
+++ a/lib/bust_spinlocks.c
@@ -11,7 +11,6 @@
#include <linux/spinlock.h>
#include <linux/tty.h>
#include <linux/wait.h>
-#include <linux/vt_kern.h>
#include <linux/console.h>


@@ -20,9 +19,6 @@ void __attribute__((weak)) bust_spinlock
if (yes) {
++oops_in_progress;
} else {
-#ifdef CONFIG_VT
- unblank_screen();
-#endif
console_unblank();
if (--oops_in_progress == 0)
wake_up_klogd();
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/