diff options
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 001a532e342e..eb75053f1371 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -1108,7 +1108,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
1108 | limits = &powersave_limits; | 1108 | limits = &powersave_limits; |
1109 | limits->min_policy_pct = (policy->min * 100) / policy->cpuinfo.max_freq; | 1109 | limits->min_policy_pct = (policy->min * 100) / policy->cpuinfo.max_freq; |
1110 | limits->min_policy_pct = clamp_t(int, limits->min_policy_pct, 0 , 100); | 1110 | limits->min_policy_pct = clamp_t(int, limits->min_policy_pct, 0 , 100); |
1111 | limits->max_policy_pct = (policy->max * 100) / policy->cpuinfo.max_freq; | 1111 | limits->max_policy_pct = DIV_ROUND_UP(policy->max * 100, |
1112 | policy->cpuinfo.max_freq); | ||
1112 | limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100); | 1113 | limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100); |
1113 | 1114 | ||
1114 | /* Normalize user input to [min_policy_pct, max_policy_pct] */ | 1115 | /* Normalize user input to [min_policy_pct, max_policy_pct] */ |