]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
x86: Add uname info when not done yet, or at least set Architecture=x86/x86_64
authorBrice Goglin <Brice.Goglin@inria.fr>
Wed, 29 Jan 2014 19:07:09 +0000 (20:07 +0100)
committerBrice Goglin <Brice.Goglin@inria.fr>
Wed, 29 Jan 2014 19:10:19 +0000 (20:10 +0100)
src/topology-x86.c

index cfbfa800a1b545f2027391cc92282eacdb50bcee..aeaa41ae4a34a0dc0b51b31ec3039019edec8df5 100644 (file)
@@ -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;
 }