@@ -38,6 +38,7 @@ struct hwloc_x86_backend_data_s {
38
38
int apicid_unique ;
39
39
char * src_cpuiddump_path ;
40
40
int is_knl ;
41
+ int is_hybrid ;
41
42
};
42
43
43
44
/************************************
@@ -704,12 +705,13 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
704
705
}
705
706
706
707
if (highest_cpuid >= 0x1a && has_hybrid (features )) {
707
- /* Get hybrid cpu information from cpuid 0x1a */
708
+ /* Get hybrid cpu information from cpuid 0x1a on Intel */
708
709
eax = 0x1a ;
709
710
ecx = 0 ;
710
711
cpuid_or_from_dump (& eax , & ebx , & ecx , & edx , src_cpuiddump );
711
712
infos -> hybridcoretype = eax >> 24 ;
712
713
infos -> hybridnativemodel = eax & 0xffffff ;
714
+ data -> is_hybrid = 1 ;
713
715
}
714
716
715
717
/*********************************************************************************
@@ -1349,35 +1351,39 @@ look_procs(struct hwloc_backend *backend, struct procinfo *infos, unsigned long
1349
1351
if (data -> apicid_unique ) {
1350
1352
summarize (backend , infos , flags );
1351
1353
1352
- if (has_hybrid (features ) && !(topology -> flags & HWLOC_TOPOLOGY_FLAG_NO_CPUKINDS )) {
1354
+ if (data -> is_hybrid
1355
+ && !(topology -> flags & HWLOC_TOPOLOGY_FLAG_NO_CPUKINDS )) {
1353
1356
/* use hybrid info for cpukinds */
1354
- hwloc_bitmap_t atomset = hwloc_bitmap_alloc ();
1355
- hwloc_bitmap_t coreset = hwloc_bitmap_alloc ();
1356
- for (i = 0 ; i < nbprocs ; i ++ ) {
1357
- if (infos [i ].hybridcoretype == 0x20 )
1358
- hwloc_bitmap_set (atomset , i );
1359
- else if (infos [i ].hybridcoretype == 0x40 )
1360
- hwloc_bitmap_set (coreset , i );
1361
- }
1362
- /* register IntelAtom set if any */
1363
- if (!hwloc_bitmap_iszero (atomset )) {
1364
- struct hwloc_info_s infoattr ;
1365
- infoattr .name = (char * ) "CoreType" ;
1366
- infoattr .value = (char * ) "IntelAtom" ;
1367
- hwloc_internal_cpukinds_register (topology , atomset , HWLOC_CPUKIND_EFFICIENCY_UNKNOWN , & infoattr , 1 , 0 );
1368
- /* the cpuset is given to the callee */
1369
- } else {
1370
- hwloc_bitmap_free (atomset );
1371
- }
1372
- /* register IntelCore set if any */
1373
- if (!hwloc_bitmap_iszero (coreset )) {
1374
- struct hwloc_info_s infoattr ;
1375
- infoattr .name = (char * ) "CoreType" ;
1376
- infoattr .value = (char * ) "IntelCore" ;
1377
- hwloc_internal_cpukinds_register (topology , coreset , HWLOC_CPUKIND_EFFICIENCY_UNKNOWN , & infoattr , 1 , 0 );
1378
- /* the cpuset is given to the callee */
1379
- } else {
1380
- hwloc_bitmap_free (coreset );
1357
+ if (cpuid_type == intel ) {
1358
+ /* Hybrid Intel */
1359
+ hwloc_bitmap_t atomset = hwloc_bitmap_alloc ();
1360
+ hwloc_bitmap_t coreset = hwloc_bitmap_alloc ();
1361
+ for (i = 0 ; i < nbprocs ; i ++ ) {
1362
+ if (infos [i ].hybridcoretype == 0x20 )
1363
+ hwloc_bitmap_set (atomset , i );
1364
+ else if (infos [i ].hybridcoretype == 0x40 )
1365
+ hwloc_bitmap_set (coreset , i );
1366
+ }
1367
+ /* register IntelAtom set if any */
1368
+ if (!hwloc_bitmap_iszero (atomset )) {
1369
+ struct hwloc_info_s infoattr ;
1370
+ infoattr .name = (char * ) "CoreType" ;
1371
+ infoattr .value = (char * ) "IntelAtom" ;
1372
+ hwloc_internal_cpukinds_register (topology , atomset , HWLOC_CPUKIND_EFFICIENCY_UNKNOWN , & infoattr , 1 , 0 );
1373
+ /* the cpuset is given to the callee */
1374
+ } else {
1375
+ hwloc_bitmap_free (atomset );
1376
+ }
1377
+ /* register IntelCore set if any */
1378
+ if (!hwloc_bitmap_iszero (coreset )) {
1379
+ struct hwloc_info_s infoattr ;
1380
+ infoattr .name = (char * ) "CoreType" ;
1381
+ infoattr .value = (char * ) "IntelCore" ;
1382
+ hwloc_internal_cpukinds_register (topology , coreset , HWLOC_CPUKIND_EFFICIENCY_UNKNOWN , & infoattr , 1 , 0 );
1383
+ /* the cpuset is given to the callee */
1384
+ } else {
1385
+ hwloc_bitmap_free (coreset );
1386
+ }
1381
1387
}
1382
1388
}
1383
1389
}
@@ -1825,6 +1831,7 @@ hwloc_x86_component_instantiate(struct hwloc_topology *topology,
1825
1831
1826
1832
/* default values */
1827
1833
data -> is_knl = 0 ;
1834
+ data -> is_hybrid = 0 ;
1828
1835
data -> apicid_set = hwloc_bitmap_alloc ();
1829
1836
data -> apicid_unique = 1 ;
1830
1837
data -> src_cpuiddump_path = NULL ;
0 commit comments