]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:57:01 +0000 (11:57 +0100)
[ Upstream commit c99b16128082de519975aa147d9da3e40380de67 ]

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>
Stable-dep-of: eb3c357bcb28 ("drm/amdkfd: Handle errors from svm validate and map")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h

index 4c1b72194a6f8d35d03a7ceaa6f146ec8aab8915..8cbfe18d16c6e49f7be5c9f9cc06ddaaf27ccfa8 100644 (file)
@@ -1685,10 +1685,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 21b14510882b89364a0b2dce47745b4242cb0338..21ca57992e05496df57420d76e14abe9189b615f 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;
 };