Skip to content

Commit 64a3f86

Browse files
committed
x86: re-enable the gathering of topoext node IDs
It was disabled in 131fbc8 when cleaning up the disabling of topoext NUMA node building. Node IDs are still useful for identifying nearby cores on some old platforms, eg Hygon Dhyana (at least some prototypes). The overhead is negligigle anyway. Signed-off-by: Brice Goglin <[email protected]> (cherry picked from commit 5f38bbc)
1 parent 532cea7 commit 64a3f86

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hwloc/topology-x86.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static void read_amd_cores_legacy(struct procinfo *infos, struct cpuiddump *src_
488488
}
489489

490490
/* AMD unit/node from CPUID 0x8000001e leaf (topoext) */
491-
static void read_amd_cores_topoext(struct hwloc_x86_backend_data_s *data, struct procinfo *infos, unsigned long flags, struct cpuiddump *src_cpuiddump)
491+
static void read_amd_cores_topoext(struct hwloc_x86_backend_data_s *data, struct procinfo *infos, unsigned long flags __hwloc_attribute_unused, struct cpuiddump *src_cpuiddump)
492492
{
493493
unsigned apic_id, nodes_per_proc = 0;
494494
unsigned eax, ebx, ecx, edx;
@@ -497,7 +497,6 @@ static void read_amd_cores_topoext(struct hwloc_x86_backend_data_s *data, struct
497497
cpuid_or_from_dump(&eax, &ebx, &ecx, &edx, src_cpuiddump);
498498
infos->apicid = apic_id = eax;
499499

500-
if (flags & HWLOC_X86_DISC_FLAG_TOPOEXT_NUMANODES) {
501500
if (infos->cpufamilynumber == 0x16) {
502501
/* ecx is reserved */
503502
infos->ids[NODE] = 0;
@@ -512,7 +511,6 @@ static void read_amd_cores_topoext(struct hwloc_x86_backend_data_s *data, struct
512511
|| (infos->cpufamilynumber == 0x19 && nodes_per_proc > 1)) {
513512
hwloc_debug("warning: undefined nodes_per_proc value %u, assuming it means %u\n", nodes_per_proc, nodes_per_proc);
514513
}
515-
}
516514

517515
if (infos->cpufamilynumber <= 0x16) { /* topoext appeared in 0x15 and compute-units were only used in 0x15 and 0x16 */
518516
unsigned cores_per_unit;

0 commit comments

Comments
 (0)