Skip to contentSkip to conversation

drm/amdkfd: shrink bitmap size in struct svm_validate_context

PATCH In review Lang Yu 2 participants 2 messages Apr 12, 2022

Subsystems (3)
lore
Share & tools
lore

Lang Yu

author
#0 lore raw

PATCH 1/1 drm/amdkfd: shrink bitmap size in struct svm_validate_context

A MAX_GPU_INSTANCE bits bitmap will suffice.

---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +1 -1
index 8b6adc142e25..459fa07a3bcc 100644
@@ -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;
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 2022-04-11 um 23:06 schrieb Lang Yu:

Quoted 3 lines

A MAX_GPU_INSTANCE bits bitmap will suffice.

Thanks for catching that. The patch is

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +1 -1
index 8b6adc142e25..459fa07a3bcc 100644
@@ -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;