gpu: nvgpu: validate reg ops always

Call validate_reg_ops() even when allow_all is set, since that function
takes care of counting ctxsw regops which would not be executed without
the counters set.

Bug 1517458

Change-Id: Ie6173229fb6580e8812b7d2a52bfa8661f3d95e5
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/709439
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Sandarbh Jain <sanjain@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Konsta Holtta
2015-02-19 15:20:32 +02:00
committed by Dan Willemsen
parent 142c377d60
commit f93a8cc36b

View File

@@ -1,7 +1,7 @@
/*
* Tegra GK20A GPU Debugger Driver Register Ops
*
* Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2013-2015, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -403,9 +403,9 @@ int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s,
if (gk20a_gpu_is_virtual(dbg_s->pdev))
return -ENOSYS;
ok = g->allow_all || validate_reg_ops(dbg_s,
ok = validate_reg_ops(dbg_s,
&ctx_rd_count, &ctx_wr_count,
ops, num_ops);
ops, num_ops) || g->allow_all;
if (!ok) {
dev_err(dbg_s->dev, "invalid op(s)");
err = -EINVAL;