From: Brice Goglin Date: Thu, 13 Feb 2014 08:46:35 +0000 (+0100) Subject: Revert "x86: check hwloc_have_cpuid() in the backend instantiate instead of late... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=490c4cd5887c4e5ea79a725e16ee4509c3235e01;p=people%2Fandrewcoop%2Fhwloc.git 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. --- 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;