Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967380AbcCQPqT (ORCPT ); Thu, 17 Mar 2016 11:46:19 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:2956 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752698AbcCQPqR (ORCPT ); Thu, 17 Mar 2016 11:46:17 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 17 Mar 2016 08:45:25 -0700 Subject: Re: [PATCH 08/15] genirq: Add runtime power management support for IRQ chips To: Thomas Gleixner , Linus Walleij References: <1458224359-32665-1-git-send-email-jonathanh@nvidia.com> <1458224359-32665-9-git-send-email-jonathanh@nvidia.com> CC: Jason Cooper , Marc Zyngier , =?UTF-8?Q?Beno=c3=aet_Cousson?= , Tony Lindgren , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "Stephen Warren" , Thierry Reding , Kevin Hilman , Geert Uytterhoeven , Grygorii Strashko , Lars-Peter Clausen , , , , From: Jon Hunter Message-ID: <56EAD140.3090709@nvidia.com> Date: Thu, 17 Mar 2016 15:46:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.21.132.114] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1258 Lines: 39 On 17/03/16 15:02, Thomas Gleixner wrote: > On Thu, 17 Mar 2016, Jon Hunter wrote: >> /** >> * struct irq_chip - hardware interrupt chip descriptor >> * >> + * @parent: pointer to associated device > > That's really a bad name. parent suggests that this is a parent interrupt chip > and your explanation sucks as well. What's an associated device? Network card? Linus, can you re-iterate your concerns here about just using 'dev' for the name? >> #include >> #include >> +#include >> >> #ifdef CONFIG_SPARSE_IRQ >> # define IRQ_BITMAP_BITS (NR_IRQS + 8196) >> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c >> index b2a93a37f772..65878e7c7c82 100644 >> --- a/kernel/irq/manage.c >> +++ b/kernel/irq/manage.c >> @@ -1114,6 +1114,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) >> if (!try_module_get(desc->owner)) >> return -ENODEV; >> >> + ret = irq_chip_pm_get(&desc->irq_data); >> + if (ret < 0) >> + goto out_mput; > > So this call nests inside the chip_bus_lock() region. Is that intentional? Hmm ... I was trying to simplify the call paths, but yes I think it would be safer to move outside. Ok, will fix that. Cheers Jon