drm/amdkfd: Use prange->list head for insert_list
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 8 Dec 2021 22:33:48 +0000 (17:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jan 2022 20:44:27 +0000 (15:44 -0500)
commitef3b4137aa09a9ad38f42d4de087cedf1b98c521
treef9816e95757cfd2ee8ea76dbb648df124491c2ef
parent9b7a4de9f126d8c8d59052088213990159417d5b
drm/amdkfd: Use prange->list head for insert_list

There are seven list_heads in struct svm_range: list, update_list,
remove_list, insert_list, svm_bo_list, deferred_list, child_list. This
patch and the next one remove two of them that are redundant.

The insert_list head was only used for new ranges that are not on the
svms->list yet. So we can use that list head for keeping track of
new ranges before they get added, and use list_move_tail to move them
to the svms->list when ready.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h