From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752492AbcAFKGE (ORCPT ); Wed, 6 Jan 2016 05:06:04 -0500 Received: from www.linutronix.de ([62.245.132.108]:36124 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752203AbcAFKGA (ORCPT ); Wed, 6 Jan 2016 05:06:00 -0500 Date: Wed, 6 Jan 2016 11:05:02 +0100 (CET) From: Thomas Gleixner To: Vinod Koul cc: Rameshwar Sahu , 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 In-Reply-To: <20160106093121.GB11778@localhost> Message-ID: References: <1450875495-2229-1-git-send-email-rsahu@apm.com> <20160106091323.GP2940@localhost> <20160106093121.GB11778@localhost> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Jan 2016, Vinod Koul wrote: > On Wed, Jan 06, 2016 at 02:51:07PM +0530, Rameshwar Sahu wrote: > > >> @@ -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? Why would I? Those helpers are core internal and not usable in random drivers. Drivers have irq_set_status_flags()/irq_clear_status_flags() ... Thanks, tglx