]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Cleanup IO links during KFD device removal
authorMukul Joshi <mukul.joshi@amd.com>
Thu, 7 Apr 2022 00:07:37 +0000 (20:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Apr 2022 13:14:22 +0000 (09:14 -0400)
commit9182f42816bda157e8d7658dcd8996cb6acbccaf
treebdcd722661d52973c15ffee0ce00a51c5c1adc20
parent2cab976dc4adb975c29456bb4141d3ba6fdb211b
drm/amdkfd: Cleanup IO links during KFD device removal

Currently, the IO-links to the device being removed from topology,
are not cleared. As a result, there would be dangling links left in
the KFD topology. This patch aims to fix the following:
1. Cleanup all IO links to the device being removed.
2. Ensure that node numbering in sysfs and nodes proximity domain
   values are consistent after the device is removed:
   a. Adding a device and removing a GPU device are made mutually
      exclusive.
   b. The global proximity domain counter is no longer required to be
      an atomic counter. A normal 32-bit counter can be used instead.
3. Update generation_count to let user-mode know that topology has
   changed due to device removal.

CC: Shuotao Xu <shuotaoxu@microsoft.com>
Reviewed-by: Shuotao Xu <shuotaoxu@microsoft.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_crat.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_topology.c