drm/amdkfd: Decouple CRAT parsing from device list update
authorHarish Kasiviswanathan <harish.kasiviswanathan@amd.com>
Sat, 9 Dec 2017 04:08:52 +0000 (23:08 -0500)
committerOded Gabbay <oded.gabbay@gmail.com>
Sat, 9 Dec 2017 04:08:52 +0000 (23:08 -0500)
commit4f449311e9aa177bd224e7b13cb0f6a55c524bcb
treefcacee39110db75947b4f5fc0917da8c4afa6944
parent8e05247d4c23ff1c91682cf28d2ddb4210808e7d
drm/amdkfd: Decouple CRAT parsing from device list update

Currently, CRAT parsing is intertwined with topology_device_list and
hence repeated calls to kfd_parse_crat_table() will fail. Decouple
kfd_parse_crat_table() and topology_device_list.

kfd_parse_crat_table() will parse CRAT and add topology devices to a
temporary list temp_topology_device_list and then
kfd_topology_update_device_list will move contents from temporary list to
master list.

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_crat.c
drivers/gpu/drm/amd/amdkfd/kfd_crat.h
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h