|
@@ -312,9 +312,9 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
|
|
node_id = ecx & 7;
|
|
node_id = ecx & 7;
|
|
|
|
|
|
/* get compute unit information */
|
|
/* get compute unit information */
|
|
- smp_num_siblings = ((ebx >> 8) & 3) + 1;
|
|
|
|
|
|
+ cores_per_cu = smp_num_siblings = ((ebx >> 8) & 3) + 1;
|
|
|
|
+ c->x86_max_cores /= smp_num_siblings;
|
|
c->compute_unit_id = ebx & 0xff;
|
|
c->compute_unit_id = ebx & 0xff;
|
|
- cores_per_cu += ((ebx >> 8) & 3);
|
|
|
|
} else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) {
|
|
} else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) {
|
|
u64 value;
|
|
u64 value;
|
|
|
|
|
|
@@ -329,8 +329,8 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
|
|
u32 cus_per_node;
|
|
u32 cus_per_node;
|
|
|
|
|
|
set_cpu_cap(c, X86_FEATURE_AMD_DCM);
|
|
set_cpu_cap(c, X86_FEATURE_AMD_DCM);
|
|
- cores_per_node = c->x86_max_cores / nodes_per_socket;
|
|
|
|
- cus_per_node = cores_per_node / cores_per_cu;
|
|
|
|
|
|
+ cus_per_node = c->x86_max_cores / nodes_per_socket;
|
|
|
|
+ cores_per_node = cus_per_node * cores_per_cu;
|
|
|
|
|
|
/* store NodeID, use llc_shared_map to store sibling info */
|
|
/* store NodeID, use llc_shared_map to store sibling info */
|
|
per_cpu(cpu_llc_id, cpu) = node_id;
|
|
per_cpu(cpu_llc_id, cpu) = node_id;
|