diff mbox series

[1/3] virtio-serial: Don't override some words

Message ID 158379378586.1643521.16002013085934751137.stgit@bahia.lan
State Accepted
Headers show
Series Fix virtio-serial | expand

Commit Message

Greg Kurz March 9, 2020, 10:43 p.m. UTC
term-io.fs already overrides "emit", "key" and "key?" with its own version:

- "term-io-emit" calls the "write" method of the "stdout" instance, which
  then calls "virtio-serial-putchar"

- "term-io-key" calls the "read" method of the "stdout" instance, which then
  calls "virtio-serial-getchar"

- "term-io-key?" calls "serial-key?" if the device is a serial device, which
   is the case here and we already override "serial-key?" with
   "virtio-serial-term-key?".

It thus looks weird to rely on these shortcuts. Especially, when IOMMU is
enabled, we need a valid instance in "dmap-map-in" and going through
"term-io-emit" buys us that.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 board-qemu/slof/virtio-serial.fs |    3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/board-qemu/slof/virtio-serial.fs b/board-qemu/slof/virtio-serial.fs
index 42ab3e2ccc9c..a99293f6ef77 100644
--- a/board-qemu/slof/virtio-serial.fs
+++ b/board-qemu/slof/virtio-serial.fs
@@ -39,9 +39,6 @@  virtio-setup-vd VALUE virtiodev
 : init  ( -- )
 virtiodev virtio-serial-init drop
     TRUE to initialized?
-    ['] virtio-serial-term-emit to emit
-    ['] virtio-serial-term-key  to key
-    ['] virtio-serial-term-key? to key?
     ['] shutdown add-quiesce-xt
 ;