From 7eabc16b8488e20a6cbfe1a80dc99a0b046750eb Mon Sep 17 00:00:00 2001 From: David Nieto Date: Thu, 6 Apr 2017 15:46:36 -0700 Subject: gpu: nvgpu: defer channel worker initialization kthread_run can fail if SIGKILL is triggered on an application during driver load. On this change we defer the channel worker init to the enqueue to avoid this condition during driver power on which would cause the driver state to be corrupted leaving subsequent attempts to load the driver unsuccesful. By moving this code to a later time, it is now needed to protect the task structure with a mutex. JIRA: EVLR-956 Bug 1816515 Change-Id: I3a159de2d1f03e70b2a3969730a927532ede2d6e Signed-off-by: David Nieto Reviewed-on: http://git-master/r/1462490 Reviewed-by: Alex Waterman Reviewed-by: Vladislav Buzov Reviewed-on: https://git-master.nvidia.com/r/1460689 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 0cd77d1e..35d58ef1 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1215,6 +1215,7 @@ struct gk20a { struct nvgpu_cond wq; struct nvgpu_list_node items; struct nvgpu_spinlock items_lock; + struct nvgpu_mutex start_lock; } channel_worker; struct gk20a_scale_profile *scale_profile; -- cgit v1.2.2