qemu-patch-raspberry4/hw/char
Roger Pau Monne e02bc6de30 serial: poll the serial console with G_IO_HUP
On FreeBSD polling a master pty while the other end is not connected
with G_IO_OUT only results in an endless wait. This is different from
the Linux behaviour, that returns immediately. In order to demonstrate
this, I have the following example code:

http://xenbits.xen.org/people/royger/test_poll.c

When executed on Linux:

$ ./test_poll
In callback

On FreeBSD instead, the callback never gets called:

$ ./test_poll

So, in order to workaround this, poll the source with G_IO_HUP (which
makes the code behave the same way on both Linux and FreeBSD).

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: "Andreas Färber" <afaerber@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: xen-devel@lists.xenproject.org
[Add hw/char/cadence_uart.c too. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-06-30 15:04:34 +02:00
..
cadence_uart.c serial: poll the serial console with G_IO_HUP 2014-06-30 15:04:34 +02:00
debugcon.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
digic-uart.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
escc.c savevm: Remove all the unneeded version_minimum_id_old (ppc) 2014-06-16 04:55:26 +02:00
etraxfs_ser.c etraxfs_ser: QOM cast cleanups 2013-07-29 20:45:33 +02:00
exynos4210_uart.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
grlib_apbuart.c grlib_apbuart: QOM cast cleanup 2013-07-29 21:06:27 +02:00
imx_serial.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
ipoctal232.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
lm32_juart.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
lm32_uart.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
Makefile.objs ipack: Move IndustryPack out of hw/char/ 2014-02-14 21:11:53 +01:00
mcf_uart.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
milkymist-uart.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
omap_uart.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
parallel.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
pl011.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
sclpconsole-lm.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
sclpconsole.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
serial-isa.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
serial-pci.c savevm: Remove all the unneeded version_minimum_id_old (x86) 2014-06-16 04:55:26 +02:00
serial.c serial: poll the serial console with G_IO_HUP 2014-06-30 15:04:34 +02:00
sh_serial.c sh4: Fix serial line access for Linux kernels later than 3.2 2013-10-02 22:55:28 +04:00
spapr_vty.c savevm: Remove all the unneeded version_minimum_id_old (ppc) 2014-06-16 04:55:26 +02:00
virtio-console.c serial: poll the serial console with G_IO_HUP 2014-06-30 15:04:34 +02:00
virtio-serial-bus.c virtio-serial-bus: use virtio wrappers to access headers 2014-06-29 19:39:43 +03:00
xen_console.c sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
xilinx_uartlite.c char: xilinx_uartlite: Convert to realize() 2014-06-09 00:33:03 +02:00