From: Greg Kroah-Hartman Date: Tue, 2 Jul 2024 09:14:23 +0000 (+0200) Subject: Revert "cpufreq: amd-pstate: Fix the inconsistency in max frequency units" X-Git-Tag: v6.1.97~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=978e27ff314a09ed8426c36597402d621725bb7f;p=thirdparty%2Fkernel%2Fstable.git Revert "cpufreq: amd-pstate: Fix the inconsistency in max frequency units" This reverts commit 82590ce3a0d0f26d06b0a70886ca2d444e64acbf which is commit e4731baaf29438508197d3a8a6d4f5a8c51663f8 upstream. It causes a regression in kernels older than 6.9.y, so drop it from here. Link: https://lore.kernel.org/r/18882bfe-4ca5-495c-ace5-b9bcab796ae5@amd.com Reported-by: Lars Wendler Cc: Dhananjay Ugwekar Cc: Mario Limonciello Cc: Gautham R. Shenoy Cc: Peter Jung Cc: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 9f147e9eafb63..90dcf26f09731 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -424,7 +424,7 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state) if (state) policy->cpuinfo.max_freq = cpudata->max_freq; else - policy->cpuinfo.max_freq = cpudata->nominal_freq * 1000; + policy->cpuinfo.max_freq = cpudata->nominal_freq; policy->max = policy->cpuinfo.max_freq;