Commit 3880d8e3 authored by Zhu Lingshan's avatar Zhu Lingshan Committed by Alex Deucher
Browse files

amdkfd: find_process_by_mm always return the primary context



Up until this commit, the kfd multiple contexts feature has
not been fully implemented in mainline kernel yet.

For backawrd compatibility, not break existing use cases,
this commit changes function find_process_by_mm, let it
always return the primary kfd_process.

Signed-off-by: default avatarZhu Lingshan <lingshan.zhu@amd.com>
Reviewed-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 42cbb68c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -935,7 +935,7 @@ static struct kfd_process *find_process_by_mm(const struct mm_struct *mm)

	hash_for_each_possible_rcu(kfd_processes_table, process,
					kfd_processes, (uintptr_t)mm)
		if (process->mm == mm)
		if (process->mm == mm && process->context_id == KFD_CONTEXT_ID_PRIMARY)
			return process;

	return NULL;