All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh kumar <viresh.kumar@linaro.org>
To: Nishanth Menon <nm@ti.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [RFC PATCH] cpufreq: cpufreq-cpu0: do not allow transitions with regulators suspended
Date: Thu, 14 Nov 2013 22:16:00 +0530	[thread overview]
Message-ID: <5284FE48.8040802@linaro.org> (raw)
In-Reply-To: <5284DDB9.7040502@ti.com>

On Thursday 14 November 2013 07:57 PM, Nishanth Menon wrote:
> I am guessing this is a little too early for restarting policy here
> considering syscore_ops->resume is pretty early..

Yeah, looks like that..

> http://pastebin.mozilla.org/3602746 is the equivalent patch for v3.12
> http://pastebin.mozilla.org/3602747 is the result.

Can you try this instead of last diff I sent?


diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index dc67fa0..e70e906 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1324,6 +1324,15 @@ static void handle_update(struct work_struct *work)
                container_of(work, struct cpufreq_policy, update);
        unsigned int cpu = policy->cpu;
        pr_debug("handle_update for cpu %u called\n", cpu);
+
+       if (has_target() && !policy->governor_enabled) {
+               if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
+                       (ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
+                       pr_err("%s: Failed to start governor\n", __func__);
+                       goto fail;
+               }
+       }
+
        cpufreq_update_policy(cpu);
 }



  reply	other threads:[~2013-11-14 16:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 18:08 [RFC PATCH] cpufreq: cpufreq-cpu0: do not allow transitions with regulators suspended Nishanth Menon
2013-10-24 18:08 ` Nishanth Menon
2013-11-12  6:03 ` Viresh Kumar
2013-11-12 15:11   ` Nishanth Menon
2013-11-13  5:49     ` Viresh Kumar
2013-11-13 15:16       ` Nishanth Menon
2013-11-14  1:25         ` viresh kumar
2013-11-14 14:27           ` Nishanth Menon
2013-11-14 16:46             ` viresh kumar [this message]
2013-11-14 17:04               ` Nishanth Menon
2013-11-15 10:27                 ` Viresh Kumar
2013-11-15 13:33                   ` Nishanth Menon
2013-11-14 22:00           ` Rafael J. Wysocki
2013-11-15  4:39             ` viresh kumar

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=5284FE48.8040802@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=shawn.guo@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.