From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsjeC-0002eU-5D for qemu-devel@nongnu.org; Mon, 16 Dec 2013 20:40:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vsje2-0008QL-Gr for qemu-devel@nongnu.org; Mon, 16 Dec 2013 20:40:32 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:55616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsje2-0008QC-AZ for qemu-devel@nongnu.org; Mon, 16 Dec 2013 20:40:22 -0500 Received: by mail-pd0-f178.google.com with SMTP id y10so6144258pdj.9 for ; Mon, 16 Dec 2013 17:40:21 -0800 (PST) Sender: Peter Crosthwaite From: Peter Crosthwaite Date: Mon, 16 Dec 2013 17:39:49 -0800 Message-Id: Subject: [Qemu-devel] [PATCH v1 00/11] Cadence UART cleanups and Tx path fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, antonynpavlov@gmail.com When using QEMU in some terminal environments, char back-ends for serial devices can return EAGAIN for non trivial periods. This coupled with use of qemu_chr_fe_write_all() is a leading cause of: main-loop: WARNING: I/O thread spun for 1000 iterations This series fixes this for cadence_uart by replacing the open loop tx-write logic with a proper closed-loop that is responsive to the back-end short return. Various trivial cleanups are at the front of the series. Last patch is the main event. There is also a major performance increase with removal of the tx timer logic (P7). As a test, I've been using QEMU in a terminal over trans-pacific SSH. Before this series: $ time ./qemu-build/arm-softmmu/qemu-system-arm -M xilinx-zynq-a9 ... main-loop: WARNING: I/O thread spun for 1000 iterations Booting Linux on physical CPU 0x0 ... PetaLinux v2013.04 (Yocto 1.3) zynq ttyPS0 zynq login: QEMU: Terminated real 2m26.908s user 1m41.430s sys 1m7.116s And after: $ time ./qemu-build/arm-softmmu/qemu-system-arm -M xilinx-zynq-a9 ... Booting Linux on physical CPU 0x0 ... PetaLinux v2013.04 (Yocto 1.3) zynq ttyPS0 zynq login: QEMU: Terminated real 0m16.149s user 0m10.357s sys 0m0.164s Peter Crosthwaite (11): char/cadence_uart: Mark struct fields as public/private char/cadence_uart: Add missing uart_update_state char/cadence_uart: Fix reset. char/cadence_uart: s/r_fifo/rx_fifo char/cadence_uart: Simplify status generation char/cadence_uart: Define Missing SR/ISR fields char/cadence_uart: Remove TX timer & add TX FIFO state char/cadence_uart: Fix can_receive logic char/cadence_uart: Use the TX fifo for transmission char/cadence_uart: Delete redundant rx rst logic char/cadence_uart: Implement Tx flow control hw/char/cadence_uart.c | 153 ++++++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 66 deletions(-) -- 1.8.5.1