aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/udbg.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 7e0971868fc2..147a2d83de10 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -142,29 +142,22 @@ static void udbg_console_write(struct console *con, const char *s,
142static struct console udbg_console = { 142static struct console udbg_console = {
143 .name = "udbg", 143 .name = "udbg",
144 .write = udbg_console_write, 144 .write = udbg_console_write,
145 .flags = CON_PRINTBUFFER | CON_ENABLED, 145 .flags = CON_PRINTBUFFER | CON_ENABLED | CON_BOOT,
146 .index = -1, 146 .index = -1,
147}; 147};
148 148
149static int early_console_initialized; 149static int early_console_initialized;
150 150
151void __init disable_early_printk(void)
152{
153 if (!early_console_initialized)
154 return;
155 if (strstr(boot_command_line, "udbg-immortal")) {
156 printk(KERN_INFO "early console immortal !\n");
157 return;
158 }
159 unregister_console(&udbg_console);
160 early_console_initialized = 0;
161}
162
163/* called by setup_system */ 151/* called by setup_system */
164void register_early_udbg_console(void) 152void register_early_udbg_console(void)
165{ 153{
166 if (early_console_initialized) 154 if (early_console_initialized)
167 return; 155 return;
156
157 if (strstr(boot_command_line, "udbg-immortal")) {
158 printk(KERN_INFO "early console immortal !\n");
159 udbg_console.flags &= ~CON_BOOT;
160 }
168 early_console_initialized = 1; 161 early_console_initialized = 1;
169 register_console(&udbg_console); 162 register_console(&udbg_console);
170} 163}