Skip to content

Commit

Permalink
console: console handover to preferred console
Browse files Browse the repository at this point in the history
for earlyprintk=ttyS0,9600 console=tty0 console=ttyS0,9600n8

the handover will happen from earlyser0 to tty0.  but what we want is to
hand over to ttyS0.

Later with serial-convert-early_uart-to-earlycon-for-8250.patch,

	console=tty0 console=uart8250,io,0x3f8,9600n8

will handover to ttyS0 instead of tty0.

Signed-off-by: Yinghai Lu <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Russell King <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Yinghai Lu authored and Linus Torvalds committed Jul 16, 2007
1 parent eaa944a commit d37bf60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,12 +985,15 @@ void register_console(struct console *console)
if (!(console->flags & CON_ENABLED))
return;

if (bootconsole) {
if (bootconsole && (console->flags & CON_CONSDEV)) {
printk(KERN_INFO "console handover: boot [%s%d] -> real [%s%d]\n",
bootconsole->name, bootconsole->index,
console->name, console->index);
unregister_console(bootconsole);
console->flags &= ~CON_PRINTBUFFER;
} else {
printk(KERN_INFO "console [%s%d] enabled\n",
console->name, console->index);
}

/*
Expand Down

0 comments on commit d37bf60

Please sign in to comment.