diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2018-12-07 14:04:07 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-12-15 20:41:55 -0500 |
commit | 32672afbc03e4688b444e58494aa77168b7f2147 (patch) | |
tree | 5596ddda50a01f2552f86e3ad49c3afa6c206264 /drivers/gpu/nvgpu/include | |
parent | 2d3e99067ea47d66a9490c405dcebc46e7fcdf03 (diff) |
nvgpu: pmu: cleanup init thread on destroy
In nvgpu_kill_task_pg_init(), call nvgpu_thread_join()
if the init thread is no longer running in order to
reclaim thread resources.
Bug 2452799
JIRA ESRM-437
Change-Id: Id9c67f689027f00039ac2df226ee9c28ad89dd1d
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1967983
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1970058
Reviewed-by: Shmuel Ungerfeld <sungerfeld@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Shmuel Ungerfeld <sungerfeld@nvidia.com>
Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/thread.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/thread.h b/drivers/gpu/nvgpu/include/nvgpu/thread.h index b113f972..eac06ef1 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/thread.h +++ b/drivers/gpu/nvgpu/include/nvgpu/thread.h | |||
@@ -80,4 +80,13 @@ bool nvgpu_thread_should_stop(struct nvgpu_thread *thread); | |||
80 | */ | 80 | */ |
81 | bool nvgpu_thread_is_running(struct nvgpu_thread *thread); | 81 | bool nvgpu_thread_is_running(struct nvgpu_thread *thread); |
82 | 82 | ||
83 | /** | ||
84 | * nvgpu_thread_join - join a thread to reclaim resources | ||
85 | * after it has exited | ||
86 | * | ||
87 | * @thread - thread to join | ||
88 | * | ||
89 | */ | ||
90 | void nvgpu_thread_join(struct nvgpu_thread *thread); | ||
91 | |||
83 | #endif /* NVGPU_THREAD_H */ | 92 | #endif /* NVGPU_THREAD_H */ |