From 8f55976d4952020f1e7f257087bb79cfeb64f193 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 10 Oct 2017 16:33:17 +0530 Subject: gpu: nvgpu: cleanup of dbg_gpu_gk20a This change contains a generic cleanup of linux dependent parts of the dbg_gpu_gk20a.* files. The following changes have been made 1) Moving methods into ioctl_dbg.* inside common/linux/ 2) The structures dbg_session_gk20a and dbg_session_channel_data have been split into two parts. struct device *dev is removed from struct dbg_session_gk20a and instead packed into struct dbg_session_gk20a_linux alongwith dbg_session_gk20a and is moved into ioctl_dbg. dbg_session_gk20a is now rid of any linux dependencies and remains in dbg_gpu_gk20a. Similarly, struct file is removed from struct dbg_session_channel_data and is now packed into struct dbg_session_channel_data_linux alongwith dbg_session_channel_data and is moved into ioctl_dbg. struct dbg_session_channel_data is now rid of linux dependencies and remains in dbg_gpu_gk20a. 3) A callback function is added in order to release the dbg_session_channel_data. JIRA NVGPU-205 Change-Id: I853da6dfbf9a96b7cd210beb77f2304445ff7ea6 Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1575191 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 713c4215..e3fc61c0 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -50,6 +50,13 @@ #include +/* + * Note + * This is added for all the copy_from_user methods in this file which needs to + * be moved lated to reduce depenedency on Linux + */ +#include + /* * This is required for nvgpu_vm_find_buffer() which is used in the tracing * code. Once we can get and access userspace buffers without requiring @@ -623,7 +630,7 @@ unbind: list_for_each_entry_safe(ch_data, tmp, &dbg_s->ch_list, ch_entry) { if (ch_data->chid == ch->chid) - dbg_unbind_single_channel_gk20a(dbg_s, ch_data); + ch_data->unbind_single_channel(dbg_s, ch_data); } nvgpu_mutex_release(&dbg_s->ch_list_lock); } -- cgit v1.2.2