drm/amdkfd: Replace cpu_relax() with schedule() in DQM
authorOded Gabbay <oded.gabbay@amd.com>
Thu, 15 Jan 2015 10:01:10 +0000 (12:01 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Thu, 15 Jan 2015 10:01:10 +0000 (12:01 +0200)
In order not to occupy the current core and thus prevent the core from
servicing IOMMU PPR requests, this patch replaces the call in DQM to
cpu_relax() with a call to schedule().

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

index fad6877..e804e87 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/types.h>
 #include <linux/printk.h>
 #include <linux/bitops.h>
+#include <linux/sched.h>
 #include "kfd_priv.h"
 #include "kfd_device_queue_manager.h"
 #include "kfd_mqd_manager.h"
@@ -829,7 +830,7 @@ static int fence_wait_timeout(unsigned int *fence_addr,
                        pr_err("kfd: qcm fence wait loop timeout expired\n");
                        return -ETIME;
                }
-               cpu_relax();
+               schedule();
        }
 
        return 0;