* [PATCH] powerpc: Add udbg-immortal kernel option
@ 2006-06-07 2:06 Benjamin Herrenschmidt
2006-06-07 2:24 ` Olof Johansson
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-06-07 2:06 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
When debugging early kernel crashes that happen after console_init() and
before a proper console driver takes over, we often have to go hack into
udbg.c to prevent it from unregistering so we can "see" what is
happening. This patch adds a kernel command line option "udbg-immortal"
instead to avoid having to modify the kernel.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Paul: this is not 2.6.17 material
Index: linux-work/arch/powerpc/kernel/udbg.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/udbg.c 2006-05-31 14:13:59.000000000 +1000
+++ linux-work/arch/powerpc/kernel/udbg.c 2006-05-31 14:48:07.000000000 +1000
@@ -14,6 +14,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/console.h>
+#include <linux/init.h>
#include <asm/processor.h>
#include <asm/udbg.h>
@@ -141,12 +142,14 @@ static int early_console_initialized;
void __init disable_early_printk(void)
{
-#if 1
if (!early_console_initialized)
return;
+ if (strstr(saved_command_line, "udbg-immortal")) {
+ printk(KERN_INFO "early console immortal !\n");
+ return;
+ }
unregister_console(&udbg_console);
early_console_initialized = 0;
-#endif
}
/* called by setup_system */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Add udbg-immortal kernel option
2006-06-07 2:06 [PATCH] powerpc: Add udbg-immortal kernel option Benjamin Herrenschmidt
@ 2006-06-07 2:24 ` Olof Johansson
2006-06-07 4:19 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2006-06-07 2:24 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Paul Mackerras
On Wed, Jun 07, 2006 at 12:06:20PM +1000, Benjamin Herrenschmidt wrote:
> return;
> + if (strstr(saved_command_line, "udbg-immortal")) {
> + printk(KERN_INFO "early console immortal !\n");
> + return;
> + }
So it's YOU who add spaces before punctuation all over arch/powerpc!
Please fix. ;-)
-Olof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Add udbg-immortal kernel option
2006-06-07 2:24 ` Olof Johansson
@ 2006-06-07 4:19 ` Benjamin Herrenschmidt
2006-06-07 9:31 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-06-07 4:19 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev list, Paul Mackerras
On Tue, 2006-06-06 at 19:24 -0700, Olof Johansson wrote:
> On Wed, Jun 07, 2006 at 12:06:20PM +1000, Benjamin Herrenschmidt wrote:
> > return;
> > + if (strstr(saved_command_line, "udbg-immortal")) {
> > + printk(KERN_INFO "early console immortal !\n");
> > + return;
> > + }
>
> So it's YOU who add spaces before punctuation all over arch/powerpc!
> Please fix. ;-)
No way :) Besides, that's how it should be done in french :)
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc: Add udbg-immortal kernel option
2006-06-07 4:19 ` Benjamin Herrenschmidt
@ 2006-06-07 9:31 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2006-06-07 9:31 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Olof Johansson, Benjamin Herrenschmidt, Paul Mackerras
On Wednesday 07 June 2006 06:19, Benjamin Herrenschmidt wrote:
> No way :) Besides, that's how it should be done in french :)
>=20
So you mean, like this?
Index: linux-work/arch/powerpc/kernel/udbg.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2D-- linux-work.orig/arch/powerpc/kernel/udbg.c 2006-05-31 14:13:59.000000=
000 +1000
+++ linux-work/arch/powerpc/kernel/udbg.c 2006-05-31 14:48:07.000000000 +10=
00
@@ -141,12 +142,14 @@ static int early_console_initialized;
=20
void __init disable_early_printk(void)
{
=2D#if 1
if (!early_console_initialized)
return;
+ if (strstr(saved_command_line, "udbg-immortel")) {
+ printk(KERN_INFO "console t=F4t immortel !\n");
+ return;
+ }
unregister_console(&udbg_console);
early_console_initialized =3D 0;
=2D#endif
}
=20
/* called by setup_system */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-07 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-07 2:06 [PATCH] powerpc: Add udbg-immortal kernel option Benjamin Herrenschmidt
2006-06-07 2:24 ` Olof Johansson
2006-06-07 4:19 ` Benjamin Herrenschmidt
2006-06-07 9:31 ` Arnd Bergmann
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).