Commit a8e1942d authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

cpufreq: intel_pstate: Eliminate intel_pstate_get_base_pstate()

There is only one caller of intel_pstate_get_base_pstate() and it is
more straightforward to carry out the computation directly in the
caller, so do that and drop intel_pstate_get_base_pstate().

No intentional changes of behavior.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent fa93b51c
...@@ -1445,12 +1445,6 @@ static int knl_get_turbo_pstate(void) ...@@ -1445,12 +1445,6 @@ static int knl_get_turbo_pstate(void)
return ret; return ret;
} }
static int intel_pstate_get_base_pstate(struct cpudata *cpu)
{
return global.no_turbo || global.turbo_disabled ?
cpu->pstate.max_pstate : cpu->pstate.turbo_pstate;
}
static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
{ {
trace_cpu_frequency(pstate * cpu->pstate.scaling, cpu->cpu); trace_cpu_frequency(pstate * cpu->pstate.scaling, cpu->cpu);
...@@ -1973,7 +1967,8 @@ static void intel_pstate_update_perf_limits(struct cpufreq_policy *policy, ...@@ -1973,7 +1967,8 @@ static void intel_pstate_update_perf_limits(struct cpufreq_policy *policy,
if (hwp_active) { if (hwp_active) {
intel_pstate_get_hwp_max(cpu->cpu, &turbo_max, &max_state); intel_pstate_get_hwp_max(cpu->cpu, &turbo_max, &max_state);
} else { } else {
max_state = intel_pstate_get_base_pstate(cpu); max_state = global.no_turbo || global.turbo_disabled ?
cpu->pstate.max_pstate : cpu->pstate.turbo_pstate;
turbo_max = cpu->pstate.turbo_pstate; turbo_max = cpu->pstate.turbo_pstate;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment