diff options
Diffstat (limited to 'drivers/cpufreq/cppc_cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cppc_cpufreq.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index e82bb3c30b92..10be285c9055 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c | |||
@@ -144,10 +144,23 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
144 | 144 | ||
145 | cppc_dmi_max_khz = cppc_get_dmi_max_khz(); | 145 | cppc_dmi_max_khz = cppc_get_dmi_max_khz(); |
146 | 146 | ||
147 | policy->min = cpu->perf_caps.lowest_perf * cppc_dmi_max_khz / cpu->perf_caps.highest_perf; | 147 | /* |
148 | * Set min to lowest nonlinear perf to avoid any efficiency penalty (see | ||
149 | * Section 8.4.7.1.1.5 of ACPI 6.1 spec) | ||
150 | */ | ||
151 | policy->min = cpu->perf_caps.lowest_nonlinear_perf * cppc_dmi_max_khz / | ||
152 | cpu->perf_caps.highest_perf; | ||
148 | policy->max = cppc_dmi_max_khz; | 153 | policy->max = cppc_dmi_max_khz; |
149 | policy->cpuinfo.min_freq = policy->min; | 154 | |
150 | policy->cpuinfo.max_freq = policy->max; | 155 | /* |
156 | * Set cpuinfo.min_freq to Lowest to make the full range of performance | ||
157 | * available if userspace wants to use any perf between lowest & lowest | ||
158 | * nonlinear perf | ||
159 | */ | ||
160 | policy->cpuinfo.min_freq = cpu->perf_caps.lowest_perf * cppc_dmi_max_khz / | ||
161 | cpu->perf_caps.highest_perf; | ||
162 | policy->cpuinfo.max_freq = cppc_dmi_max_khz; | ||
163 | |||
151 | policy->cpuinfo.transition_latency = cppc_get_transition_latency(cpu_num); | 164 | policy->cpuinfo.transition_latency = cppc_get_transition_latency(cpu_num); |
152 | policy->shared_type = cpu->shared_type; | 165 | policy->shared_type = cpu->shared_type; |
153 | 166 | ||