diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_dbg.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index 383bdca9..3156837b 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/cdev.h> | 21 | #include <linux/cdev.h> |
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <linux/dma-buf.h> | 23 | #include <linux/dma-buf.h> |
24 | #include <linux/poll.h> | ||
24 | #include <uapi/linux/nvgpu.h> | 25 | #include <uapi/linux/nvgpu.h> |
25 | 26 | ||
26 | #include <nvgpu/kmem.h> | 27 | #include <nvgpu/kmem.h> |
@@ -40,6 +41,22 @@ | |||
40 | #include "platform_gk20a.h" | 41 | #include "platform_gk20a.h" |
41 | #include "ioctl_dbg.h" | 42 | #include "ioctl_dbg.h" |
42 | 43 | ||
44 | struct dbg_session_gk20a_linux { | ||
45 | struct device *dev; | ||
46 | struct dbg_session_gk20a dbg_s; | ||
47 | }; | ||
48 | |||
49 | struct dbg_session_channel_data_linux { | ||
50 | /* | ||
51 | * We have to keep a ref to the _file_, not the channel, because | ||
52 | * close(channel_fd) is synchronous and would deadlock if we had an | ||
53 | * open debug session fd holding a channel ref at that time. Holding a | ||
54 | * ref to the file makes close(channel_fd) just drop a kernel ref to | ||
55 | * the file; the channel will close when the last file ref is dropped. | ||
56 | */ | ||
57 | struct file *ch_f; | ||
58 | struct dbg_session_channel_data ch_data; | ||
59 | }; | ||
43 | /* turn seriously unwieldy names -> something shorter */ | 60 | /* turn seriously unwieldy names -> something shorter */ |
44 | #define REGOP_LINUX(x) NVGPU_DBG_GPU_REG_OP_##x | 61 | #define REGOP_LINUX(x) NVGPU_DBG_GPU_REG_OP_##x |
45 | 62 | ||