Skip to content

Commit

Permalink
cpufreq/amd-pstate: Use topology_logical_package_id() instead of logi…
Browse files Browse the repository at this point in the history
…cal_die_id()

commit 0d8584d upstream.

After the commit 63edbaa ("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: 63edbaa ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf")
cc: [email protected] # 6.10
Signed-off-by: Gautham R. Shenoy <[email protected]>
Tested-by: Dhananjay Ugwekar <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Dhananjay Ugwekar <[email protected]>
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gautshen authored and gregkh committed Sep 4, 2024
1 parent f71ec01 commit db84430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/amd-pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit db84430

Please sign in to comment.