Skip to content

Commit 3155521

Browse files
committed
Revert "hvc_console: display printk messages on console."
This reverts commit 3611624. It causes an infinite loop when booting Linux under Xen, as so: [ 2.382984] console [hvc0] enabled [ 2.382984] console [hvc0] enabled [ 2.382984] console [hvc0] enabled ... as reported by Konrad Rzeszutek Wilk. And Rusty reports the same for lguest. He goes on to say: "This is not a concurrency problem: the issue seems to be that calling register_console() twice on the same struct console is a bad idea." and Greg says he'll fix it up properly at some point later. Revert for now. Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reported-by: Rusty Russell <rusty@ozlabs.org> Requested-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Miche Baker-Harvey <miche@google.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0084e47 commit 3155521

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎drivers/tty/hvc/hvc_console.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
852852
* find index to use:
853853
* see if this vterm id matches one registered for console.
854854
*/
855-
for (i = 0; i < MAX_NR_HVC_CONSOLES; i++)
855+
for (i=0; i < MAX_NR_HVC_CONSOLES; i++)
856856
if (vtermnos[i] == hp->vtermno &&
857857
cons_ops[i] == hp->ops)
858858
break;
@@ -862,13 +862,9 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
862862
i = ++last_hvc;
863863

864864
hp->index = i;
865-
hvc_console.index = i;
866-
vtermnos[i] = vtermno;
867-
cons_ops[i] = ops;
868865

869866
list_add_tail(&(hp->next), &hvc_structs);
870867
spin_unlock(&hvc_structs_lock);
871-
register_console(&hvc_console);
872868

873869
return hp;
874870
}
@@ -879,7 +875,6 @@ int hvc_remove(struct hvc_struct *hp)
879875
unsigned long flags;
880876
struct tty_struct *tty;
881877

882-
unregister_console(&hvc_console);
883878
spin_lock_irqsave(&hp->lock, flags);
884879
tty = tty_kref_get(hp->tty);
885880

0 commit comments

Comments
 (0)