aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1142-drm-amdkfd-Reuse-function-to-find-a-process-through-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1142-drm-amdkfd-Reuse-function-to-find-a-process-through-.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1142-drm-amdkfd-Reuse-function-to-find-a-process-through-.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1142-drm-amdkfd-Reuse-function-to-find-a-process-through-.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1142-drm-amdkfd-Reuse-function-to-find-a-process-through-.patch
new file mode 100644
index 00000000..fce012ab
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1142-drm-amdkfd-Reuse-function-to-find-a-process-through-.patch
@@ -0,0 +1,51 @@
+From f3d6f77ba7e3af3c3a1861196aa47d046b194f88 Mon Sep 17 00:00:00 2001
+From: Yong Zhao <yong.zhao@amd.com>
+Date: Fri, 27 May 2016 18:40:21 -0400
+Subject: [PATCH 1142/4131] drm/amdkfd: Reuse function to find a process
+ through pasid
+
+The kfd_lookup_process_by_pasid() is just for that purpose, so use
+it instead of repeating the code. Meanwhile a small bug is fixed as
+well.
+
+Change-Id: I0e4907ebe13d81606786a0b5a47e58be2b48d92b
+Signed-off-by: Yong Zhao <yong.zhao@amd.com>
+
+ Conflicts:
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+index aaa433e..a6fd9c2 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+@@ -869,7 +869,7 @@ void kfd_process_device_remove_obj_handle(struct kfd_process_device *pdd,
+ /* This returns with process->lock read-locked. */
+ struct kfd_process *kfd_lookup_process_by_pasid(unsigned int pasid)
+ {
+- struct kfd_process *p;
++ struct kfd_process *p, *ret_p = NULL;
+ unsigned int temp;
+
+ int idx = srcu_read_lock(&kfd_processes_srcu);
+@@ -877,13 +877,14 @@ struct kfd_process *kfd_lookup_process_by_pasid(unsigned int pasid)
+ hash_for_each_rcu(kfd_processes_table, temp, p, kfd_processes) {
+ if (p->pasid == pasid) {
+ down_read(&p->lock);
++ ret_p = p;
+ break;
+ }
+ }
+
+ srcu_read_unlock(&kfd_processes_srcu, idx);
+
+- return p;
++ return ret_p;
+ }
+
+ /* This returns with process->lock read-locked. */
+--
+2.7.4
+