* [PATCH] RFC: ARM: Ensure backtraces console printing in sleep mode
@ 2012-06-05 7:28 Linus Walleij
2012-06-05 9:35 ` Russell King - ARM Linux
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2012-06-05 7:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Aurelien Gerault <aurelien.gerault-nonst@stericsson.com>
Ensuring that oops & panic messages/backtraces will be printed
in console, even if in sleep mode (i.e. when the console is
locked).
So, unlock the console before printing.
Signed-off-by: Aurelien Gerault <aurelien.gerault-nonst@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/kernel/traps.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 4928d89..42a5057 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/sched.h>
+#include <linux/console.h>
#include <linux/atomic.h>
#include <asm/cacheflush.h>
@@ -273,6 +274,9 @@ void die(const char *str, struct pt_regs *regs, int err)
int ret;
enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE;
+ /* ensure that backtrace will be printed in console */
+ console_unlock();
+
oops_enter();
raw_spin_lock_irq(&die_lock);
--
1.7.9.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] RFC: ARM: Ensure backtraces console printing in sleep mode
2012-06-05 7:28 [PATCH] RFC: ARM: Ensure backtraces console printing in sleep mode Linus Walleij
@ 2012-06-05 9:35 ` Russell King - ARM Linux
0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2012-06-05 9:35 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 05, 2012 at 09:28:41AM +0200, Linus Walleij wrote:
> From: Aurelien Gerault <aurelien.gerault-nonst@stericsson.com>
>
> Ensuring that oops & panic messages/backtraces will be printed
> in console, even if in sleep mode (i.e. when the console is
> locked).
>
> So, unlock the console before printing.
I don't think this is a good idea - it totally changes the locking, and
probably causes the console lock to become unbalanced, which could be a
problem if the oops was non-fatal to the kernel.
x86 also doesn't play this game either, and we really shouldn't have
different semantics here.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-05 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 7:28 [PATCH] RFC: ARM: Ensure backtraces console printing in sleep mode Linus Walleij
2012-06-05 9:35 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).