|
@@ -34,13 +34,6 @@ struct mm_struct;
|
|
#include "kfd_priv.h"
|
|
#include "kfd_priv.h"
|
|
#include "kfd_dbgmgr.h"
|
|
#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).
|
|
* List of struct kfd_process (field kfd_process).
|
|
* Unique/indexed by mm_struct*
|
|
* Unique/indexed by mm_struct*
|
|
@@ -187,8 +180,6 @@ static void kfd_process_wq_release(struct work_struct *work)
|
|
|
|
|
|
mutex_destroy(&p->mutex);
|
|
mutex_destroy(&p->mutex);
|
|
|
|
|
|
- kfree(p->queues);
|
|
|
|
-
|
|
|
|
kfree(p);
|
|
kfree(p);
|
|
|
|
|
|
kfree(work);
|
|
kfree(work);
|
|
@@ -270,11 +261,6 @@ static struct kfd_process *create_process(const struct task_struct *thread)
|
|
if (!process)
|
|
if (!process)
|
|
goto err_alloc_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();
|
|
process->pasid = kfd_pasid_alloc();
|
|
if (process->pasid == 0)
|
|
if (process->pasid == 0)
|
|
goto err_alloc_pasid;
|
|
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->lead_thread = thread->group_leader;
|
|
|
|
|
|
- process->queue_array_size = INITIAL_QUEUE_ARRAY_SIZE;
|
|
|
|
-
|
|
|
|
INIT_LIST_HEAD(&process->per_device_data);
|
|
INIT_LIST_HEAD(&process->per_device_data);
|
|
|
|
|
|
kfd_event_init_process(process);
|
|
kfd_event_init_process(process);
|
|
@@ -327,8 +311,6 @@ err_mmu_notifier:
|
|
err_alloc_doorbells:
|
|
err_alloc_doorbells:
|
|
kfd_pasid_free(process->pasid);
|
|
kfd_pasid_free(process->pasid);
|
|
err_alloc_pasid:
|
|
err_alloc_pasid:
|
|
- kfree(process->queues);
|
|
|
|
-err_alloc_queues:
|
|
|
|
kfree(process);
|
|
kfree(process);
|
|
err_alloc_process:
|
|
err_alloc_process:
|
|
return ERR_PTR(err);
|
|
return ERR_PTR(err);
|