diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3379-drm-amdkfd-Clean-up-the-data-structure-in-kfd_proces.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3379-drm-amdkfd-Clean-up-the-data-structure-in-kfd_proces.patch | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3379-drm-amdkfd-Clean-up-the-data-structure-in-kfd_proces.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3379-drm-amdkfd-Clean-up-the-data-structure-in-kfd_proces.patch new file mode 100644 index 00000000..3484c185 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3379-drm-amdkfd-Clean-up-the-data-structure-in-kfd_proces.patch @@ -0,0 +1,96 @@ +From 064aebdef25abbc3e1d920375f87113825a02870 Mon Sep 17 00:00:00 2001 +From: Yong Zhao <yong.zhao@amd.com> +Date: Wed, 1 Nov 2017 19:21:26 -0400 +Subject: [PATCH 3379/4131] drm/amdkfd: Clean up the data structure in + kfd_process + +A list of per-process queues is maintained in the +kfd_process_queue_manager, so the queues array in kfd_process is +redundant and in fact unused. + +Signed-off-by: Yong Zhao <yong.zhao@amd.com> +Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> +Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> +Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 ------ + drivers/gpu/drm/amd/amdkfd/kfd_process.c | 18 ------------------ + 2 files changed, 24 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +index 6a91a60..78b5d61 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +@@ -527,12 +527,6 @@ struct kfd_process { + + struct process_queue_manager pqm; + +- /* The process's queues. */ +- size_t queue_array_size; +- +- /* Size is queue_array_size, up to MAX_PROCESS_QUEUES. */ +- struct kfd_queue **queues; +- + /*Is the user space process 32 bit?*/ + bool is_32bit_user_mode; + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c +index 695fa2a..946f4d6 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c +@@ -35,13 +35,6 @@ struct mm_struct; + #include "kfd_dbgmgr.h" + + /* +- * Initial size for the array of queues. +- * The allocated size is doubled each time +- * it is exceeded up to MAX_PROCESS_QUEUES. +- */ +-#define INITIAL_QUEUE_ARRAY_SIZE 16 +- +-/* + * List of struct kfd_process (field kfd_process). + * Unique/indexed by mm_struct* + */ +@@ -187,8 +180,6 @@ static void kfd_process_wq_release(struct work_struct *work) + + mutex_destroy(&p->mutex); + +- kfree(p->queues); +- + kfree(p); + + kfree(work); +@@ -270,11 +261,6 @@ static struct kfd_process *create_process(const struct task_struct *thread) + if (!process) + goto err_alloc_process; + +- process->queues = kmalloc_array(INITIAL_QUEUE_ARRAY_SIZE, +- sizeof(process->queues[0]), GFP_KERNEL); +- if (!process->queues) +- goto err_alloc_queues; +- + process->pasid = kfd_pasid_alloc(); + if (process->pasid == 0) + goto err_alloc_pasid; +@@ -297,8 +283,6 @@ static struct kfd_process *create_process(const struct task_struct *thread) + + process->lead_thread = thread->group_leader; + +- process->queue_array_size = INITIAL_QUEUE_ARRAY_SIZE; +- + INIT_LIST_HEAD(&process->per_device_data); + + kfd_event_init_process(process); +@@ -327,8 +311,6 @@ static struct kfd_process *create_process(const struct task_struct *thread) + err_alloc_doorbells: + kfd_pasid_free(process->pasid); + err_alloc_pasid: +- kfree(process->queues); +-err_alloc_queues: + kfree(process); + err_alloc_process: + return ERR_PTR(err); +-- +2.7.4 + |