aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-07 01:22:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-07 01:22:16 -0500
commit31555213f03bca37d2c02e10946296052f4ecfcd (patch)
tree8fdd0ad6f3171fe493b2888616997df29abd4b34 /drivers/tty/hvc
parent0084e4751e63a71b30f315710f976f8bb0c2cc07 (diff)
Revert "hvc_console: display printk messages on console."
This reverts commit 361162459f62dc0826b82c9690a741a940f457f0. 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>
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r--drivers/tty/hvc/hvc_console.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 7430bc3c8d53..b6b2d18fa38d 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -852,7 +852,7 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
852 * find index to use: 852 * find index to use:
853 * see if this vterm id matches one registered for console. 853 * see if this vterm id matches one registered for console.
854 */ 854 */
855 for (i = 0; i < MAX_NR_HVC_CONSOLES; i++) 855 for (i=0; i < MAX_NR_HVC_CONSOLES; i++)
856 if (vtermnos[i] == hp->vtermno && 856 if (vtermnos[i] == hp->vtermno &&
857 cons_ops[i] == hp->ops) 857 cons_ops[i] == hp->ops)
858 break; 858 break;
@@ -862,13 +862,9 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
862 i = ++last_hvc; 862 i = ++last_hvc;
863 863
864 hp->index = i; 864 hp->index = i;
865 hvc_console.index = i;
866 vtermnos[i] = vtermno;
867 cons_ops[i] = ops;
868 865
869 list_add_tail(&(hp->next), &hvc_structs); 866 list_add_tail(&(hp->next), &hvc_structs);
870 spin_unlock(&hvc_structs_lock); 867 spin_unlock(&hvc_structs_lock);
871 register_console(&hvc_console);
872 868
873 return hp; 869 return hp;
874} 870}
@@ -879,7 +875,6 @@ int hvc_remove(struct hvc_struct *hp)
879 unsigned long flags; 875 unsigned long flags;
880 struct tty_struct *tty; 876 struct tty_struct *tty;
881 877
882 unregister_console(&hvc_console);
883 spin_lock_irqsave(&hp->lock, flags); 878 spin_lock_irqsave(&hp->lock, flags);
884 tty = tty_kref_get(hp->tty); 879 tty = tty_kref_get(hp->tty);
885 880