Skip to content

Commit 98f39e9

Browse files
committed
cpufreq: amd: 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. The policy->boost_enabled flag is set by the cpufreq core once the policy is initialized, don't set it anymore. Signed-off-by: Viresh Kumar <[email protected]>
1 parent be6b868 commit 98f39e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
10041004
policy->cpuinfo.min_freq = min_freq;
10051005
policy->cpuinfo.max_freq = max_freq;
10061006

1007-
policy->boost_enabled = READ_ONCE(cpudata->boost_supported);
1007+
policy->boost_supported = READ_ONCE(cpudata->boost_supported);
10081008

10091009
/* It will be updated by governor */
10101010
policy->cur = policy->cpuinfo.min_freq;
@@ -1497,7 +1497,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
14971497
policy->min = policy->cpuinfo.min_freq;
14981498
policy->max = policy->cpuinfo.max_freq;
14991499

1500-
policy->boost_enabled = READ_ONCE(cpudata->boost_supported);
1500+
policy->boost_supported = READ_ONCE(cpudata->boost_supported);
15011501

15021502
/*
15031503
* Set the policy to provide a valid fallback value in case

0 commit comments

Comments
 (0)