From: Todd Poynor <toddpoynor@google.com>
To: Benoit Cousson <b-cousson@ti.com>
Cc: paul@pwsan.com, rnayak@ti.com, santosh.shilimkar@ti.com,
linux-omap@vger.kernel.org
Subject: Re: [PATCH v3 4/8] OMAP2+: PM: idle clkdms only if already in idle
Date: Mon, 27 Jun 2011 18:00:21 -0700 [thread overview]
Message-ID: <20110628010021.GA21519@google.com> (raw)
In-Reply-To: <1309191103-8817-5-git-send-email-b-cousson@ti.com>
On Mon, Jun 27, 2011 at 06:11:39PM +0200, Benoit Cousson wrote:
> From: Rajendra Nayak <rnayak@ti.com>
>
> The omap_set_pwrdm_state function forces clockdomains
> to idle, without checking the existing idle state
> programmed, instead based solely on the HW capability
> of the clockdomain to support idle.
> This is wrong and the clockdomains should be idled
> post a state_switch *only* if idle transitions on the
> clockdomain were already enabled.
...
> } else {
> + hwsup = clkdm_allows_idle(pwrdm->pwrdm_clkdms[0]);
> clkdm_wakeup(pwrdm->pwrdm_clkdms[0]);
> pwrdm_wait_transition(pwrdm);
> sleep_switch = FORCEWAKEUP_SWITCH;
> @@ -142,7 +144,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
>
> switch (sleep_switch) {
> case FORCEWAKEUP_SWITCH:
> - if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO)
> + if (hwsup)
> clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
> else
> clkdm_sleep(pwrdm->pwrdm_clkdms[0]);
Since it seems these power domain state transitions could be executed
concurrently with other operations on the clock domain that is first
in the list, is there still a chance for a race, such that it may no
longer be appropriate to put the clock domain in h/w-supervised idle
mode after the power domain transition is complete? If so, perhaps an
atomic wakeup refcount could flag when it is OK to allow idle on the
clock domain.
Todd
next prev parent reply other threads:[~2011-06-28 1:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 16:11 [PATCH v3 0/8] Fix module-mode enable sequence on OMAP4 Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 1/8] OMAP2+: clockdomain: Add an api to read idle mode Benoit Cousson
2011-07-01 12:22 ` Paul Walmsley
2011-06-27 16:11 ` [PATCH v3 2/8] OMAP2+: clockdomain: Add SoC support for clkdm_is_idle Benoit Cousson
2011-06-27 19:18 ` Todd Poynor
2011-07-01 12:24 ` Paul Walmsley
2011-06-27 16:11 ` [PATCH v3 3/8] OMAP2+: PM: Initialise sleep_switch to a non-valid value Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 4/8] OMAP2+: PM: idle clkdms only if already in idle Benoit Cousson
2011-06-28 1:00 ` Todd Poynor [this message]
2011-06-27 16:11 ` [PATCH v3 5/8] OMAP4: PM: TEMP: Prevent l3init from idling/force sleep Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 6/8] OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework Benoit Cousson
2011-06-28 1:08 ` Todd Poynor
2011-06-27 16:11 ` [PATCH v3 7/8] OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 8/8] OMAP2+: hwmod: Follow the recommended PRCM module enable sequence Benoit Cousson
2011-06-28 0:11 ` Kevin Hilman
2011-06-28 13:05 ` Cousson, Benoit
2011-06-28 22:03 ` Rajendra Nayak
2011-06-28 22:23 ` Cousson, Benoit
2011-06-28 17:16 ` Kevin Hilman
2011-06-28 21:33 ` Cousson, Benoit
2011-06-28 21:55 ` Rajendra Nayak
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=20110628010021.GA21519@google.com \
--to=toddpoynor@google.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.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