diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-09-06 09:12:22 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-09 18:56:28 +0200 |
| commit | 86cade7791a2160ced1b89db3796b0b1c2ce0e88 (patch) | |
| tree | bc92a826ab0dbff9551170c06e298cab977167e1 | |
| parent | e7f4f16ff1679b19760828d7dde04b4356b43000 (diff) | |
| download | linux-86cade7791a2160ced1b89db3796b0b1c2ce0e88.tar.gz linux-86cade7791a2160ced1b89db3796b0b1c2ce0e88.tar.bz2 linux-86cade7791a2160ced1b89db3796b0b1c2ce0e88.zip | |
cpufreq: intel_pstate: Fold intel_pstate_max_within_limits() into caller
[ Upstream commit 032c5565eb80edb6f2faeb31939540c897987119 ]
Fold intel_pstate_max_within_limits() into its only caller.
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Stable-dep-of: ac4e04d9e378 ("cpufreq: intel_pstate: Unchecked MSR aceess in legacy mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index b2da03cd8ebd..03c585113d56 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -2027,14 +2027,6 @@ static void intel_pstate_set_min_pstate(struct cpudata *cpu) intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate); } -static void intel_pstate_max_within_limits(struct cpudata *cpu) -{ - int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio); - - update_turbo_state(); - intel_pstate_set_pstate(cpu, pstate); -} - static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) { int perf_ctl_max_phys = pstate_funcs.get_max_physical(cpu->cpu); @@ -2608,12 +2600,15 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) intel_pstate_update_perf_limits(cpu, policy->min, policy->max); if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) { + int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio); + /* * NOHZ_FULL CPUs need this as the governor callback may not * be invoked on them. */ intel_pstate_clear_update_util_hook(policy->cpu); - intel_pstate_max_within_limits(cpu); + update_turbo_state(); + intel_pstate_set_pstate(cpu, pstate); } else { intel_pstate_set_update_util_hook(policy->cpu); } |
