summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
diff options
context:
space:
mode:
authorFelix Kuehling2017-11-28 00:29:51 +0100
committerOded Gabbay2017-11-28 00:29:51 +0100
commit5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85 (patch)
tree0168ef943a802dc9b351841bd4b6ddaa5587efb9 /drivers/gpu/drm/amd/amdkfd/kfd_priv.h
parentdrm/amdkfd: Get reference to lead_thread task struct (diff)
downloadkernel-qcow2-linux-5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85.tar.gz
kernel-qcow2-linux-5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85.tar.xz
kernel-qcow2-linux-5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85.zip
drm/amdkfd: Make kfd_process reference counted
This will be used to elliminate the use of the process lock for preventing concurrent process destruction. This will simplify lock dependencies between KFD and KGD. This also simplifies the process destruction in a few ways: * Don't allocate work struct dynamically * Remove unnecessary hack that increments mm reference counter * Remove unnecessary process locking during destruction 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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_priv.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_priv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index dca493b4e17d..248e4f510824 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -34,6 +34,7 @@
#include <linux/idr.h>
#include <linux/kfifo.h>
#include <linux/seq_file.h>
+#include <linux/kref.h>
#include <kgd_kfd_interface.h>
#include "amd_shared.h"
@@ -537,6 +538,9 @@ struct kfd_process {
*/
void *mm;
+ struct kref ref;
+ struct work_struct release_work;
+
struct mutex mutex;
/*