[PATCH] ppc64: iSeries early printk breakage
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Sep 2005 09:52:38 +0000 (19:52 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 9 Sep 2005 12:11:34 +0000 (22:11 +1000)
The earlier commit 8d9273918635f0301368c01b56c03a6f339e8d51
(Consolidate early console and PPCDBG code) broke iSeries because
it caused unregister_console(&udbg_console) to be called
unconditionally.  iSeries never registers the udbg_console.

This just reverts part of the change.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc64/kernel/udbg.c

index ed6766e21f5a4c5df82405b2ac5530aec54f4e36..d49c3613c8ece531898535748256ec5af39796bb 100644 (file)
@@ -158,14 +158,20 @@ static struct console udbg_console = {
        .index  = -1,
 };
 
+static int early_console_initialized;
+
 void __init disable_early_printk(void)
 {
+       if (!early_console_initialized)
+               return;
        unregister_console(&udbg_console);
+       early_console_initialized = 0;
 }
 
 /* called by setup_system */
 void register_early_udbg_console(void)
 {
+       early_console_initialized = 1;
        register_console(&udbg_console);
 }