From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Hilman, Kevin" <khilman@ti.com>
Cc: linux-pm@lists.linux-foundation.org,
Linux OMAP <linux-omap@vger.kernel.org>
Subject: Re: pm_runtime_suspended() can be false if RPM_SUSPENDED
Date: Tue, 12 Jul 2011 00:36:49 +0200 [thread overview]
Message-ID: <201107120036.49823.rjw@sisk.pl> (raw)
In-Reply-To: <CALyTGOANs9ZUKmWH43s7H1Aod-y=jAueo045yzao66ze7Wko5g@mail.gmail.com>
On Monday, July 11, 2011, Hilman, Kevin wrote:
> On Mon, Jul 11, 2011 at 1:22 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Monday, July 11, 2011, Kevin Hilman wrote:
> >> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
> >>
> >> [...]
> >>
> >> >>
> >> >> However, based on the pm_runtime_set_active() problem you mentioned
> >> >> above, I'm not sure this will help either, since what the PM domain's
> >> >> noirq callback will want to do will be based on the actual device
> >> >> hardware state, not on the PM core's view of the device state.
> >> >
> >> > Yes. For devices whose runtime PM is never enabled, this is quite clear
> >> > (we must assume they are operational). For devices whose runtime PM is
> >> > temporarily disabled and the reenabled, it's not that clear, but at
> >> > least for the system suspend case we may require drivers not to use
> >> > pm_runtime_set_active/suspended() in their callbacks, so that we may
> >> > assume that the status hasn't changed between .suspend() and .resume().
> >> >
> >> > So, I think your approach (to check power.runtime_status) is correct in this
> >> > respect.
> >>
> >> OK, I'll just directly check power.runtime_status in the noirq methods,
> >> since at that point I always know that disable_depth > 0.
> >
> > That's what I wanted to say. :-) The only problem with that is if
> > CONFIG_PM_RUNTIME is unset, power.runtime_status is not present, so I think
> > we'll need a static inline to work around that.
> >
>
> OK, I can prepare a patch for a static inline for
> pm_runtime_status_suspended(), unless you have one already in
> progress.
No, I don't, please send me one if you can. :-)
Thanks,
Rafael
next prev parent reply other threads:[~2011-07-11 22:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 23:41 pm_runtime_suspended() can be false if RPM_SUSPENDED Kevin Hilman
2011-07-09 10:19 ` Rafael J. Wysocki
2011-07-11 19:24 ` Kevin Hilman
2011-07-11 20:02 ` Rafael J. Wysocki
2011-07-11 20:14 ` Kevin Hilman
2011-07-11 20:22 ` Rafael J. Wysocki
2011-07-11 20:34 ` Hilman, Kevin
2011-07-11 22:36 ` Rafael J. Wysocki [this message]
2011-07-11 22:50 ` Hilman, Kevin
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=201107120036.49823.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.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