Skip to content

Commit a3f48fb

Browse files
committed
cpufreq: cppc: Set policy->boost_supported
With a later commit, the cpufreq core will call the ->set_boost() callback only if the policy supports boost frequency. The boost_supported flag is set by the cpufreq core if policy->freq_table is set and one or more boost frequencies are present. For other drivers, the flag must be set explicitly. With this, the local variable boost_supported isn't required anymore. Signed-off-by: Viresh Kumar <[email protected]>
1 parent 98f39e9 commit a3f48fb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
*/
3535
static LIST_HEAD(cpu_data_list);
3636

37-
static bool boost_supported;
38-
3937
static struct cpufreq_driver cppc_cpufreq_driver;
4038

4139
#ifdef CONFIG_ACPI_CPPC_CPUFREQ_FIE
@@ -653,7 +651,7 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
653651
* is supported.
654652
*/
655653
if (caps->highest_perf > caps->nominal_perf)
656-
boost_supported = true;
654+
policy->boost_supported = true;
657655

658656
/* Set policy->cur to max now. The governors will adjust later. */
659657
policy->cur = cppc_perf_to_khz(caps, caps->highest_perf);
@@ -791,11 +789,6 @@ static int cppc_cpufreq_set_boost(struct cpufreq_policy *policy, int state)
791789
struct cppc_perf_caps *caps = &cpu_data->perf_caps;
792790
int ret;
793791

794-
if (!boost_supported) {
795-
pr_err("BOOST not supported by CPU or firmware\n");
796-
return -EINVAL;
797-
}
798-
799792
if (state)
800793
policy->max = cppc_perf_to_khz(caps, caps->highest_perf);
801794
else

0 commit comments

Comments
 (0)