gpu: nvgpu: warn on nested ctx patch begin

Add WARN_ON to a critical error condition to get a backtrace dump.

Bug 200046882

Change-Id: I76c4186024547c6e89f1465612fe17f44e27eefe
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
This commit is contained in:
Konsta Holtta
2014-10-28 10:07:55 +02:00
committed by Dan Willemsen
parent 200f63ce7b
commit 7784fb18a3

View File

@@ -593,7 +593,7 @@ int gr_gk20a_ctx_patch_write_begin(struct gk20a *g,
struct channel_ctx_gk20a *ch_ctx)
{
/* being defensive still... */
if (ch_ctx->patch_ctx.cpu_va) {
if (WARN_ON(ch_ctx->patch_ctx.cpu_va)) {
gk20a_err(dev_from_gk20a(g), "nested ctx patch begin?");
return -EBUSY;
}