Skip to contentSkip to conversation

virtio_console: register hvc0 as console

PATCH New Constantin Baranov 1 participant 1 message Feb 22, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_console: register hvc0 as console

Call hvc_instantiate() when probing virtio device. A console should be registered much earlier but we cannot ensure hvc0 existence until PCI and virtio subsystems initialized. After all, console=hvc0 may be useful even with this limitation.

---
 drivers/char/virtio_console.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/char/virtio_console.c +3 -0
index a035ae3..cf9cb80 100644
@@ -219,6 +219,9 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
 	virtio_cons.notifier_del = notifier_del_vio;
 	virtio_cons.notifier_hangup = notifier_del_vio;
 
+	/* Attempt to register hvc0 console. Better late then never. */
+	hvc_instantiate(0, 0, &virtio_cons);
+
 	/* The first argument of hvc_alloc() is the virtual console number, so
 	 * we use zero.  The second argument is the parameter for the
 	 * notification mechanism (like irq number). We currently leave this
Signature · 1 line
1.7.0