Skip to content

Commit 59eca2f

Browse files
Pu Weningomolnar
authored andcommitted
x86/cpu/hygon: Set __max_die_per_package on Hygon
Set the maximum DIE per package variable on Hygon using the nodes_per_socket value in order to do per-DIE manipulations for drivers such as powercap. Signed-off-by: Pu Wen <puwen@hygon.cn> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20210302020217.1827-1-puwen@hygon.cn
1 parent a38fd87 commit 59eca2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/x86/kernel/cpu/hygon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,12 @@ static void bsp_init_hygon(struct cpuinfo_x86 *c)
215215
u32 ecx;
216216

217217
ecx = cpuid_ecx(0x8000001e);
218-
nodes_per_socket = ((ecx >> 8) & 7) + 1;
218+
__max_die_per_package = nodes_per_socket = ((ecx >> 8) & 7) + 1;
219219
} else if (boot_cpu_has(X86_FEATURE_NODEID_MSR)) {
220220
u64 value;
221221

222222
rdmsrl(MSR_FAM10H_NODE_ID, value);
223-
nodes_per_socket = ((value >> 3) & 7) + 1;
223+
__max_die_per_package = nodes_per_socket = ((value >> 3) & 7) + 1;
224224
}
225225

226226
if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&

0 commit comments

Comments
 (0)