Skip to content

Commit 032c556

Browse files
committed
cpufreq: intel_pstate: Fold intel_pstate_max_within_limits() into caller
Fold intel_pstate_max_within_limits() into its only caller. No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]>
1 parent e97a982 commit 032c556

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,14 +2012,6 @@ static void intel_pstate_set_min_pstate(struct cpudata *cpu)
20122012
intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
20132013
}
20142014

2015-
static void intel_pstate_max_within_limits(struct cpudata *cpu)
2016-
{
2017-
int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio);
2018-
2019-
update_turbo_state();
2020-
intel_pstate_set_pstate(cpu, pstate);
2021-
}
2022-
20232015
static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
20242016
{
20252017
int perf_ctl_max_phys = pstate_funcs.get_max_physical(cpu->cpu);
@@ -2594,12 +2586,15 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
25942586
intel_pstate_update_perf_limits(cpu, policy->min, policy->max);
25952587

25962588
if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) {
2589+
int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio);
2590+
25972591
/*
25982592
* NOHZ_FULL CPUs need this as the governor callback may not
25992593
* be invoked on them.
26002594
*/
26012595
intel_pstate_clear_update_util_hook(policy->cpu);
2602-
intel_pstate_max_within_limits(cpu);
2596+
update_turbo_state();
2597+
intel_pstate_set_pstate(cpu, pstate);
26032598
} else {
26042599
intel_pstate_set_update_util_hook(policy->cpu);
26052600
}

0 commit comments

Comments
 (0)