Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbdF3GUp (ORCPT ); Fri, 30 Jun 2017 02:20:45 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36997 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbdF3GUn (ORCPT ); Fri, 30 Jun 2017 02:20:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170629213334.375848050@linutronix.de> <20170629214343.882576048@linutronix.de> From: Tomasz Figa Date: Fri, 30 Jun 2017 15:20:41 +0900 Message-ID: Subject: Re: [patch 1/5] pinctrl: samsung: Remove bogus irq_[un]mask from resource management To: Krzysztof Kozlowski Cc: Thomas Gleixner , Sylwester Nawrocki , LKML , Marc Zyngier , Linus Walleij , Brian Norris , Heiko Stuebner , linux-rockchip@lists.infradead.org, Julia Cartwright , "linux-gpio@vger.kernel.org" , John Keeping , Doug Anderson , Kukjin Kim , linux-arm-kernel , "linux-samsung-soc@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1520 Lines: 40 2017-06-30 15:02 GMT+09:00 Krzysztof Kozlowski : > On Fri, Jun 30, 2017 at 4:47 AM, Tomasz Figa wrote: >> Hi Thomas, >> >> 2017-06-30 6:33 GMT+09:00 Thomas Gleixner : >>> The irq chip callbacks irq_request/release_resources() have absolutely no >>> business with masking and unmasking the irq. >>> >>> The core code unmasks the interrupt after complete setup and masks it >>> before invoking irq_release_resources(). >>> >>> The unmask is actually harmful as it happens before the interrupt is >>> completely initialized in __setup_irq(). >>> >>> Remove it. >> >> Good catch, thanks! (Note that the original patch of mine [1] did that >> in .irq_startup()/.irq_shutdown(), which was for some reason changed >> later, but I don't remember the exact story.) >> >> [1] https://patchwork.kernel.org/patch/4466431/ >> >> Acked-by: Tomasz Figa >> >> Sylwester, Krzysztof, would you be able to do some basic test? > > I suppose this was not tested so yes - I have platforms do this. I > understand that checking any non-shared GPIO interrupt should be > sufficient to test, right? I think any interrupt from the Exynos pin controller should work, even shared one. I'd expect irq_request_resources() to be invoked for shared interrupts as well, otherwise we have a problem... (I quickly looked through kernel/irq/manage.c and it seems to be invoked for the first __setup_irq() call even for shared interrupts.) Thanks. Best regards, Tomasz