diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-21 15:42:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-24 14:05:17 -0400 |
commit | b3e1ce04b963e91b9b425b3c35cc4eff11db7543 (patch) | |
tree | 73c45d0acfe3ce25298ba1dc8dfa4777e02c861a /drivers/gpu/nvgpu/gk20a | |
parent | b88c9ad793cb9822f359b8c498afe872c412959c (diff) |
gpu: nvgpu: Put debugfs dependencies inside #ifdef
Put all debugfs dependencies inside #ifdef CONFIG_DEBUG_FS. This
includes some functions in allocators that were used only for
debugging.
Remove include of linux/debugfs.h on files that do not deal with
debugfs.
linux/debugfs.h implicitly included linux/fs.h, which we relied on.
Add explicit include of linux/fs.h for all files where this is the
case.
Change-Id: I16feffae6b0e3a2edf366075cdc01ade86be06f9
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1467897
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/clk_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/debug_gk20a.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_scale.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sched_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sched_gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/therm_gk20a.c | 11 |
14 files changed, 36 insertions, 15 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index 391f6612..f0927692 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -18,7 +18,9 @@ | |||
18 | 18 | ||
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #ifdef CONFIG_DEBUG_FS | ||
21 | #include <linux/debugfs.h> | 22 | #include <linux/debugfs.h> |
23 | #endif | ||
22 | #include <linux/dma-buf.h> | 24 | #include <linux/dma-buf.h> |
23 | 25 | ||
24 | #include <trace/events/gk20a.h> | 26 | #include <trace/events/gk20a.h> |
@@ -1662,6 +1664,7 @@ int gk20a_mark_compressible_write(struct gk20a *g, u32 buffer_fd, | |||
1662 | return 0; | 1664 | return 0; |
1663 | } | 1665 | } |
1664 | 1666 | ||
1667 | #ifdef CONFIG_DEBUG_FS | ||
1665 | static ssize_t gk20a_cde_reload_write(struct file *file, | 1668 | static ssize_t gk20a_cde_reload_write(struct file *file, |
1666 | const char __user *userbuf, size_t count, loff_t *ppos) | 1669 | const char __user *userbuf, size_t count, loff_t *ppos) |
1667 | { | 1670 | { |
@@ -1694,3 +1697,4 @@ void gk20a_cde_debugfs_init(struct device *dev) | |||
1694 | debugfs_create_file("reload_cde_firmware", S_IWUSR, platform->debugfs, | 1697 | debugfs_create_file("reload_cde_firmware", S_IWUSR, platform->debugfs, |
1695 | g, &gk20a_cde_reload_fops); | 1698 | g, &gk20a_cde_reload_fops); |
1696 | } | 1699 | } |
1700 | #endif | ||
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index 523ba4f6..ed5a8b4e 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |||
@@ -11,13 +11,11 @@ | |||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
13 | * more details. | 13 | * more details. |
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along with | ||
16 | * this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | 14 | */ |
19 | 15 | ||
16 | #ifdef CONFIG_DEBUG_FS | ||
20 | #include <linux/debugfs.h> | 17 | #include <linux/debugfs.h> |
18 | #endif | ||
21 | 19 | ||
22 | #include <nvgpu/kmem.h> | 20 | #include <nvgpu/kmem.h> |
23 | #include <nvgpu/dma.h> | 21 | #include <nvgpu/dma.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/clk_gk20a.c b/drivers/gpu/nvgpu/gk20a/clk_gk20a.c index b69f74b2..e904be49 100644 --- a/drivers/gpu/nvgpu/gk20a/clk_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/clk_gk20a.c | |||
@@ -18,7 +18,9 @@ | |||
18 | 18 | ||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #ifdef CONFIG_DEBUG_FS | ||
21 | #include <linux/debugfs.h> | 22 | #include <linux/debugfs.h> |
23 | #endif | ||
22 | #include <linux/clk/tegra.h> | 24 | #include <linux/clk/tegra.h> |
23 | 25 | ||
24 | #include "gk20a.h" | 26 | #include "gk20a.h" |
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index 94f07701..f3b54355 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/kthread.h> | 15 | #include <linux/kthread.h> |
16 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
17 | #include <linux/ktime.h> | 17 | #include <linux/ktime.h> |
18 | #include <linux/debugfs.h> | ||
19 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
20 | #include <linux/poll.h> | 19 | #include <linux/poll.h> |
21 | #include <trace/events/gk20a.h> | 20 | #include <trace/events/gk20a.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h index bb79331c..2f84b0dc 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -24,7 +24,7 @@ struct channel_ctx_gk20a; | |||
24 | struct gk20a_ctxsw_dev; | 24 | struct gk20a_ctxsw_dev; |
25 | struct gk20a_fecs_trace; | 25 | struct gk20a_fecs_trace; |
26 | struct tsg_gk20a; | 26 | struct tsg_gk20a; |
27 | 27 | struct poll_table_struct; | |
28 | 28 | ||
29 | int gk20a_ctxsw_dev_release(struct inode *inode, struct file *filp); | 29 | int gk20a_ctxsw_dev_release(struct inode *inode, struct file *filp); |
30 | int gk20a_ctxsw_dev_open(struct inode *inode, struct file *filp); | 30 | int gk20a_ctxsw_dev_open(struct inode *inode, struct file *filp); |
diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c index 1a9ffe77..d577c625 100644 --- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c | |||
@@ -12,9 +12,12 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifdef CONFIG_DEBUG_FS | ||
15 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
17 | #endif | ||
16 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
17 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/fs.h> | ||
18 | 21 | ||
19 | #include <nvgpu/log.h> | 22 | #include <nvgpu/log.h> |
20 | #include <nvgpu/kmem.h> | 23 | #include <nvgpu/kmem.h> |
@@ -298,8 +301,8 @@ int gk20a_railgating_debugfs_init(struct device *dev) | |||
298 | 301 | ||
299 | void gk20a_debug_init(struct device *dev, const char *debugfs_symlink) | 302 | void gk20a_debug_init(struct device *dev, const char *debugfs_symlink) |
300 | { | 303 | { |
301 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
302 | #ifdef CONFIG_DEBUG_FS | 304 | #ifdef CONFIG_DEBUG_FS |
305 | struct gk20a_platform *platform = dev_get_drvdata(dev); | ||
303 | struct gk20a *g = platform->g; | 306 | struct gk20a *g = platform->g; |
304 | 307 | ||
305 | platform->debugfs = debugfs_create_dir(dev_name(dev), NULL); | 308 | platform->debugfs = debugfs_create_dir(dev_name(dev), NULL); |
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index 7d509a4a..9e78c843 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |||
@@ -13,7 +13,9 @@ | |||
13 | 13 | ||
14 | #include <asm/barrier.h> | 14 | #include <asm/barrier.h> |
15 | #include <linux/kthread.h> | 15 | #include <linux/kthread.h> |
16 | #ifdef CONFIG_DEBUG_FS | ||
16 | #include <linux/debugfs.h> | 17 | #include <linux/debugfs.h> |
18 | #endif | ||
17 | 19 | ||
18 | #include <nvgpu/kmem.h> | 20 | #include <nvgpu/kmem.h> |
19 | #include <nvgpu/dma.h> | 21 | #include <nvgpu/dma.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index c886101c..92698745 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/gk20a.h> | 16 | #include <linux/gk20a.h> |
17 | #include <linux/file.h> | 17 | #include <linux/file.h> |
18 | #include <linux/version.h> | 18 | #include <linux/version.h> |
19 | #include <linux/fs.h> | ||
19 | 20 | ||
20 | #include <nvgpu/semaphore.h> | 21 | #include <nvgpu/semaphore.h> |
21 | #include <nvgpu/kmem.h> | 22 | #include <nvgpu/kmem.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index a1700ebf..7c8b4eae 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -35,6 +35,9 @@ struct dbg_profiler_object_data; | |||
35 | #include <linux/irqreturn.h> | 35 | #include <linux/irqreturn.h> |
36 | #include <linux/version.h> | 36 | #include <linux/version.h> |
37 | #include <linux/cdev.h> | 37 | #include <linux/cdev.h> |
38 | #ifdef CONFIG_DEBUG_FS | ||
39 | #include <linux/debugfs.h> | ||
40 | #endif | ||
38 | 41 | ||
39 | #include "../../../arch/arm/mach-tegra/iomap.h" | 42 | #include "../../../arch/arm/mach-tegra/iomap.h" |
40 | 43 | ||
@@ -150,7 +153,9 @@ struct gpu_ops { | |||
150 | struct zbc_entry *s_val, | 153 | struct zbc_entry *s_val, |
151 | u32 index); | 154 | u32 index); |
152 | void (*init_cbc)(struct gk20a *g, struct gr_gk20a *gr); | 155 | void (*init_cbc)(struct gk20a *g, struct gr_gk20a *gr); |
156 | #ifdef CONFIG_DEBUG_FS | ||
153 | void (*sync_debugfs)(struct gk20a *g); | 157 | void (*sync_debugfs)(struct gk20a *g); |
158 | #endif | ||
154 | void (*init_fs_state)(struct gk20a *g); | 159 | void (*init_fs_state)(struct gk20a *g); |
155 | void (*isr)(struct gk20a *g); | 160 | void (*isr)(struct gk20a *g); |
156 | u32 (*cbc_fix_config)(struct gk20a *g, int base); | 161 | u32 (*cbc_fix_config)(struct gk20a *g, int base); |
@@ -669,7 +674,9 @@ struct gpu_ops { | |||
669 | struct { | 674 | struct { |
670 | int (*init_therm_setup_hw)(struct gk20a *g); | 675 | int (*init_therm_setup_hw)(struct gk20a *g); |
671 | int (*elcg_init_idle_filters)(struct gk20a *g); | 676 | int (*elcg_init_idle_filters)(struct gk20a *g); |
677 | #ifdef CONFIG_DEBUG_FS | ||
672 | void (*therm_debugfs_init)(struct gk20a *g); | 678 | void (*therm_debugfs_init)(struct gk20a *g); |
679 | #endif | ||
673 | int (*get_internal_sensor_curr_temp)(struct gk20a *g, u32 *temp_f24_8); | 680 | int (*get_internal_sensor_curr_temp)(struct gk20a *g, u32 *temp_f24_8); |
674 | void (*get_internal_sensor_limits)(s32 *max_24_8, | 681 | void (*get_internal_sensor_limits)(s32 *max_24_8, |
675 | s32 *min_24_8); | 682 | s32 *min_24_8); |
@@ -1140,7 +1147,9 @@ struct gk20a { | |||
1140 | u32 tpc_fs_mask_user; | 1147 | u32 tpc_fs_mask_user; |
1141 | 1148 | ||
1142 | struct nvgpu_bios bios; | 1149 | struct nvgpu_bios bios; |
1150 | #ifdef CONFIG_DEBUG_FS | ||
1143 | struct debugfs_blob_wrapper bios_blob; | 1151 | struct debugfs_blob_wrapper bios_blob; |
1152 | #endif | ||
1144 | 1153 | ||
1145 | struct nvgpu_clk_arb *clk_arb; | 1154 | struct nvgpu_clk_arb *clk_arb; |
1146 | 1155 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c index 06c73b90..8c7a9d80 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c | |||
@@ -17,7 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/devfreq.h> | 19 | #include <linux/devfreq.h> |
20 | #include <linux/debugfs.h> | ||
21 | #include <linux/export.h> | 20 | #include <linux/export.h> |
22 | #include <soc/tegra/chip-id.h> | 21 | #include <soc/tegra/chip-id.h> |
23 | #include <linux/pm_qos.h> | 22 | #include <linux/pm_qos.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 229d5b4f..98513511 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -17,7 +17,9 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #ifdef CONFIG_DEBUG_FS | ||
20 | #include <linux/debugfs.h> | 21 | #include <linux/debugfs.h> |
22 | #endif | ||
21 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
22 | 24 | ||
23 | #include <nvgpu/nvgpu_common.h> | 25 | #include <nvgpu/nvgpu_common.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/sched_gk20a.c b/drivers/gpu/nvgpu/gk20a/sched_gk20a.c index ff038b62..54091014 100644 --- a/drivers/gpu/nvgpu/gk20a/sched_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sched_gk20a.c | |||
@@ -13,7 +13,9 @@ | |||
13 | 13 | ||
14 | #include <asm/barrier.h> | 14 | #include <asm/barrier.h> |
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
16 | #ifdef CONFIG_DEBUG_FS | ||
16 | #include <linux/debugfs.h> | 17 | #include <linux/debugfs.h> |
18 | #endif | ||
17 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
18 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
19 | #include <uapi/linux/nvgpu.h> | 21 | #include <uapi/linux/nvgpu.h> |
diff --git a/drivers/gpu/nvgpu/gk20a/sched_gk20a.h b/drivers/gpu/nvgpu/gk20a/sched_gk20a.h index 1f983678..4f6d1510 100644 --- a/drivers/gpu/nvgpu/gk20a/sched_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/sched_gk20a.h | |||
@@ -17,6 +17,7 @@ | |||
17 | struct gk20a; | 17 | struct gk20a; |
18 | struct gpu_ops; | 18 | struct gpu_ops; |
19 | struct tsg_gk20a; | 19 | struct tsg_gk20a; |
20 | struct poll_table_struct; | ||
20 | 21 | ||
21 | struct gk20a_sched_ctrl { | 22 | struct gk20a_sched_ctrl { |
22 | struct gk20a *g; | 23 | struct gk20a *g; |
diff --git a/drivers/gpu/nvgpu/gk20a/therm_gk20a.c b/drivers/gpu/nvgpu/gk20a/therm_gk20a.c index 0d2f1281..b700c735 100644 --- a/drivers/gpu/nvgpu/gk20a/therm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/therm_gk20a.c | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/video/tegra/host/gk20a/therm_gk20a.c | ||
3 | * | ||
4 | * GK20A Therm | 2 | * GK20A Therm |
5 | * | 3 | * |
6 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. |
7 | * | 5 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -14,9 +12,8 @@ | |||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
15 | * more details. | 13 | * more details. |
16 | * | 14 | * |
17 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License |
18 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | */ | 17 | */ |
21 | 18 | ||
22 | #include "gk20a.h" | 19 | #include "gk20a.h" |
@@ -105,8 +102,10 @@ int gk20a_init_therm_support(struct gk20a *g) | |||
105 | if (err) | 102 | if (err) |
106 | return err; | 103 | return err; |
107 | 104 | ||
105 | #ifdef CONFIG_DEBUG_FS | ||
108 | if (g->ops.therm.therm_debugfs_init) | 106 | if (g->ops.therm.therm_debugfs_init) |
109 | g->ops.therm.therm_debugfs_init(g); | 107 | g->ops.therm.therm_debugfs_init(g); |
108 | #endif | ||
110 | 109 | ||
111 | return err; | 110 | return err; |
112 | } | 111 | } |