From c99b16128082de519975aa147d9da3e40380de67 Mon Sep 17 00:00:00 2001 From: Philip Yang Date: Tue, 1 Aug 2023 11:38:32 -0400 Subject: [PATCH] drm/amdkfd: Remove svm range validated_once flag 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 Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 +--- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index fc40377eb55b6..136a7a969d480 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -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); diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h index 78bfb83cd0c01..5fd958a97a280 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h @@ -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; }; -- 2.39.5