diff options
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 9733f29ed148..badf6206b2b2 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -383,6 +383,7 @@ static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max) | |||
383 | static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) | 383 | static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) |
384 | { | 384 | { |
385 | int max_perf, min_perf; | 385 | int max_perf, min_perf; |
386 | u64 val; | ||
386 | 387 | ||
387 | intel_pstate_get_min_max(cpu, &min_perf, &max_perf); | 388 | intel_pstate_get_min_max(cpu, &min_perf, &max_perf); |
388 | 389 | ||
@@ -394,8 +395,11 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) | |||
394 | trace_cpu_frequency(pstate * 100000, cpu->cpu); | 395 | trace_cpu_frequency(pstate * 100000, cpu->cpu); |
395 | 396 | ||
396 | cpu->pstate.current_pstate = pstate; | 397 | cpu->pstate.current_pstate = pstate; |
397 | wrmsrl(MSR_IA32_PERF_CTL, pstate << 8); | 398 | val = pstate << 8; |
399 | if (limits.no_turbo) | ||
400 | val |= (u64)1 << 32; | ||
398 | 401 | ||
402 | wrmsrl(MSR_IA32_PERF_CTL, val); | ||
399 | } | 403 | } |
400 | 404 | ||
401 | static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps) | 405 | static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps) |
@@ -634,8 +638,8 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy) | |||
634 | 638 | ||
635 | static int intel_pstate_cpu_init(struct cpufreq_policy *policy) | 639 | static int intel_pstate_cpu_init(struct cpufreq_policy *policy) |
636 | { | 640 | { |
637 | int rc, min_pstate, max_pstate; | ||
638 | struct cpudata *cpu; | 641 | struct cpudata *cpu; |
642 | int rc; | ||
639 | 643 | ||
640 | rc = intel_pstate_init_cpu(policy->cpu); | 644 | rc = intel_pstate_init_cpu(policy->cpu); |
641 | if (rc) | 645 | if (rc) |
@@ -649,9 +653,8 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) | |||
649 | else | 653 | else |
650 | policy->policy = CPUFREQ_POLICY_POWERSAVE; | 654 | policy->policy = CPUFREQ_POLICY_POWERSAVE; |
651 | 655 | ||
652 | intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate); | 656 | policy->min = cpu->pstate.min_pstate * 100000; |
653 | policy->min = min_pstate * 100000; | 657 | policy->max = cpu->pstate.turbo_pstate * 100000; |
654 | policy->max = max_pstate * 100000; | ||
655 | 658 | ||
656 | /* cpuinfo and default policy values */ | 659 | /* cpuinfo and default policy values */ |
657 | policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000; | 660 | policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000; |