From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH] cpufreq: Skip all governor-related actions for cpufreq_suspended set
Date: Thu, 07 Apr 2016 03:29:14 +0200 [thread overview]
Message-ID: <2044559.GVlD7a2JcO@vostro.rjw.lan> (raw)
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Since governor operations are generally skipped if cpufreq_suspended
is set, do nothing at all in cpufreq_start_governor() and
cpufreq_exit_governor() in that case.
In particular, this prevents fast frequency switching from being
disabled after a suspend-to-RAM cycle on all CPUs except for the
boot one.
Fixes: b7898fda5bc7 (cpufreq: Support for fast frequency switching)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/cpufreq.c | 6 ++++++
1 file changed, 6 insertions(+)
Index: linux-pm/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq.c
+++ linux-pm/drivers/cpufreq/cpufreq.c
@@ -2053,6 +2053,9 @@ static int cpufreq_start_governor(struct
{
int ret;
+ if (cpufreq_suspended)
+ return 0;
+
if (cpufreq_driver->get && !cpufreq_driver->setpolicy)
cpufreq_update_current_freq(policy);
@@ -2062,6 +2065,9 @@ static int cpufreq_start_governor(struct
static int cpufreq_exit_governor(struct cpufreq_policy *policy)
{
+ if (cpufreq_suspended)
+ return 0;
+
cpufreq_disable_fast_switch(policy);
return cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT);
}
next reply other threads:[~2016-04-07 1:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 1:29 Rafael J. Wysocki [this message]
2016-04-07 4:28 ` [PATCH] cpufreq: Skip all governor-related actions for cpufreq_suspended set Viresh Kumar
2016-04-07 11:22 ` Rafael J. Wysocki
2016-04-07 11:32 ` Viresh Kumar
2016-04-07 11:44 ` Rafael J. Wysocki
2016-04-07 12:05 ` Viresh Kumar
2016-04-07 22:05 ` Rafael J. Wysocki
2016-04-08 5:44 ` Viresh Kumar
2016-04-08 21:56 ` Rafael J. Wysocki
2016-04-08 5:45 ` Viresh Kumar
2016-04-08 21:54 ` Rafael J. Wysocki
2016-04-10 3:16 ` Viresh Kumar
2016-04-10 3:46 ` Rafael J. Wysocki
2016-04-10 4:08 ` [PATCH] cpufreq: Abort cpufreq_update_current_freq() " Rafael J. Wysocki
2016-04-10 4:10 ` 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=2044559.GVlD7a2JcO@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox