]> git.baikalelectronics.ru Git - kernel.git/commit
acpi-cpufreq: set current frequency based on target P-State
authorRoss Lagerwall <rosslagerwall@gmail.com>
Fri, 31 May 2013 19:45:17 +0000 (20:45 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 5 Jun 2013 11:10:57 +0000 (13:10 +0200)
commitd75bf30757c683b9137804c7265e9c4f4d22a1c8
tree689efa8061ae132a50c746789122e6822d114979
parentc8ee1052d08c618e2b5993b5619124af3d2e89ab
acpi-cpufreq: set current frequency based on target P-State

Commit 52b874d8 (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 7ead9e56 (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>
drivers/cpufreq/acpi-cpufreq.c