aboutsummaryrefslogtreecommitdiff
path: root/hw/block/fdc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-02-16 14:08:22 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-09 15:34:53 +0200
commit19d2b5e6ff7202c2bf45c547efa85ae6c2d76bbd (patch)
tree84d9d315b0307a886ee6df399c2450caf790bd23 /hw/block/fdc.c
parent5f5b5942d56a138baad0ae01458d5d0e62d5be68 (diff)
downloadqemu-19d2b5e6ff7202c2bf45c547efa85ae6c2d76bbd.zip
qemu-19d2b5e6ff7202c2bf45c547efa85ae6c2d76bbd.tar.gz
qemu-19d2b5e6ff7202c2bf45c547efa85ae6c2d76bbd.tar.bz2
i8257: rewrite DMA_schedule to avoid hooking into the CPU loop
The i8257 DMA controller uses an idle bottom half, which by default does not cause the main loop to exit. Therefore, the DMA_schedule function is there to ensure that the CPU relinquishes the iothread mutex to the iothread. However, this is not enough since the iothread will call aio_compute_timeout() and go to sleep again. In the iothread world, forcing execution of the idle bottom half is much simpler, and only requires a call to qemu_notify_event(). Do it, removing the need for the "cpu_request_exit" pseudo-irq. The next patch will remove it. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/block/fdc.c')
-rw-r--r--hw/block/fdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 5e1b67e..6686a72 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -1417,7 +1417,7 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction)
* recall us...
*/
DMA_hold_DREQ(fdctrl->dma_chann);
- DMA_schedule(fdctrl->dma_chann);
+ DMA_schedule();
} else {
/* Start transfer */
fdctrl_transfer_handler(fdctrl, fdctrl->dma_chann, 0,