From: Kevin Hilman <khilman@ti.com>
To: Vishwanath BS <vishwanath.bs@ti.com>
Cc: linux-omap@vger.kernel.org, patches@linaro.org
Subject: Re: [PATCH 1/3] OMAP3 PM: Deny clock gating only for safe state
Date: Tue, 01 Mar 2011 13:01:41 -0800 [thread overview]
Message-ID: <87mxleimh6.fsf@ti.com> (raw)
In-Reply-To: <1297846874-18286-2-git-send-email-vishwanath.bs@ti.com> (Vishwanath BS's message of "Wed, 16 Feb 2011 14:31:12 +0530")
Vishwanath BS <vishwanath.bs@ti.com> writes:
> Currently clock gating for MPU and core are denied whenever C1 state is
> selected.
Yes, that is the definition of C1.
> It should be denied only when safe state is selected.
Why?
This changes the definition and behavior of C1 depending on how it is
entered. Not a good idea IMO.
Kevin
> Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
> ---
> arch/arm/mach-omap2/cpuidle34xx.c | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index f8e35b3..1e4ec7f 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -139,19 +139,9 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
> if (omap_irq_pending() || need_resched())
> goto return_sleep_time;
>
> - if (cx->type == OMAP3_STATE_C1) {
> - pwrdm_for_each_clkdm(mpu_pd, _cpuidle_deny_idle);
> - pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle);
> - }
> -
> /* Execute ARM wfi */
> omap_sram_idle();
>
> - if (cx->type == OMAP3_STATE_C1) {
> - pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle);
> - pwrdm_for_each_clkdm(core_pd, _cpuidle_allow_idle);
> - }
> -
> return_sleep_time:
> getnstimeofday(&ts_postidle);
> ts_idle = timespec_sub(ts_postidle, ts_preidle);
> @@ -315,8 +305,18 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
>
> select_state:
> dev->last_state = new_state;
> +
> + if (new_state == dev->safe_state) {
> + pwrdm_for_each_clkdm(mpu_pd, _cpuidle_deny_idle);
> + pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle);
> + }
> ret = omap3_enter_idle(dev, new_state);
>
> + if (new_state == dev->safe_state) {
> + pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle);
> + pwrdm_for_each_clkdm(core_pd, _cpuidle_allow_idle);
> + }
> +
> /* Restore original PER state if it was modified */
> if (per_next_state != per_saved_state)
> pwrdm_set_next_pwrst(per_pd, per_saved_state);
next prev parent reply other threads:[~2011-03-01 21:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 9:01 [PATCH 0/3] OMAP3 PM: CPUIdle fixes Vishwanath BS
2011-02-16 9:01 ` [PATCH 1/3] OMAP3 PM: Deny clock gating only for safe state Vishwanath BS
2011-03-01 21:01 ` Kevin Hilman [this message]
2011-03-02 17:14 ` Vishwanath Sripathy
2011-03-02 21:11 ` Kevin Hilman
2011-02-16 9:01 ` [PATCH 2/3] OMAP3 PM: Update only enabled C states Vishwanath BS
2011-02-16 9:01 ` [PATCH 3/3] OMAP36xx PM: Updated C state latencies for OMAP3630 Vishwanath BS
2011-03-01 21:45 ` Kevin Hilman
2011-03-02 17:17 ` Vishwanath Sripathy
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=87mxleimh6.fsf@ti.com \
--to=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=patches@linaro.org \
--cc=vishwanath.bs@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