From: Dhananjay Ugwekar Date: Wed, 5 Feb 2025 11:25:19 +0000 (+0000) Subject: cpufreq/amd-pstate: Remove the unnecessary cpufreq_update_policy call X-Git-Tag: v6.15-rc1~191^2~4^2~2^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b899434857b0f1ab460b3c126cbed82ab9b52d43;p=thirdparty%2Fkernel%2Flinux.git cpufreq/amd-pstate: Remove the unnecessary cpufreq_update_policy call The update_limits callback is only called in two conditions. * When the preferred core rankings change. In which case, we just need to change the prefcore ranking in the cpudata struct. As there are no changes to any of the perf values, there is no need to call cpufreq_update_policy() * When the _PPC ACPI object changes, i.e. the highest allowed Pstate changes. The _PPC object is only used for a table based cpufreq driver like acpi-cpufreq, hence is irrelevant for CPPC based amd-pstate. Hence, the cpufreq_update_policy() call becomes unnecessary and can be removed. Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/20250205112523.201101-9-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello --- diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 9ab95ec1f8285..9c939be59042d 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -853,10 +853,6 @@ static void amd_pstate_update_limits(unsigned int cpu) sched_set_itmt_core_prio((int)cur_high, cpu); } cpufreq_cpu_put(policy); - - if (!highest_perf_changed) - cpufreq_update_policy(cpu); - } /*