From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Grygorii Strashko
<grygorii.strashko-l0cyMroinI0@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Geert Uytterhoeven
<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Soren Brinkmann
<soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC PATCH 1/2] genirq: Add runtime resume/suspend support for IRQ chips
Date: Thu, 12 Nov 2015 15:37:12 +0100 [thread overview]
Message-ID: <5644A418.2020906@metafoo.de> (raw)
In-Reply-To: <56449BF0.9090408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 11/12/2015 03:02 PM, Jon Hunter wrote:
[...]
>>>> One easy way out might be to always call pm_get/pm_but from
>>>> bus_lock,/bus_unlock. This way the chip is guaranteed to be powered up when
>>>> accessed happens. In addition pm_get is called when the IRQ is request and
>>>> pm_put is called when the IRQ is release, this is to ensure the chip stays
>>>> powered when it is actively monitoring the IRQ lines.
>>>
>>> Yes I had thought about that, but it is not quite that easy, because in
>>> the case of request_irq() you don't want to pm_put() after the
>>> bus_unlock(). However, the bus_lock/unlock() are good indicators of
>>> different paths.
>>
>> You'd call pm_get() twice in request_irq() once from bus_lock() and once
>> independently, that way you still have a reference even after the bus_unlock().
>
> Yes that is a possibility. However, there are places such as
> show_interrupts() (kernel/irq/proc.c) and irq_gc_suspend() that do not
> call bus_lock/unlock() which would need to be handled for PM. May be
> these should also call bus_lock() as well?
show_interrupts() only accesses software state, not hardware state, or does it?
suspend/resume is a bit tricky. It's kind of driver specific if it needs to
actually access the hardware or whether the state is already shadowed in
software. Maybe we can make this an exception for now and let drivers handle
this on their own.
next prev parent reply other threads:[~2015-11-12 14:37 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
[not found] ` <1447166377-19707-2-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-10 15:26 ` Thomas Gleixner
2015-11-10 15:58 ` Jon Hunter
[not found] ` <56421421.8070807-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-10 16:47 ` Grygorii Strashko
[not found] ` <56421FA5.4020801-l0cyMroinI0@public.gmane.org>
2015-11-10 18:07 ` Lars-Peter Clausen
[not found] ` <56423245.1040602-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-11-11 10:13 ` Jon Hunter
[not found] ` <564314D9.9040502-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-11 15:41 ` Grygorii Strashko
[not found] ` <564361AE.4070303-l0cyMroinI0@public.gmane.org>
2015-11-12 10:59 ` Jon Hunter
[not found] ` <5644710D.7080108-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-12 13:20 ` Lars-Peter Clausen
2015-11-12 13:29 ` Grygorii Strashko
[not found] ` <5644943E.1060102-l0cyMroinI0@public.gmane.org>
2015-11-12 13:34 ` Lars-Peter Clausen
[not found] ` <5644957D.6060202-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-11-13 18:07 ` Grygorii Strashko
2015-11-12 13:35 ` Jon Hunter
2015-11-12 13:47 ` Lars-Peter Clausen
[not found] ` <5644986B.5030901-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-11-12 14:02 ` Jon Hunter
[not found] ` <56449BF0.9090408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-12 14:37 ` Lars-Peter Clausen [this message]
[not found] ` <5644A418.2020906-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-11-12 15:38 ` Jon Hunter
2015-11-12 17:04 ` Sören Brinkmann
2015-11-12 23:20 ` Kevin Hilman
[not found] ` <7hio56dctz.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2015-11-13 9:01 ` Jon Hunter
[not found] ` <5645A6F6.6020202-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-13 20:01 ` Thomas Gleixner
2015-11-16 9:46 ` Jon Hunter
2015-11-16 9:49 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXazgRcw=+O-w+PsZpwiW8iCwZ8MmhNSjcOoZGRP45Y6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-16 10:34 ` Jon Hunter
[not found] ` <5649B135.8050800-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-16 10:48 ` Geert Uytterhoeven
[not found] ` <CAMuHMdW2L1gYO7cNjeeaBTcQQdEXc9q45E1sZj-=TPwokkGx2g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-17 11:57 ` Jon Hunter
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=5644A418.2020906@metafoo.de \
--to=lars-qo5elluwu/uelga04laivw@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \
--cc=soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).