mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
amdkfd: record kfd context id into kfd process_info
This commit records the context id of the owner kfd_process into a kfd process_info when create it. Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
07506945e1
commit
78996e1e98
@@ -1397,8 +1397,10 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
|
||||
struct dma_fence **ef)
|
||||
{
|
||||
struct amdkfd_process_info *info = NULL;
|
||||
struct kfd_process *process = NULL;
|
||||
int ret;
|
||||
|
||||
process = container_of(process_info, struct kfd_process, kgd_process_info);
|
||||
if (!*process_info) {
|
||||
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
@@ -1425,6 +1427,8 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
|
||||
INIT_DELAYED_WORK(&info->restore_userptr_work,
|
||||
amdgpu_amdkfd_restore_userptr_worker);
|
||||
|
||||
info->context_id = process->context_id;
|
||||
|
||||
*process_info = info;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user