mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: cde: warn on double finish and release
Add WARN to conditions that should never happen, to help debugging any context issues. Bug 200052943 Change-Id: Ibe2a9507f3a62bb7b2e263ff3ff21a24a092a971 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/602885 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
cd072a192b
commit
2d7c5e1a5b
@@ -731,6 +731,8 @@ __releases(&cde_app->mutex)
|
||||
|
||||
mutex_lock(&cde_app->mutex);
|
||||
|
||||
WARN(!cde_ctx->in_use, "double release cde context %p", cde_ctx);
|
||||
|
||||
cde_ctx->in_use = false;
|
||||
list_move(&cde_ctx->list, &cde_app->free_contexts);
|
||||
cde_app->ctx_usecount--;
|
||||
@@ -1041,6 +1043,8 @@ __releases(&cde_app->mutex)
|
||||
return;
|
||||
|
||||
gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: finished %p", cde_ctx);
|
||||
WARN(!cde_ctx->in_use, "double finish cde context %p on channel %p",
|
||||
cde_ctx, ch);
|
||||
|
||||
if (ch->has_timedout) {
|
||||
if (cde_ctx->is_temporary) {
|
||||
|
||||
Reference in New Issue
Block a user