From 050bb35feb96c6ff4729b631b3fe76fd04290bc8 Mon Sep 17 00:00:00 2001 From: Brice Goglin Date: Sat, 6 Dec 2014 15:35:14 +0100 Subject: [PATCH] hwloc: x86: use Group instead of Misc for unknown x2apic levels Misc are reserved for annotating the topology, the core doesn't like merging them. Group is more appropriate. (cherry picked from commit open-mpi/hwloc@3c476495912979ef6967c4d1db80d2657df2c347) Signed-off-by: Jeff Squyres --- opal/mca/hwloc/hwloc191/hwloc/src/topology-x86.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opal/mca/hwloc/hwloc191/hwloc/src/topology-x86.c b/opal/mca/hwloc/hwloc191/hwloc/src/topology-x86.c index e1db138e32..18ba6e8529 100644 --- a/opal/mca/hwloc/hwloc191/hwloc/src/topology-x86.c +++ b/opal/mca/hwloc/hwloc191/hwloc/src/topology-x86.c @@ -401,6 +401,7 @@ static void summarize(hwloc_topology_t topology, struct procinfo *infos, unsigne unsigned i, j, l, level, type; unsigned nbsockets = 0; int one = -1; + unsigned next_group_depth = topology->next_group_depth; for (i = 0; i < nbprocs; i++) if (infos[i].present) { @@ -580,9 +581,12 @@ static void summarize(hwloc_topology_t topology, struct procinfo *infos, unsigne hwloc_bitmap_clr(unknowns_cpuset, j); } } - unknown_obj = hwloc_alloc_setup_object(HWLOC_OBJ_MISC, unknownid); + unknown_obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, unknownid); unknown_obj->cpuset = unknown_cpuset; unknown_obj->os_level = level; + unknown_obj->attr->group.depth = topology->next_group_depth + level; + if (next_group_depth <= topology->next_group_depth + level) + next_group_depth = topology->next_group_depth + level + 1; hwloc_debug_2args_bitmap("os unknown%d %u has cpuset %s\n", level, unknownid, unknown_cpuset); hwloc_insert_object_by_cpuset(topology, unknown_obj); @@ -714,6 +718,7 @@ static void summarize(hwloc_topology_t topology, struct procinfo *infos, unsigne } hwloc_bitmap_free(complete_cpuset); + topology->next_group_depth = next_group_depth; } static int