summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGautham R. Shenoy <gautham.shenoy@amd.com>2024-08-13 12:51:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-04 14:30:06 +0300
commitdb8443078a8a262de4dde8ec3357ee5e7b37f678 (patch)
tree9785846cf174cecc53e35716dedc48c0d345181d
parentf71ec019257ba4f7ab198bd948c5902a207bad96 (diff)
downloadlinux-db8443078a8a262de4dde8ec3357ee5e7b37f678.tar.xz
cpufreq/amd-pstate: Use topology_logical_package_id() instead of logical_die_id()
commit 0d8584d288a9b4132e945d76bcc04395d158b2e7 upstream. After the commit 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf"), the topolgy_logical_die_id() function returns the logical Core Chiplet Die (CCD) ID instead of the logical socket ID. Since this is currently used to set MSR_AMD_CPPC_ENABLE, which needs to be set on any one of the threads of the socket, it is prudent to use topology_logical_package_id() in place of topology_logical_die_id(). Fixes: 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf") cc: stable@vger.kernel.org # 6.10 Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Tested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Link: https://lore.kernel.org/lkml/20240801124509.3650-1-Dhananjay.Ugwekar@amd.com/ Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/cpufreq/amd-pstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 67c4a6a0ef12..6f59403c91e0 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -329,7 +329,7 @@ static inline int pstate_enable(bool enable)
return 0;
for_each_present_cpu(cpu) {
- unsigned long logical_id = topology_logical_die_id(cpu);
+ unsigned long logical_id = topology_logical_package_id(cpu);
if (test_bit(logical_id, &logical_proc_id_mask))
continue;