diff options
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 0d159b513469..724b9056aa6b 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
| @@ -1460,6 +1460,9 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
| 1460 | 1460 | ||
| 1461 | intel_pstate_clear_update_util_hook(policy->cpu); | 1461 | intel_pstate_clear_update_util_hook(policy->cpu); |
| 1462 | 1462 | ||
| 1463 | pr_debug("set_policy cpuinfo.max %u policy->max %u\n", | ||
| 1464 | policy->cpuinfo.max_freq, policy->max); | ||
| 1465 | |||
| 1463 | cpu = all_cpu_data[0]; | 1466 | cpu = all_cpu_data[0]; |
| 1464 | if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate && | 1467 | if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate && |
| 1465 | policy->max < policy->cpuinfo.max_freq && | 1468 | policy->max < policy->cpuinfo.max_freq && |
| @@ -1495,13 +1498,13 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
| 1495 | limits->max_sysfs_pct); | 1498 | limits->max_sysfs_pct); |
| 1496 | limits->max_perf_pct = max(limits->min_policy_pct, | 1499 | limits->max_perf_pct = max(limits->min_policy_pct, |
| 1497 | limits->max_perf_pct); | 1500 | limits->max_perf_pct); |
| 1498 | limits->max_perf = round_up(limits->max_perf, FRAC_BITS); | ||
| 1499 | 1501 | ||
| 1500 | /* Make sure min_perf_pct <= max_perf_pct */ | 1502 | /* Make sure min_perf_pct <= max_perf_pct */ |
| 1501 | limits->min_perf_pct = min(limits->max_perf_pct, limits->min_perf_pct); | 1503 | limits->min_perf_pct = min(limits->max_perf_pct, limits->min_perf_pct); |
| 1502 | 1504 | ||
| 1503 | limits->min_perf = div_fp(limits->min_perf_pct, 100); | 1505 | limits->min_perf = div_fp(limits->min_perf_pct, 100); |
| 1504 | limits->max_perf = div_fp(limits->max_perf_pct, 100); | 1506 | limits->max_perf = div_fp(limits->max_perf_pct, 100); |
| 1507 | limits->max_perf = round_up(limits->max_perf, FRAC_BITS); | ||
| 1505 | 1508 | ||
| 1506 | out: | 1509 | out: |
| 1507 | intel_pstate_set_update_util_hook(policy->cpu); | 1510 | intel_pstate_set_update_util_hook(policy->cpu); |
