drm/amdkfd: shrink bitmap size in struct svm_validate_context
authorLang Yu <Lang.Yu@amd.com>
Tue, 12 Apr 2022 02:41:53 +0000 (10:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Apr 2022 13:14:22 +0000 (09:14 -0400)
A MAX_GPU_INSTANCE bits bitmap will suffice.

Signed-off-by: Lang Yu <Lang.Yu@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

index 8b6adc1..459fa07 100644 (file)
@@ -1370,7 +1370,7 @@ struct svm_validate_context {
        struct kfd_process *process;
        struct svm_range *prange;
        bool intr;
-       unsigned long bitmap[MAX_GPU_INSTANCE];
+       DECLARE_BITMAP(bitmap, MAX_GPU_INSTANCE);
        struct ttm_validate_buffer tv[MAX_GPU_INSTANCE];
        struct list_head validate_list;
        struct ww_acquire_ctx ticket;