diff --git a/drivers/gpu/nvgpu/common/regops/regops.c b/drivers/gpu/nvgpu/common/regops/regops.c index 72c8a6ea2..cd4c7324c 100644 --- a/drivers/gpu/nvgpu/common/regops/regops.c +++ b/drivers/gpu/nvgpu/common/regops/regops.c @@ -86,7 +86,7 @@ static bool validate_reg_ops(struct gk20a *g, int exec_regops_gk20a(struct gk20a *g, struct channel_gk20a *ch, struct nvgpu_dbg_reg_op *ops, - u64 num_ops, + u32 num_ops, bool is_profiler, bool *is_current_ctx) { diff --git a/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.c b/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.c index 8828ffe65..4e9a2324d 100644 --- a/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.c +++ b/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.c @@ -35,7 +35,7 @@ int vgpu_exec_regops(struct gk20a *g, struct channel_gk20a *ch, struct nvgpu_dbg_reg_op *ops, - u64 num_ops, + u32 num_ops, bool is_profiler, bool *is_current_ctx) { diff --git a/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.h b/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.h index c6b6eb9a2..759b03197 100644 --- a/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.h +++ b/drivers/gpu/nvgpu/common/vgpu/debugger_vgpu.h @@ -32,7 +32,7 @@ struct channel_gk20a; int vgpu_exec_regops(struct gk20a *g, struct channel_gk20a *ch, struct nvgpu_dbg_reg_op *ops, - u64 num_ops, + u32 num_ops, bool is_profiler, bool *is_current_ctx); int vgpu_dbg_set_powergate(struct dbg_session_gk20a *dbg_s, diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 78193dfde..9ec859ace 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -1479,7 +1479,7 @@ struct gpu_ops { int (*exec_regops)(struct gk20a *g, struct channel_gk20a *ch, struct nvgpu_dbg_reg_op *ops, - u64 num_ops, + u32 num_ops, bool is_profiler, bool *is_current_ctx); const struct regop_offset_range* ( diff --git a/drivers/gpu/nvgpu/include/nvgpu/regops.h b/drivers/gpu/nvgpu/include/nvgpu/regops.h index 7a7a0126e..5305947dc 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/regops.h +++ b/drivers/gpu/nvgpu/include/nvgpu/regops.h @@ -78,7 +78,7 @@ struct regop_offset_range { int exec_regops_gk20a(struct gk20a *g, struct channel_gk20a *ch, struct nvgpu_dbg_reg_op *ops, - u64 num_ops, + u32 num_ops, bool is_profiler, bool *is_current_ctx); diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index 5823c8be9..0b7a3eac7 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c @@ -857,7 +857,7 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, return -ENOMEM; while (ops_offset < args->num_ops && !err) { - const u64 num_ops = + const u32 num_ops = min(args->num_ops - ops_offset, (u64)(g->dbg_regops_tmp_buf_ops)); const u64 fragment_size = @@ -868,7 +868,7 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, (args->ops + ops_offset * sizeof(struct nvgpu_dbg_gpu_reg_op)); - nvgpu_log_fn(g, "Regops fragment: start_op=%llu ops=%llu", + nvgpu_log_fn(g, "Regops fragment: start_op=%llu ops=%u", ops_offset, num_ops); nvgpu_log_fn(g, "Copying regops from userspace");