From: Vinson Lee <vlee@twopensource.com>
To: stable@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Len Brown <len.brown@intel.com>,
Ross Lagerwall <rosslagerwall@gmail.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Shatil Rafiullah <srafiullah@twopensource.com>,
Vinson Lee <vlee@twitter.com>
Subject: [PATCH] acpi-cpufreq: set current frequency based on target P-State
Date: Tue, 25 Mar 2014 15:04:17 -0700 [thread overview]
Message-ID: <1395785057-28903-2-git-send-email-vlee@twopensource.com> (raw)
In-Reply-To: <1395785057-28903-1-git-send-email-vlee@twopensource.com>
From: Ross Lagerwall <rosslagerwall@gmail.com>
commit 8673b83bf2f013379453b4779047bf3c6ae387e4 upstream.
Commit 4b31e774 (Always set P-state on initialization) fixed bug
#4634 and caused the driver to always set the target P-State at
least once since the initial P-State may not be the desired one.
Commit 5a1c0228 (cpufreq: Avoid calling cpufreq driver's target()
routine if target_freq == policy->cur) caused a regression in
this behavior.
This fixes the regression by setting policy->cur based on the CPU's
target frequency rather than the CPU's current reported frequency
(which may be different). This means that the P-State will be set
initially if the CPU's target frequency is different from the
governor's target frequency.
This fixes an issue where setting the default governor to
performance wouldn't correctly enable turbo mode on all cores.
Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 3.8+ <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ srafiullah: Backported to <= 3.6:
- SYSTEM_AMD_MSR_CAPABLE does not exist. ]
Tested-by: Shatil Rafiullah <srafiullah@twopensource.com>
Signed-off-by: Shatil Rafiullah <srafiullah@twopensource.com>
Signed-off-by: Vinson Lee <vlee@twitter.com>
---
drivers/cpufreq/acpi-cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 56c6c6b..227a316 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -215,7 +215,7 @@ static u32 get_cur_val(const struct cpumask *mask)
switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) {
case SYSTEM_INTEL_MSR_CAPABLE:
cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
- cmd.addr.msr.reg = MSR_IA32_PERF_STATUS;
+ cmd.addr.msr.reg = MSR_IA32_PERF_CTL;
break;
case SYSTEM_IO_CAPABLE:
cmd.type = SYSTEM_IO_CAPABLE;
--
1.8.3.2
next prev parent reply other threads:[~2014-03-25 22:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 2:14 [stable request <=3.5] acpi-cpufreq: set current frequency based on target P-State Vinson Lee
2013-12-20 8:19 ` Ross Lagerwall
2014-03-25 22:04 ` [stable request <=3.7] " Vinson Lee
2014-03-25 22:04 ` Vinson Lee [this message]
2014-03-25 22:18 ` rosslagerwall
2014-03-25 22:53 ` Vinson Lee
2014-03-26 7:22 ` rosslagerwall
2014-04-11 16:05 ` Greg KH
2014-03-31 8:50 ` Luís Henriques
-- strict thread matches above, loose matches on Subject: below --
2013-05-31 19:45 [PATCH] " Ross Lagerwall
2013-05-31 21:33 ` Len Brown
2013-06-01 9:48 ` 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=1395785057-28903-2-git-send-email-vlee@twopensource.com \
--to=vlee@twopensource.com \
--cc=cpufreq@vger.kernel.org \
--cc=len.brown@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=rosslagerwall@gmail.com \
--cc=srafiullah@twopensource.com \
--cc=stable@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=vlee@twitter.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