diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-10-25 12:56:09 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-29 14:02:15 -0400 |
commit | 4d2d890c01b94d10ad55643a4c2c159a98419efe (patch) | |
tree | 1043316e5e0dc163da79ae17c089b7818dc54d4b /drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h | |
parent | a681c505c96dba58231ac050e4c8f4f81d79540f (diff) |
gpu: nvgpu: Move ctxsw_trace_gk20a.c to common/linux
Migrate ctxsw_trace_gk20a.c to common/linux/ctxsw_trace.c. This
has been done becasue the ctxsw tracing code is currently too
tightly tied to the Linux OS due to usage of a couple system calls:
- poll()
- mmap()
And general Linux driver framework code. As a result pulling the
logic out of the FECS tracing code is simply too large a scope for
time time being.
Instead the code was just copied as much as possible. The HAL ops
for the FECS code was hidden behind the FECS tracing config so
that the vm_area_struct is not used when QNX does not define said
config. All other non-HAL functions called by the FECS ctxsw
tracing code ha now also been hidden by this config. This is not
pretty but for the time being it seems like the way to go.
JIRA NVGPU-287
Change-Id: Ib880ab237f4abd330dc66998692c86c4507149c2
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1586547
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h index b270581b..dddb8603 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #ifndef __CTXSW_TRACE_GK20A_H | 23 | #ifndef __CTXSW_TRACE_GK20A_H |
24 | #define __CTXSW_TRACE_GK20A_H | 24 | #define __CTXSW_TRACE_GK20A_H |
25 | 25 | ||
26 | #include <nvgpu/types.h> | ||
27 | |||
26 | #define GK20A_CTXSW_TRACE_NUM_DEVS 1 | 28 | #define GK20A_CTXSW_TRACE_NUM_DEVS 1 |
27 | 29 | ||
28 | struct file; | 30 | struct file; |
@@ -41,20 +43,22 @@ int gk20a_ctxsw_dev_release(struct inode *inode, struct file *filp); | |||
41 | int gk20a_ctxsw_dev_open(struct inode *inode, struct file *filp); | 43 | int gk20a_ctxsw_dev_open(struct inode *inode, struct file *filp); |
42 | long gk20a_ctxsw_dev_ioctl(struct file *filp, | 44 | long gk20a_ctxsw_dev_ioctl(struct file *filp, |
43 | unsigned int cmd, unsigned long arg); | 45 | unsigned int cmd, unsigned long arg); |
44 | ssize_t gk20a_ctxsw_dev_read(struct file *, char __user *, size_t, loff_t *); | 46 | ssize_t gk20a_ctxsw_dev_read(struct file *filp, char __user *buf, |
45 | unsigned int gk20a_ctxsw_dev_poll(struct file *, struct poll_table_struct *); | 47 | size_t size, loff_t *offs); |
46 | int gk20a_ctxsw_dev_mmap(struct file *, struct vm_area_struct *); | 48 | unsigned int gk20a_ctxsw_dev_poll(struct file *filp, |
49 | struct poll_table_struct *pts); | ||
50 | int gk20a_ctxsw_dev_mmap(struct file *filp, struct vm_area_struct *vma); | ||
47 | int gk20a_ctxsw_dev_ring_alloc(struct gk20a *g, void **buf, size_t *size); | 51 | int gk20a_ctxsw_dev_ring_alloc(struct gk20a *g, void **buf, size_t *size); |
48 | int gk20a_ctxsw_dev_ring_free(struct gk20a *g); | 52 | int gk20a_ctxsw_dev_ring_free(struct gk20a *g); |
49 | int gk20a_ctxsw_dev_mmap_buffer(struct gk20a *g, struct vm_area_struct *vma); | 53 | int gk20a_ctxsw_dev_mmap_buffer(struct gk20a *g, struct vm_area_struct *vma); |
50 | 54 | ||
51 | int gk20a_ctxsw_trace_init(struct gk20a *); | 55 | int gk20a_ctxsw_trace_init(struct gk20a *g); |
52 | void gk20a_ctxsw_trace_cleanup(struct gk20a *); | 56 | void gk20a_ctxsw_trace_cleanup(struct gk20a *g); |
53 | int gk20a_ctxsw_trace_write(struct gk20a *, struct nvgpu_ctxsw_trace_entry *); | 57 | int gk20a_ctxsw_trace_write(struct gk20a *g, |
58 | struct nvgpu_ctxsw_trace_entry *entry); | ||
54 | void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid); | 59 | void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid); |
55 | 60 | ||
56 | void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch); | 61 | void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch); |
57 | void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg); | 62 | void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg); |
58 | 63 | ||
59 | |||
60 | #endif /* __CTXSW_TRACE_GK20A_H */ | 64 | #endif /* __CTXSW_TRACE_GK20A_H */ |