From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v5 2/9] drivers: irqchip: Add STM32 external interrupts support Date: Tue, 20 Sep 2016 16:02:03 +0200 (CEST) Message-ID: References: <1473432124-6784-1-git-send-email-alexandre.torgue@st.com> <1473432124-6784-3-git-send-email-alexandre.torgue@st.com> <6941f61d-0b33-4108-0135-b11887cd0488@st.com> <39c4ceee-7e05-ebfd-2ea0-3c4e1c4ea619@st.com> <053a37f4-aa10-46ea-f477-8ae55bb5773f@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Alexandre Torgue Cc: Mark Rutland , devicetree@vger.kernel.org, Daniel Thompson , Jason Cooper , arnd@arndb.de, Marc Zyngier , bruherrera@gmail.com, Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Rob Herring , Maxime Coquelin , lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org On Tue, 20 Sep 2016, Alexandre Torgue wrote: > On 09/20/2016 02:44 PM, Thomas Gleixner wrote: > > Free will be called when a interrupt in the child domain is torn down, > > i.e. when irq_domain_free_irqs() is called. And it will be called for both > > domains like the alloc callback is invoked on both domains via > > irq_domain_alloc_irqs(). > > Thanks Thomas for this clarification (I'm sure now that we need .free > callbacks). > irq_domain_free_irqs() is called in 2 scenario: > 1- when issue occurs in irq_create_fwspec_mapping() > 2- when irq_dispose_mapping() is called > > Case 2 is the one I tested some times ago. In this case, I need to mask > interrupts in .free callback of EXTI (parent) domain to avoid spurious > interrupts. And why would irq_dispose_mapping() be called on an unmasked, i.e. active, interrupt? The masking is just papering over that. Thanks, tglx