Skip to content

Commit

Permalink
drm/amdkfd: Fix updating IO links during device removal
Browse files Browse the repository at this point in the history
The logic to update the IO links when a KFD device
is removed was not correct as it would miss updating
the proximity domain values for some nodes where the
node_from and node_to both were greater values than the
proximity domain value of the KFD device being removed
from topology.

Fixes: 46d18d5 ("drm/amdkfd: Cleanup IO links during KFD device removal")
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
mukjoshi authored and alexdeucher committed Apr 28, 2022
1 parent b8b9ba5 commit 9844763
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/amd/amdkfd/kfd_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1534,13 +1534,13 @@ static void kfd_topology_update_io_links(int proximity_domain)
list_del(&iolink->list);
dev->io_link_count--;
dev->node_props.io_links_count--;
} else if (iolink->node_from > proximity_domain) {
iolink->node_from--;
} else if (iolink->node_to > proximity_domain) {
iolink->node_to--;
} else {
if (iolink->node_from > proximity_domain)
iolink->node_from--;
if (iolink->node_to > proximity_domain)
iolink->node_to--;
}
}

}
}

Expand Down

0 comments on commit 9844763

Please sign in to comment.