From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541AbcAFJ1z (ORCPT ); Wed, 6 Jan 2016 04:27:55 -0500 Received: from mga04.intel.com ([192.55.52.120]:14185 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbcAFJ1w (ORCPT ); Wed, 6 Jan 2016 04:27:52 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,528,1444719600"; d="scan'208";a="24427440" Date: Wed, 6 Jan 2016 15:01:21 +0530 From: Vinod Koul To: Rameshwar Sahu , Thomas Gleixner Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jcm@redhat.com, patches@apm.com, Kaustubh Gondkar Subject: Re: [PATCH] dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag Message-ID: <20160106093121.GB11778@localhost> References: <1450875495-2229-1-git-send-email-rsahu@apm.com> <20160106091323.GP2940@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 06, 2016 at 02:51:07PM +0530, Rameshwar Sahu wrote: > Hi Vinod, > > On Wed, Jan 6, 2016 at 2:43 PM, Vinod Koul wrote: > > On Wed, Dec 23, 2015 at 06:28:15PM +0530, Rameshswar Prasad Sahu wrote: > >> From: Rameshwar Prasad Sahu > >> > >> For interrupt controller that doesn't support irq_disable and hardware > >> with level interrupt, an extra interrupt can be pending. This patch fixes > >> the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line. > >> > >> Reference: http://git.kernel.org/tip/e9849777d0e27cdd2902805be51da73e7c79578c > > > > I seem to have got this patch thrice :( > Due to mail failure (some issue was in my email client) to some > email-id it was multiple times, git send-email ? > > > >> > >> Signed-off-by: Rameshwar Prasad Sahu > >> --- > >> drivers/dma/xgene-dma.c | 4 ++++ > >> 1 files changed, 4 insertions(+), 0 deletions(-) > >> > >> diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c > >> index 9dfa2b0..6363e84 100644 > >> --- a/drivers/dma/xgene-dma.c > >> +++ b/drivers/dma/xgene-dma.c > >> @@ -29,6 +29,7 @@ > >> #include > >> #include > >> #include > >> +#include > >> #include > >> #include > >> > >> @@ -1610,6 +1611,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma) > >> /* Register DMA channel rx irq */ > >> for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) { > >> chan = &pdma->chan[i]; > >> + irq_set_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY); > > > > Why not use irq_settings_disable_unlazy(), at least read the reference you > > pointed out! > > irq_settings_disable_unlazy() is helper function to test > IRQ_DISABLE_UNLAZY flag is set or not, it's not for setting this flag. > FYI... > +static inline bool irq_settings_disable_unlazy(struct irq_desc *desc) > +{ > + return desc->status_use_accessors & _IRQ_DISABLE_UNLAZY; > +} Ah yes, I saw clear API and assumed there would be set. Then I think we should add a set helper as well as the usage is intended for drivers to set this flag Thomas, Any reason why you didn't add a set helper, only test and clear? -- ~Vinod