mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Kevin Hilman <khilman@kernel.org>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [RFC PATCH 1/2] genirq: Add runtime resume/suspend support for IRQ chips
Date: Tue, 17 Nov 2015 11:57:12 +0000	[thread overview]
Message-ID: <564B1618.10806@nvidia.com> (raw)
In-Reply-To: <CAMuHMdW2L1gYO7cNjeeaBTcQQdEXc9q45E1sZj-=TPwokkGx2g@mail.gmail.com>

Hi Geert,

On 16/11/15 10:48, Geert Uytterhoeven wrote:
> On Mon, Nov 16, 2015 at 11:34 AM, Jon Hunter <jonathanh@nvidia.com> wrote:

[snip]

>>> 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.
> 
> The irqchip needs to keep track how many times request_irq() has been
> called, cfr. your suggestion above.
> 
> On the other side, the system needs to keep track how many times request_irq()
> has been called for each irqchip, so it can subtract those numbers from the
> irqchip's counters during suspend of the device, and re-add them during resume.
> So we need at least a "struct device *" parameter for request_irq().
> devm_request_irq() already has that, but not all drivers use that.

Yes that would make sense. However, I am wondering if the
syscore suspend/resume operators could be used here to do something
like ...

	pm_runtime_disable(dev);
	if (!pm_runtime_status_suspended(dev))
		chip->irq_runtime_suspend(data);

> However, I think this should be looked at into the context of "[RFD]
> Functional dependencies between devices".
> https://lwn.net/Articles/662205/
> https://lkml.org/lkml/2015/10/27/388
> 
> There can be other dependencies than interrupts between devices.
> All functions using dependencies need a "struct device *" parameter to
> record information.

Yes I like the sound of that. That would be ideal. However, I am
guessing that that is a way off at the moment ...

Cheers
Jon

  reply	other threads:[~2015-11-17 11:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 14:39 [RFC PATCH 0/2] Add support for Tegra210 AGIC Jon Hunter
2015-11-10 14:39 ` [RFC PATCH 1/2] genirq: Add runtime resume/suspend support for IRQ chips Jon Hunter
2015-11-10 15:26   ` Thomas Gleixner
2015-11-10 15:58     ` Jon Hunter
2015-11-10 16:47       ` Grygorii Strashko
2015-11-10 18:07         ` Lars-Peter Clausen
2015-11-11 10:13           ` Jon Hunter
2015-11-11 15:41             ` Grygorii Strashko
2015-11-12 10:59               ` Jon Hunter
2015-11-12 13:20                 ` Lars-Peter Clausen
2015-11-12 13:29                   ` Grygorii Strashko
2015-11-12 13:34                     ` Lars-Peter Clausen
2015-11-13 18:07                       ` Grygorii Strashko
2015-11-12 13:35                   ` Jon Hunter
2015-11-12 13:47                     ` Lars-Peter Clausen
2015-11-12 14:02                       ` Jon Hunter
2015-11-12 14:37                         ` Lars-Peter Clausen
2015-11-12 15:38                           ` Jon Hunter
2015-11-12 17:04       ` Sören Brinkmann
2015-11-12 23:20   ` Kevin Hilman
2015-11-13  9:01     ` Jon Hunter
2015-11-13 20:01       ` Thomas Gleixner
2015-11-16  9:46         ` Jon Hunter
2015-11-16  9:49           ` Geert Uytterhoeven
2015-11-16 10:34             ` Jon Hunter
2015-11-16 10:48               ` Geert Uytterhoeven
2015-11-17 11:57                 ` Jon Hunter [this message]
2015-11-10 14:39 ` [RFC PATCH 2/2] irqchip/gic: Add support for tegra AGIC interrupt controller Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564B1618.10806@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=geert@linux-m68k.org \
    --cc=jason@lakedaemon.net \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome