aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
diff options
context:
space:
mode:
authorGravatar Philip Yang <Philip.Yang@amd.com> 2022-04-18 21:32:14 -0400
committerGravatar Alex Deucher <alexander.deucher@amd.com> 2022-04-26 11:42:44 -0400
commit6b9c63a6eb540e678504a080865e9d3c716288ed (patch)
treed1f89b647efac0a9638ddeec7f9403bd4e2fc417 /drivers/gpu/drm/amd/amdkfd/kfd_svm.h
parentdrm/amd/display: 3.2.183 (diff)
downloadlinux-6b9c63a6eb540e678504a080865e9d3c716288ed.tar.gz
linux-6b9c63a6eb540e678504a080865e9d3c716288ed.tar.bz2
linux-6b9c63a6eb540e678504a080865e9d3c716288ed.zip
drm/amdkfd: Add SVM range mapped_to_gpu flag
To avoid unnecessary unmap SVM range from GPUs if range is not mapped on GPUs when migrating the range. This flag will also be used to flush TLB when updating the existing mapping on GPUs. It is protected by prange->migrate_mutex and mmap read lock in MMU notifier callback. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_svm.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_svm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
index 66c77f00ac3e..2d54147b4dda 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
@@ -133,6 +133,7 @@ struct svm_range {
DECLARE_BITMAP(bitmap_access, MAX_GPU_INSTANCE);
DECLARE_BITMAP(bitmap_aip, MAX_GPU_INSTANCE);
bool validated_once;
+ bool mapped_to_gpu;
};
static inline void svm_range_lock(struct svm_range *prange)