summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-06-20 15:18:47 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-21 20:34:49 -0400
commit92c43deefca150854193c6720717d56b61989c23 (patch)
tree2dbfdcdb3a0809b80d4fc50e1d882326e54c7d17 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
parent2ffbdc50d884215ba043e8afd3c3bcbefd1e66f8 (diff)
gpu: nvgpu: Remove Linux devnode fields from gk20a
Move Linux devnode related fields to a new header file os_linux.h. The class structure is defined in module.c, so move its declaration to module.h. JIRA NVGPU-38 Change-Id: I5d8920169064f4289ff61004f7f81543a9aba221 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1505927 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
index 77890da8..84edacbb 100644
--- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
@@ -32,6 +32,7 @@
32#include "gr_gk20a.h" 32#include "gr_gk20a.h"
33#include "dbg_gpu_gk20a.h" 33#include "dbg_gpu_gk20a.h"
34#include "regops_gk20a.h" 34#include "regops_gk20a.h"
35#include "common/linux/os_linux.h"
35 36
36#include <nvgpu/hw/gk20a/hw_therm_gk20a.h> 37#include <nvgpu/hw/gk20a/hw_therm_gk20a.h>
37#include <nvgpu/hw/gk20a/hw_gr_gk20a.h> 38#include <nvgpu/hw/gk20a/hw_gr_gk20a.h>
@@ -115,6 +116,7 @@ static int alloc_profiler(struct gk20a *g,
115static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, 116static int gk20a_dbg_gpu_do_dev_open(struct inode *inode,
116 struct file *filp, bool is_profiler) 117 struct file *filp, bool is_profiler)
117{ 118{
119 struct nvgpu_os_linux *l;
118 struct dbg_session_gk20a *dbg_session; 120 struct dbg_session_gk20a *dbg_session;
119 struct gk20a *g; 121 struct gk20a *g;
120 122
@@ -123,12 +125,12 @@ static int gk20a_dbg_gpu_do_dev_open(struct inode *inode,
123 int err; 125 int err;
124 126
125 if (!is_profiler) 127 if (!is_profiler)
126 g = container_of(inode->i_cdev, 128 l = container_of(inode->i_cdev,
127 struct gk20a, dbg.cdev); 129 struct nvgpu_os_linux, dbg.cdev);
128 else 130 else
129 g = container_of(inode->i_cdev, 131 l = container_of(inode->i_cdev,
130 struct gk20a, prof.cdev); 132 struct nvgpu_os_linux, prof.cdev);
131 g = gk20a_get(g); 133 g = gk20a_get(&l->g);
132 if (!g) 134 if (!g)
133 return -ENODEV; 135 return -ENODEV;
134 136