diff options
author | sujeet baranwal <sbaranwal@nvidia.com> | 2015-03-02 18:36:22 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:58:04 -0400 |
commit | 895675e1d5790e2361b22edb50d702f7dd9a8edd (patch) | |
tree | dbe3586cec5351fd2c2eb13d91c258e663d73b08 /drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |
parent | cf0085ec231246748b34081d2786c29cedcbd706 (diff) |
gpu: nvgpu: Removal of regops from CUDA driver
The current CUDA drivers have been using the regops to
directly accessing the GPU registers from user space through
the dbg node. This is a security hole and needs to be avoided.
The patch alternatively implements the similar functionality
in the kernel and provide an ioctl for it.
Bug 200083334
Change-Id: Ic5ff5a215cbabe7a46837bc4e15efcceb0df0367
Signed-off-by: sujeet baranwal <sbaranwal@nvidia.com>
Reviewed-on: http://git-master/r/711758
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index 4c2b00a8..3d99e94d 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -533,10 +533,15 @@ static int gr_gm20b_ctx_state_floorsweep(struct gk20a *g) | |||
533 | + gpc_offset + tpc_offset, | 533 | + gpc_offset + tpc_offset, |
534 | gr_gpc0_tpc0_pe_cfg_smid_value_f(sm_id)); | 534 | gr_gpc0_tpc0_pe_cfg_smid_value_f(sm_id)); |
535 | 535 | ||
536 | g->gr.sm_to_cluster[sm_id].tpc_index = tpc_index; | ||
537 | g->gr.sm_to_cluster[sm_id].gpc_index = gpc_index; | ||
538 | |||
536 | sm_id++; | 539 | sm_id++; |
537 | } | 540 | } |
538 | } | 541 | } |
539 | 542 | ||
543 | gr->no_of_sm = sm_id; | ||
544 | |||
540 | for (gpc_index = 0; gpc_index < gr->gpc_count; gpc_index++) | 545 | for (gpc_index = 0; gpc_index < gr->gpc_count; gpc_index++) |
541 | tpc_per_gpc |= gr->gpc_tpc_count[gpc_index] | 546 | tpc_per_gpc |= gr->gpc_tpc_count[gpc_index] |
542 | << (gr_pd_num_tpc_per_gpc__size_1_v() * gpc_index); | 547 | << (gr_pd_num_tpc_per_gpc__size_1_v() * gpc_index); |