From 490c4cd5887c4e5ea79a725e16ee4509c3235e01 Mon Sep 17 00:00:00 2001 From: Brice Goglin Date: Thu, 13 Feb 2014 09:46:35 +0100 Subject: [PATCH] Revert "x86: check hwloc_have_cpuid() in the backend instantiate instead of late in the discovery" This reverts commit 6a1cb59936460ff798970929f0bd52fa8da2cc00. Don't require others caller of look_x86() (Xen soon) to manually check for cpuid availability at runtime. --- src/topology-x86.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/topology-x86.c b/src/topology-x86.c index f0856408..2194f5ef 100644 --- a/src/topology-x86.c +++ b/src/topology-x86.c @@ -830,6 +830,9 @@ int hwloc_look_x86(struct hwloc_topology *topology, unsigned nbprocs, int fulldi set_cpubind = fake_set_cpubind; } + if (!hwloc_have_cpuid()) + goto out; + infos = calloc(nbprocs, sizeof(struct procinfo)); if (NULL == infos) goto out; @@ -966,10 +969,6 @@ hwloc_x86_component_instantiate(struct hwloc_disc_component *component, const void *_data3 __hwloc_attribute_unused) { struct hwloc_backend *backend; - - if (!hwloc_have_cpuid()) - return NULL; - backend = hwloc_backend_alloc(component); if (!backend) return NULL; -- 2.39.5