Commit 38c0ff06d5ba05b6fbf18652c49747ad320aaeb0

Authored by Stephen Rothwell
Committed by Paul Mackerras
1 parent 34b5233f37

[PATCH] ppc64: iSeries early printk breakage

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>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

arch/ppc64/kernel/udbg.c
... ... @@ -158,14 +158,20 @@
158 158 .index = -1,
159 159 };
160 160  
  161 +static int early_console_initialized;
  162 +
161 163 void __init disable_early_printk(void)
162 164 {
  165 + if (!early_console_initialized)
  166 + return;
163 167 unregister_console(&udbg_console);
  168 + early_console_initialized = 0;
164 169 }
165 170  
166 171 /* called by setup_system */
167 172 void register_early_udbg_console(void)
168 173 {
  174 + early_console_initialized = 1;
169 175 register_console(&udbg_console);
170 176 }
171 177