From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755933AbdGKRw3 (ORCPT ); Tue, 11 Jul 2017 13:52:29 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45206 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754917AbdGKRw2 (ORCPT ); Tue, 11 Jul 2017 13:52:28 -0400 Date: Tue, 11 Jul 2017 19:52:24 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: Tony Lindgren , Sebastian Reichel , LKML , Andrew Morton , Ingo Molnar , "H. Peter Anvin" , Pavel Machek , Linus Walleij , Grygorii Strashko Subject: Re: [GIT pull] irq updates for 4.13 In-Reply-To: Message-ID: References: <20170710133505.eo6w73kq2327n34p@earth> <20170711135131.GW3730@atomide.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jul 2017, Linus Torvalds wrote: > On Tue, Jul 11, 2017 at 9:19 AM, Thomas Gleixner wrote: > > > > What I do not understand here is that we have already power management > > around all of that. > > > > irq_chip_pm_get(&desc->irq_data); > > ... > > chip_bus_lock(desc); > > ... > > chip_bus_unlock_sync(desc); > > ... > > irq_chip_pm_put(&desc->irq_data); > > > > So why is that not sufficient and needs extra magic in that GPIO driver? > > Well, irq_chip_pm_get/put() isn't called just over the operation, it's > called over the *whole* sequence of the irq being enabled at all. > > So the different (right now) is that > > - chip_bus_lock/unlock_sync() is purely done around the actual > operations to set up and tear down the irq data. > > So this just covers the very short setup/teardown. > > - irq_chip_pm_get/put() is called around the *whole* "irqs can be active" block > > This covers the whole lifetime of the irq, from setup to free. > > Very different. > > I'd really prefer my simple patch for now, leaving everything working > the way it used to work. I *think* it's ok for RT too. Yes? Not completely, because of the free path issues. See the other mail. Tony confirmed that it works. I wait for Sebastian and queue it with a proper changelog, ok? Thanks, tglx