From patchwork Mon Sep 8 15:15:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 4863151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C311A9F32F for ; Mon, 8 Sep 2014 15:17:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CD5520138 for ; Mon, 8 Sep 2014 15:17:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FB47200F2 for ; Mon, 8 Sep 2014 15:17:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XR0fN-0005AZ-6L; Mon, 08 Sep 2014 15:15:41 +0000 Received: from galois.linutronix.de ([2001:470:1f0b:db:abcd:42:0:1]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XR0fK-00052q-Bv for linux-arm-kernel@lists.infradead.org; Mon, 08 Sep 2014 15:15:39 +0000 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1XR0ej-0005vA-5i; Mon, 08 Sep 2014 17:15:01 +0200 Date: Mon, 8 Sep 2014 17:15:01 +0200 From: Sebastian Andrzej Siewior To: Frans Klaver Subject: Re: [PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA Message-ID: <20140908151501.GA22584@linutronix.de> References: <1409943773-7874-1-git-send-email-bigeasy@linutronix.de> <20140908144616.GA22315@ci00147.xsens-tech.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140908144616.GA22315@ci00147.xsens-tech.local> X-Key-Id: 97C4700B X-Key-Fingerprint: 09E2 D1F3 9A3A FF13 C3D3 961C 0688 1C1E 97C4 700B User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140908_081538_567461_473A44CC X-CRM114-Status: GOOD ( 12.96 ) X-Spam-Score: -2.5 (--) Cc: tony@atomide.com, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, balbi@ti.com, linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * Frans Klaver | 2014-09-08 16:46:18 [+0200]: >- ncurses based applications (vi, less) don't play nice for me on the > console with this series. less doesn't show me anything. vi doesn't > return to console properly. Can you give a test case >- I seem seem to get stuck in a "serial8250: too much work for irq%d" > loop somewhat reliably. We have a rather demanding application with > typically somewhere between 600 and 1000 byte packets being sent at > 240Hz (roughly somewhere between 1.5 and 2 Mb/s). We run at baudrate > 3500k. I get into this "too much work" thing already when running at > 300 bytes per packet. Do you get this message also at lower baud rates, say 115200? What I am trying to understand is why you are spinning in the handler. _With_ DMA you should hardly get into the serial handler under normal conditions. Running at 3.5MB/sec should give one byte every 2.8us and 48 Bytes every ~137us. This looks like plenty of time to get out of the handler. My *guess* is that serial8250_handle_irq() has IIR often set to timeout and you end up fetching byte after byte. This patch should protocol when and why you got into the handler. >I hope this is of some use to you. I'll do more testing later. Which SoC do you use and do you have DMA enabled? >Thanks, >Frans Sebastian diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 7111b22de000..59852069e4a0 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -1583,6 +1583,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) status = serial_port_in(port, UART_LSR); DEBUG_INTR("status = %x...", status); + trace_printk("l%d IIR %x LSR %x\n", port->line, iir, status); if (status & (UART_LSR_DR | UART_LSR_BI)) { if (up->dma) @@ -1707,6 +1708,7 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) spin_unlock(&i->lock); + trace_printk("%d e\n", irq); DEBUG_INTR("end.\n"); return IRQ_RETVAL(handled);