From: Ross Lagerwall <rosslagerwall@gmail.com>
To: cpufreq@vger.kernel.org
Cc: Andre Przywara <andre.przywara@amd.com>,
Matthew Garrett <mjg@redhat.com>,
Ross Lagerwall <rosslagerwall@gmail.com>
Subject: [PATCH] acpi-cpufreq: set current frequency based on target P-State
Date: Fri, 31 May 2013 20:45:17 +0100 [thread overview]
Message-ID: <1370029517-10423-1-git-send-email-rosslagerwall@gmail.com> (raw)
4b31e774 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. 5a1c0228 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 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>
---
drivers/cpufreq/acpi-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 11b8b4b..edc089e 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -347,11 +347,11 @@ 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_AMD_MSR_CAPABLE:
cmd.type = SYSTEM_AMD_MSR_CAPABLE;
- cmd.addr.msr.reg = MSR_AMD_PERF_STATUS;
+ cmd.addr.msr.reg = MSR_AMD_PERF_CTL;
break;
case SYSTEM_IO_CAPABLE:
cmd.type = SYSTEM_IO_CAPABLE;
--
1.8.3
next reply other threads:[~2013-05-31 19:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 19:45 Ross Lagerwall [this message]
2013-05-31 21:33 ` [PATCH] acpi-cpufreq: set current frequency based on target P-State Len Brown
2013-06-01 9:48 ` Viresh Kumar
-- strict thread matches above, loose matches on Subject: below --
2013-12-20 8:19 [stable request <=3.5] " Ross Lagerwall
2014-03-25 22:04 ` [stable request <=3.7] " Vinson Lee
2014-03-25 22:04 ` [PATCH] " Vinson Lee
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=1370029517-10423-1-git-send-email-rosslagerwall@gmail.com \
--to=rosslagerwall@gmail.com \
--cc=andre.przywara@amd.com \
--cc=cpufreq@vger.kernel.org \
--cc=mjg@redhat.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