From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933848AbdGKQT7 (ORCPT ); Tue, 11 Jul 2017 12:19:59 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:44948 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932299AbdGKQT6 (ORCPT ); Tue, 11 Jul 2017 12:19:58 -0400 Date: Tue, 11 Jul 2017 18:19:55 +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 7:41 AM, Thomas Gleixner wrote: > > > > Ah. Now that makes sense. > > > > Unpatched the ordering is: > > > > chip_bus_lock(desc); > > irq_request_resources(desc); > > I *looked* at that ordering and then went "Naah, that makes no sense". > > But if that's the only issue, how about we just re-order those things > - we still don't need to move the irq_request_resources() into the > spinlock, we just move it to below the chip_bus_lock(). > > IOW, something like the (COMPLETELY UNTEESTED!) attached patch. > > This assumes that the chip_bus_lock() thing is still ok for the RT > case, but it looks like it might be: the only other one I looked at > (apart from the gpio-omap one) used a mutex. I looked through all of them and the only special case is gpio-omap. 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? Thanks, tglx