Changeset 50286 in vbox
- Timestamp:
- Jan 30, 2014 1:34:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
r44529 r50286 120 120 /** Level 4 */ 121 121 {ACPI_CPU_PATH_NOT_PROBED, g_aAcpiCpuPathLvl4, RT_ELEMENTS(g_aAcpiCpuPathLvl4), NULL, NULL}, 122 }; 123 124 /** 125 * Possible directories to get to the topology directory for reading core and package id. 126 * 127 * @remark: This is not part of the path above because the eject file is not in one of the directories 128 * below and would make the hot unplug code fail. 129 */ 130 const char *g_apszTopologyPath[] = 131 { 132 "sysdev", 133 "physical_node" 122 134 }; 123 135 #endif … … 278 290 { 279 291 /* Get the sysdev */ 280 uint32_t idCore = RTLinuxSysFsReadIntFile(10, "%s/sysdev/topology/core_id", 281 pszPathCurr); 282 uint32_t idPackage = RTLinuxSysFsReadIntFile(10, "%s/sysdev/topology/physical_package_id", 283 pszPathCurr); 292 uint32_t idCore = 0; 293 uint32_t idPackage = 0; 294 295 for (unsigned i = 0; i < RT_ELEMENTS(g_apszTopologyPath); i++) 296 { 297 int64_t i64Core = RTLinuxSysFsReadIntFile(10, "%s/%s/topology/core_id", 298 pszPathCurr, g_apszTopologyPath[i]); 299 int64_t i64Package = RTLinuxSysFsReadIntFile(10, "%s/%s/topology/physical_package_id", 300 pszPathCurr, g_apszTopologyPath[i]); 301 302 if ( i64Core != -1 303 && i64Package != -1) 304 { 305 idCore = (uint32_t)i64Core; 306 idPackage = (uint32_t)i64Package; 307 break; 308 } 309 } 310 284 311 if ( idCore == idCpuCore 285 312 && idPackage == idCpuPackage)
Note:
See TracChangeset
for help on using the changeset viewer.