gpu: nvgpu: Clean up ioctl_dbg.h

ioctl_dbg.h contained several unnecessary #includes. Replace them
with forward declarations. Also move all definitions only used
by ioctl_dbg.h to ioctl_dbg.c.

Change-Id: I799c8574e985f394eb653a7b7c54816ff409b058
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1768259
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2018-07-02 10:24:03 -07:00
committed by mobile promotions
parent 5deab014f7
commit bd5c2cef16
2 changed files with 22 additions and 21 deletions

View File

@@ -21,6 +21,7 @@
#include <linux/cdev.h>
#include <linux/uaccess.h>
#include <linux/dma-buf.h>
#include <linux/poll.h>
#include <uapi/linux/nvgpu.h>
#include <nvgpu/kmem.h>
@@ -40,6 +41,22 @@
#include "platform_gk20a.h"
#include "ioctl_dbg.h"
struct dbg_session_gk20a_linux {
struct device *dev;
struct dbg_session_gk20a dbg_s;
};
struct dbg_session_channel_data_linux {
/*
* We have to keep a ref to the _file_, not the channel, because
* close(channel_fd) is synchronous and would deadlock if we had an
* open debug session fd holding a channel ref at that time. Holding a
* ref to the file makes close(channel_fd) just drop a kernel ref to
* the file; the channel will close when the last file ref is dropped.
*/
struct file *ch_f;
struct dbg_session_channel_data ch_data;
};
/* turn seriously unwieldy names -> something shorter */
#define REGOP_LINUX(x) NVGPU_DBG_GPU_REG_OP_##x