From patchwork Fri Jul 1 15:45:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 9210091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 94AB2607D6 for ; Fri, 1 Jul 2016 15:46:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86DC528540 for ; Fri, 1 Jul 2016 15:46:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AFD8285BA; Fri, 1 Jul 2016 15:46:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B73A28540 for ; Fri, 1 Jul 2016 15:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740AbcGAPqL (ORCPT ); Fri, 1 Jul 2016 11:46:11 -0400 Received: from www381.your-server.de ([78.46.137.84]:60806 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752682AbcGAPqI (ORCPT ); Fri, 1 Jul 2016 11:46:08 -0400 Received: from [88.198.220.131] (helo=sslproxy02.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1bJ0dr-0004OE-2k; Fri, 01 Jul 2016 17:46:07 +0200 Received: from [2003:86:2c09:5900:8200:bff:fe9b:6612] (helo=lars-laptop.ad.analog.com) by sslproxy02.your-server.de with esmtpsa (TLSv1.2:AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1bJ0dq-0001si-Qy; Fri, 01 Jul 2016 17:46:06 +0200 From: Lars-Peter Clausen To: Vinod Koul Cc: dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 3/3] dmaengine: axi-dmac: Return IRQ_NONE if no IRQs are pending Date: Fri, 1 Jul 2016 17:45:58 +0200 Message-Id: <1467387958-14559-3-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467387958-14559-1-git-send-email-lars@metafoo.de> References: <1467387958-14559-1-git-send-email-lars@metafoo.de> X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.99.2/21824/Fri Jul 1 16:28:01 2016) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Return IRQ_NONE in the interrupt handler when it is called but no IRQs are pending. This allows the system to recover in case of an interrupt storm e.g. due to a wrong interrupt configuration setup. Signed-off-by: Lars-Peter Clausen --- drivers/dma/dma-axi-dmac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 0e0dfc0..7f0b9aa 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -270,6 +270,9 @@ static irqreturn_t axi_dmac_interrupt_handler(int irq, void *devid) unsigned int pending; pending = axi_dmac_read(dmac, AXI_DMAC_REG_IRQ_PENDING); + if (!pending) + return IRQ_NONE; + axi_dmac_write(dmac, AXI_DMAC_REG_IRQ_PENDING, pending); spin_lock(&dmac->chan.vchan.lock);