diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-29 20:39:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-29 20:39:51 -0400 |
commit | b49a5195e2e737d06144e024ae092ad915722250 (patch) | |
tree | 1eac4905a092ff78c0d39e2f047ec4a3cc9c83f9 | |
parent | a8feb782092f01370c7999c3c0823f6120f29241 (diff) | |
parent | 81be193b7e2089dc34a4e3939f1b057f53995f56 (diff) |
Merge tag 'pm+acpi-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"One revert of a recent cpufreq commit that introduced a regression and
a fix for intel_pstate's Turbo Activation Ratio handling code.
Specifics:
- Revert cpufreq commit that attempted to fix a problem in the
ondemand/conservative governor code, but did that incorrectly and
introduced another problem instead (Rafael Wysocki).
- Fix incorrect decoding of MSR contents related to the Turbo
Activation Ratio (TAR) handling in the intel_pstate driver
(Srinivas Pandruvada)"
* tag 'pm+acpi-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: intel_pstate: Fix processing for turbo activation ratio
Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC"
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 8 | ||||
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 10a5cfeae8c5..5f1147fa9239 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c | |||
@@ -193,12 +193,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy) | |||
193 | wall_time = cur_wall_time - j_cdbs->prev_cpu_wall; | 193 | wall_time = cur_wall_time - j_cdbs->prev_cpu_wall; |
194 | j_cdbs->prev_cpu_wall = cur_wall_time; | 194 | j_cdbs->prev_cpu_wall = cur_wall_time; |
195 | 195 | ||
196 | if (cur_idle_time <= j_cdbs->prev_cpu_idle) { | 196 | idle_time = cur_idle_time - j_cdbs->prev_cpu_idle; |
197 | idle_time = 0; | 197 | j_cdbs->prev_cpu_idle = cur_idle_time; |
198 | } else { | ||
199 | idle_time = cur_idle_time - j_cdbs->prev_cpu_idle; | ||
200 | j_cdbs->prev_cpu_idle = cur_idle_time; | ||
201 | } | ||
202 | 198 | ||
203 | if (ignore_nice) { | 199 | if (ignore_nice) { |
204 | u64 cur_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE]; | 200 | u64 cur_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE]; |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 30fe323c4551..f502d5b90c25 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -813,6 +813,11 @@ static int core_get_max_pstate(void) | |||
813 | if (err) | 813 | if (err) |
814 | goto skip_tar; | 814 | goto skip_tar; |
815 | 815 | ||
816 | /* For level 1 and 2, bits[23:16] contain the ratio */ | ||
817 | if (tdp_ctrl) | ||
818 | tdp_ratio >>= 16; | ||
819 | |||
820 | tdp_ratio &= 0xff; /* ratios are only 8 bits long */ | ||
816 | if (tdp_ratio - 1 == tar) { | 821 | if (tdp_ratio - 1 == tar) { |
817 | max_pstate = tar; | 822 | max_pstate = tar; |
818 | pr_debug("max_pstate=TAC %x\n", max_pstate); | 823 | pr_debug("max_pstate=TAC %x\n", max_pstate); |