File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -843,6 +843,14 @@ hwloc__xml_import_object(hwloc_topology_t topology,
843
843
}
844
844
}
845
845
846
+ if (data -> version_major < 3 && obj -> type == HWLOC_OBJ_OS_DEVICE ) {
847
+ if (obj -> attr -> osdev .type == HWLOC_OBJ_OSDEV_STORAGE
848
+ && ((obj -> name && !strncmp (obj -> name , "dax" , 3 ))
849
+ || (obj -> subtype && !strcmp (obj -> subtype , "CXLMem" ))))
850
+ obj -> attr -> osdev .type = HWLOC_OBJ_OSDEV_MEMORY ;
851
+ }
852
+
853
+ /* filter AFTER having updated the osdevice attribute from v2 */
846
854
if (!hwloc_filter_check_keep_object (topology , obj )) {
847
855
/* Ignore this object instead of inserting it.
848
856
*
@@ -859,13 +867,6 @@ hwloc__xml_import_object(hwloc_topology_t topology,
859
867
/* insert_object_by_parent() doesn't merge during insert, so obj is still valid */
860
868
}
861
869
862
- if (data -> version_major < 3 && obj -> type == HWLOC_OBJ_OS_DEVICE ) {
863
- if (obj -> attr -> osdev .type == HWLOC_OBJ_OSDEV_STORAGE
864
- && ((obj -> name && !strncmp (obj -> name , "dax" , 3 ))
865
- || (obj -> subtype && !strcmp (obj -> subtype , "CXLMem" ))))
866
- obj -> attr -> osdev .type = HWLOC_OBJ_OSDEV_MEMORY ;
867
- }
868
-
869
870
/* process object subnodes, if we found one win the above loop */
870
871
while (tag ) {
871
872
int ret ;
You can’t perform that action at this time.
0 commit comments