lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57189B09.4030402@nvidia.com>
Date:	Thu, 21 Apr 2016 10:19:05 +0100
From:	Jon Hunter <jonathanh@...dia.com>
To:	Kevin Hilman <khilman@...libre.com>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Jason Cooper <jason@...edaemon.net>,
	Marc Zyngier <marc.zyngier@....com>,
	Rob Herring <robh+dt@...nel.org>,
	"Pawel Moll" <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	"Stephen Warren" <swarren@...dotorg.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Grygorii Strashko <grygorii.strashko@...com>,
	Lars-Peter Clausen <lars@...afoo.de>,
	"Linus Walleij" <linus.walleij@...aro.org>,
	<linux-tegra@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 07/14] genirq: Add runtime power management support for
 IRQ chips


On 20/04/16 18:11, Kevin Hilman wrote:
> Jon Hunter <jonathanh@...dia.com> writes:
> 
>> Some IRQ chips may be located in a power domain outside of the CPU
>> subsystem and hence will require device specific runtime power
>> management. In order to support such IRQ chips, add a pointer for a
>> device structure to the irq_chip structure, and if this pointer is
>> populated by the IRQ chip driver and CONFIG_PM is selected in the kernel
>> configuration, then the pm_runtime_get/put APIs for this chip will be
>> called when an IRQ is requested/freed, respectively.
>>
>> Signed-off-by: Jon Hunter <jonathanh@...dia.com>
> 
> [...]
> 
>> @@ -1891,10 +1906,18 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act)
>>  
>>  	if (!desc || !irq_settings_is_per_cpu_devid(desc))
>>  		return -EINVAL;
>> +
>> +	retval = irq_chip_pm_get(&desc->irq_data);
>> +	if (retval < 0)
>> +		return retval;
>> +
>>  	chip_bus_lock(desc);
>>  	retval = __setup_irq(irq, desc, act);
>>  	chip_bus_sync_unlock(desc);
>>  
>> +	if (retval)
>> +		irq_chip_pm_get(&desc->irq_data);
>> +
> 
> Shouldn't this one be a _put() ?

Good grief! Yes it should. Sorry, will fix :-(

> Otherwise, LGTM
> 
> Reviewed-by: Kevin Hilman <khilman@...libre.com>

Thanks!
Jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ