From 036e4ea2442d27cdbce6d67683ea629ed82ed208 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 28 Sep 2017 14:27:41 +0300 Subject: gpu: nvgpu: make channel worker wait interruptible Change the wait for work pending condition to interruptible in the channel worker thread, as there's no reason to be noninterruptible. A noninterruptible wait, even one with a timeout, causes the worker to be printed in the Linux blocked tasks list which is confusing. Change the cond signal to interruptible to match this. Change-Id: I71d848b7f449a5d53fecae90c6a450c98c675c7f Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1570166 Reviewed-by: svc-mobile-coverity Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 6ed35c32..e3937afd 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1773,7 +1773,7 @@ static int __gk20a_channel_worker_wakeup(struct gk20a *g) */ put = nvgpu_atomic_inc_return(&g->channel_worker.put); - nvgpu_cond_signal(&g->channel_worker.wq); + nvgpu_cond_signal_interruptible(&g->channel_worker.wq); return put; } @@ -1867,7 +1867,7 @@ static int gk20a_channel_poll_worker(void *arg) while (!nvgpu_thread_should_stop(&worker->poll_task)) { int ret; - ret = NVGPU_COND_WAIT( + ret = NVGPU_COND_WAIT_INTERRUPTIBLE( &worker->wq, __gk20a_channel_worker_pending(g, get), watchdog_interval) > 0; -- cgit v1.2.2