Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751577AbbKPKej (ORCPT ); Mon, 16 Nov 2015 05:34:39 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:4409 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbbKPKeh (ORCPT ); Mon, 16 Nov 2015 05:34:37 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 16 Nov 2015 02:23:04 -0800 Subject: Re: [RFC PATCH 1/2] genirq: Add runtime resume/suspend support for IRQ chips To: Geert Uytterhoeven References: <1447166377-19707-1-git-send-email-jonathanh@nvidia.com> <1447166377-19707-2-git-send-email-jonathanh@nvidia.com> <7hio56dctz.fsf@deeprootsystems.com> <5645A6F6.6020202@nvidia.com> <5649A603.6020308@nvidia.com> CC: Thomas Gleixner , Kevin Hilman , Jason Cooper , Marc Zyngier , Stephen Warren , Thierry Reding , "linux-kernel@vger.kernel.org" , From: Jon Hunter Message-ID: <5649B135.8050800@nvidia.com> Date: Mon, 16 Nov 2015 10:34:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.21.132.159] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1627 Lines: 44 On 16/11/15 09:49, Geert Uytterhoeven wrote: > On Mon, Nov 16, 2015 at 10:46 AM, Jon Hunter wrote: >> On 13/11/15 20:01, Thomas Gleixner wrote: >>> On Fri, 13 Nov 2015, Jon Hunter wrote: >>>> On 12/11/15 23:20, Kevin Hilman wrote: >>>>> If all the RPM devices in the domain go idle, it will be powered off >>>>> independently of the status of the irqchip because the irqchip isn't >>>>> using RPM. >>>> >>>> That's dependent on how the irqchip uses these helpers. If these helpers >>>> invoke RPM then that will not be the case. >>> >>> You need a very proper description of how that domain is working. If >>> all devices are idle, it's not necessary correct to power down the >>> irqchip as is might serve other devices as well. >> >> Agreed. The irqchip should only be powered down if there are no >> interrupts in-use/requested. Runtime-pm will keep a reference count for >> all requested IRQs. > > That means the irqchip won't be powered down automatically when the > last user is powered down, unless all users release their irqs during > suspend. Right. > Handling it automatically needs more bookkeeping than a simple reference > count. So what would you suggest? Adding a pm_runtime_register_irq() API that would register an IRQ with the device that you want RPM to handle? Not sure if there is a better/easier way to handle this. Cheers Jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/