public inbox for cpufreq@vger.kernel.org
 help / color / mirror / Atom feed
* [stable request <=3.5] acpi-cpufreq: set current frequency based on target P-State
@ 2013-12-20  2:14 Vinson Lee
  2013-12-20  8:19 ` Ross Lagerwall
  0 siblings, 1 reply; 12+ messages in thread
From: Vinson Lee @ 2013-12-20  2:14 UTC (permalink / raw)
  To: stable
  Cc: Rafael J. Wysocki, Viresh Kumar, cpufreq, linux-pm,
	Shatil Rafitullah, Len Brown, Ross Lagerwall, Rafael J. Wysocki

Hi.

Is commit 8673b83bf2f013379453b4779047bf3c6ae387e4 "acpi-cpufreq: set
current frequency based on target P-State" applicable to kernels
before 3.8?

We found that this patch allows the kernel to control P-states on
3.4.74 on some platforms. However, other platforms were able to change
P-states even without this patch.

Cheers,
Vinson

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] acpi-cpufreq: set current frequency based on target P-State
@ 2013-05-31 19:45 Ross Lagerwall
  2013-05-31 21:33 ` Len Brown
  2013-06-01  9:48 ` Viresh Kumar
  0 siblings, 2 replies; 12+ messages in thread
From: Ross Lagerwall @ 2013-05-31 19:45 UTC (permalink / raw)
  To: cpufreq; +Cc: Andre Przywara, Matthew Garrett, Ross Lagerwall

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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-04-11 16:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` [PATCH] " Vinson Lee
2014-03-25 22:18     ` [stable request <=3.7] " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox