drm/amdkfd: Remove svm range validated_once flag
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 1 Aug 2023 15:38:32 +0000 (11:38 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Sep 2023 20:25:17 +0000 (16:25 -0400)
The validated_once flag is not used after the prefault was removed, The
prefault was needed to ensure validate all system memory pages at least
once before mapping or migrating the range to GPU.

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>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h

index fc40377..136a7a9 100644 (file)
@@ -1737,10 +1737,8 @@ unlock_out:
                addr = next;
        }
 
-       if (addr == end) {
-               prange->validated_once = true;
+       if (addr == end)
                prange->mapped_to_gpu = true;
-       }
 
 unreserve_out:
        svm_range_unreserve_bos(ctx);
index 78bfb83..5fd958a 100644 (file)
@@ -132,7 +132,6 @@ struct svm_range {
        struct list_head                child_list;
        DECLARE_BITMAP(bitmap_access, MAX_GPU_INSTANCE);
        DECLARE_BITMAP(bitmap_aip, MAX_GPU_INSTANCE);
-       bool                            validated_once;
        bool                            mapped_to_gpu;
        bool                            is_error_flag;
 };