From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: From: Bharat Kumar Gogada To: Marc Zyngier , "bhelgaas@google.com" , "robh@kernel.org" , "paul.gortmaker@windriver.com" , "colin.king@canonical.com" , "linux-pci@vger.kernel.org" Subject: RE: [PATCH v5] PCI: Xilinx NWL: Modifying irq chip for legacy interrupts Date: Thu, 9 Feb 2017 15:16:26 +0000 Message-ID: <8520D5D51A55D047800579B094147198263E6AF3@XAP-PVEXMBX02.xlnx.xilinx.com> References: <1486364596-19699-1-git-send-email-bharatku@xilinx.com> <4b04e834-08b6-a728-8fe5-13106d50b3b2@arm.com> <8520D5D51A55D047800579B094147198263E68AA@XAP-PVEXMBX02.xlnx.xilinx.com> <131228fb-d3f8-3836-3713-e948ed30d398@arm.com> In-Reply-To: <131228fb-d3f8-3836-3713-e948ed30d398@arm.com> MIME-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ravikiran Gummaluri , "arnd@arndb.de" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "michal.simek@xilinx.com" Content-Type: text/plain; charset="us-ascii" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: > > On 09/02/17 12:01, Bharat Kumar Gogada wrote: > >> On 06/02/17 07:03, Bharat Kumar Gogada wrote: > >>> +static struct irq_chip nwl_leg_irq_chip = { > >>> + .name = "nwl_pcie:legacy", > >>> + .irq_enable = nwl_unmask_leg_irq, > >>> + .irq_disable = nwl_mask_leg_irq, > >> > >> You don't need these two if they are implemented in terms of mask/unmask. > > > > These are being invoked by some drivers other than interrupt flow. > > Ex: drivers/net/wireless/ath/ath9k/main.c > > static int ath_reset_internal(struct ath_softc *sc, struct > > ath9k_channel *hchan) { > > .... > > disable_irq(sc->irq); > > tasklet_disable(&sc->intr_tq); > > ... > > ... > > enable_irq(sc->irq); > > spin_unlock_bh(&sc->sc_pcu_lock); } For us masking/unmasking > > is the way to enable/disable interrupts. > > And if you looked at the way disable_irq is implemented, you would have found > out that it falls back to masking if there is no disable method, preserving the > semantic you expect. > Yes I did see, but this fall back requires extra "IRQ_DISABLE_UNLAZY" flag to be set to each virq. Bharat _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel