From: Brice Goglin Date: Wed, 29 Jan 2014 19:07:09 +0000 (+0100) Subject: x86: Add uname info when not done yet, or at least set Architecture=x86/x86_64 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3e3c83928c6ee02a4bdfe7ba774019536df5d791;p=people%2Fandrewcoop%2Fhwloc.git x86: Add uname info when not done yet, or at least set Architecture=x86/x86_64 --- diff --git a/src/topology-x86.c b/src/topology-x86.c index cfbfa800..aeaa41ae 100644 --- a/src/topology-x86.c +++ b/src/topology-x86.c @@ -902,6 +902,17 @@ fulldiscovery: hwloc_setup_pu_level(topology, nbprocs); hwloc_obj_add_info(topology->levels[0][0], "Backend", "x86"); + +#ifdef HAVE_UNAME + hwloc_add_uname_info(topology); /* we already know is_thissystem() is true */ +#else + /* uname isn't available, manually setup the "Architecture" info */ +#ifdef HWLOC_X86_64_ARCH + hwloc_obj_add_info(topology->levels[0][0], "Architecture", "x86_64"); +#else + hwloc_obj_add_info(topology->levels[0][0], "Architecture", "x86"); +#endif +#endif return 1; }