aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
diff options
context:
space:
mode:
authorMukul Joshi <mukul.joshi@amd.com>2022-04-20 11:34:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-04-28 17:44:35 -0400
commit98447635b5dc4be078b26376285d3f3a6fa31094 (patch)
treea0becf4a9d2ad1e968da83461f4f413b3217222a /drivers/gpu/drm/amd/amdkfd/kfd_topology.c
parentdrm/amdkfd: Use non-atomic bitmap functions when possible (diff)
downloadlinux-dev-98447635b5dc4be078b26376285d3f3a6fa31094.tar.xz
linux-dev-98447635b5dc4be078b26376285d3f3a6fa31094.zip
drm/amdkfd: Fix updating IO links during device removal
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: 46d18d510d7831 ("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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_topology.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_topology.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 8b7710b4d3ed..4283afd60fa5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -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--;
}
}
-
}
}