Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Zhu Lingshan and committed by
Alex Deucher
78996e1e 07506945

+6
+2
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
··· 148 148 /* MMU-notifier related fields */ 149 149 struct mutex notifier_lock; 150 150 uint32_t evicted_bos; 151 + /* kfd context id */ 152 + u16 context_id; 151 153 struct delayed_work restore_userptr_work; 152 154 struct pid *pid; 153 155 bool block_mmu_notifications;
+4
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
··· 1397 1397 struct dma_fence **ef) 1398 1398 { 1399 1399 struct amdkfd_process_info *info = NULL; 1400 + struct kfd_process *process = NULL; 1400 1401 int ret; 1401 1402 1403 + process = container_of(process_info, struct kfd_process, kgd_process_info); 1402 1404 if (!*process_info) { 1403 1405 info = kzalloc(sizeof(*info), GFP_KERNEL); 1404 1406 if (!info) ··· 1426 1424 info->pid = get_task_pid(current->group_leader, PIDTYPE_PID); 1427 1425 INIT_DELAYED_WORK(&info->restore_userptr_work, 1428 1426 amdgpu_amdkfd_restore_userptr_worker); 1427 + 1428 + info->context_id = process->context_id; 1429 1429 1430 1430 *process_info = info; 1431 1431 }