diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2024-09-25 16:09:09 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2024-09-25 16:09:09 -0400 |
| commit | f347fde22f1297e4f022600d201780d5ead78114 (patch) | |
| tree | 76be305d6187003a1e0486ff6e91efb1062ae118 /include/os/linux/os_linux.h | |
| parent | 8340d234d78a7d0f46c11a584de538148b78b7cb (diff) | |
Delete no-longer-needed nvgpu headers
The dependency on these was removed in commit 8340d234.
Diffstat (limited to 'include/os/linux/os_linux.h')
| -rw-r--r-- | include/os/linux/os_linux.h | 192 |
1 files changed, 0 insertions, 192 deletions
diff --git a/include/os/linux/os_linux.h b/include/os/linux/os_linux.h deleted file mode 100644 index adcfdb2..0000000 --- a/include/os/linux/os_linux.h +++ /dev/null | |||
| @@ -1,192 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 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, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef NVGPU_OS_LINUX_H | ||
| 18 | #define NVGPU_OS_LINUX_H | ||
| 19 | |||
| 20 | #include <linux/cdev.h> | ||
| 21 | #include <linux/iommu.h> | ||
| 22 | #include <linux/hashtable.h> | ||
| 23 | |||
| 24 | #include <nvgpu/gk20a.h> | ||
| 25 | |||
| 26 | #include "cde.h" | ||
| 27 | #include "sched.h" | ||
| 28 | #include "ecc_linux.h" | ||
| 29 | |||
| 30 | struct nvgpu_os_linux_ops { | ||
| 31 | struct { | ||
| 32 | void (*get_program_numbers)(struct gk20a *g, | ||
| 33 | u32 block_height_log2, | ||
| 34 | u32 shader_parameter, | ||
| 35 | int *hprog, int *vprog); | ||
| 36 | bool (*need_scatter_buffer)(struct gk20a *g); | ||
| 37 | int (*populate_scatter_buffer)(struct gk20a *g, | ||
| 38 | struct sg_table *sgt, | ||
| 39 | size_t surface_size, | ||
| 40 | void *scatter_buffer_ptr, | ||
| 41 | size_t scatter_buffer_size); | ||
| 42 | } cde; | ||
| 43 | |||
| 44 | struct { | ||
| 45 | int (*init_debugfs)(struct gk20a *g); | ||
| 46 | } clk; | ||
| 47 | |||
| 48 | struct { | ||
| 49 | int (*init_debugfs)(struct gk20a *g); | ||
| 50 | } therm; | ||
| 51 | |||
| 52 | struct { | ||
| 53 | int (*init_debugfs)(struct gk20a *g); | ||
| 54 | } fecs_trace; | ||
| 55 | }; | ||
| 56 | |||
| 57 | struct nvgpu_os_linux { | ||
| 58 | struct gk20a g; | ||
| 59 | struct device *dev; | ||
| 60 | |||
| 61 | struct { | ||
| 62 | struct cdev cdev; | ||
| 63 | struct device *node; | ||
| 64 | } channel; | ||
| 65 | |||
| 66 | struct { | ||
| 67 | struct cdev cdev; | ||
| 68 | struct device *node; | ||
| 69 | /* see gk20a_ctrl_priv */ | ||
| 70 | struct nvgpu_list_node privs; | ||
| 71 | /* guards modifications to the list and its contents */ | ||
| 72 | struct nvgpu_mutex privs_lock; | ||
| 73 | } ctrl; | ||
| 74 | |||
| 75 | struct { | ||
| 76 | struct cdev cdev; | ||
| 77 | struct device *node; | ||
| 78 | } as_dev; | ||
| 79 | |||
| 80 | struct { | ||
| 81 | struct cdev cdev; | ||
| 82 | struct device *node; | ||
| 83 | } dbg; | ||
| 84 | |||
| 85 | struct { | ||
| 86 | struct cdev cdev; | ||
| 87 | struct device *node; | ||
| 88 | } prof; | ||
| 89 | |||
| 90 | struct { | ||
| 91 | struct cdev cdev; | ||
| 92 | struct device *node; | ||
| 93 | } tsg; | ||
| 94 | |||
| 95 | struct { | ||
| 96 | struct cdev cdev; | ||
| 97 | struct device *node; | ||
| 98 | } ctxsw; | ||
| 99 | |||
| 100 | struct { | ||
| 101 | struct cdev cdev; | ||
| 102 | struct device *node; | ||
| 103 | } sched; | ||
| 104 | |||
| 105 | dev_t cdev_region; | ||
| 106 | |||
| 107 | struct devfreq *devfreq; | ||
| 108 | |||
| 109 | struct device_dma_parameters dma_parms; | ||
| 110 | |||
| 111 | atomic_t hw_irq_stall_count; | ||
| 112 | atomic_t hw_irq_nonstall_count; | ||
| 113 | |||
| 114 | struct nvgpu_cond sw_irq_stall_last_handled_wq; | ||
| 115 | atomic_t sw_irq_stall_last_handled; | ||
| 116 | |||
| 117 | atomic_t nonstall_ops; | ||
| 118 | |||
| 119 | struct nvgpu_cond sw_irq_nonstall_last_handled_wq; | ||
| 120 | atomic_t sw_irq_nonstall_last_handled; | ||
| 121 | |||
| 122 | struct work_struct nonstall_fn_work; | ||
| 123 | struct workqueue_struct *nonstall_work_queue; | ||
| 124 | |||
| 125 | struct resource *reg_mem; | ||
| 126 | void __iomem *regs; | ||
| 127 | void __iomem *regs_saved; | ||
| 128 | |||
| 129 | struct resource *bar1_mem; | ||
| 130 | void __iomem *bar1; | ||
| 131 | void __iomem *bar1_saved; | ||
| 132 | |||
| 133 | void __iomem *usermode_regs; | ||
| 134 | void __iomem *usermode_regs_saved; | ||
| 135 | |||
| 136 | u64 regs_bus_addr; | ||
| 137 | |||
| 138 | #ifdef CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING | ||
| 139 | struct nvgpu_ecc_reporting_linux ecc_reporting_linux; | ||
| 140 | #endif | ||
| 141 | |||
| 142 | struct nvgpu_os_linux_ops ops; | ||
| 143 | |||
| 144 | #ifdef CONFIG_DEBUG_FS | ||
| 145 | struct dentry *debugfs; | ||
| 146 | struct dentry *debugfs_alias; | ||
| 147 | |||
| 148 | struct dentry *debugfs_ltc_enabled; | ||
| 149 | struct dentry *debugfs_timeouts_enabled; | ||
| 150 | struct dentry *debugfs_gr_idle_timeout_default; | ||
| 151 | struct dentry *debugfs_disable_bigpage; | ||
| 152 | struct dentry *debugfs_gr_default_attrib_cb_size; | ||
| 153 | |||
| 154 | struct dentry *debugfs_timeslice_low_priority_us; | ||
| 155 | struct dentry *debugfs_timeslice_medium_priority_us; | ||
| 156 | struct dentry *debugfs_timeslice_high_priority_us; | ||
| 157 | struct dentry *debugfs_runlist_interleave; | ||
| 158 | struct dentry *debugfs_allocators; | ||
| 159 | struct dentry *debugfs_xve; | ||
| 160 | struct dentry *debugfs_kmem; | ||
| 161 | struct dentry *debugfs_hal; | ||
| 162 | struct dentry *debugfs_ltc; | ||
| 163 | |||
| 164 | struct dentry *debugfs_force_preemption_cilp; | ||
| 165 | struct dentry *debugfs_force_preemption_gfxp; | ||
| 166 | struct dentry *debugfs_dump_ctxsw_stats; | ||
| 167 | #endif | ||
| 168 | DECLARE_HASHTABLE(ecc_sysfs_stats_htable, 5); | ||
| 169 | struct dev_ext_attribute *ecc_attrs; | ||
| 170 | |||
| 171 | struct gk20a_cde_app cde_app; | ||
| 172 | |||
| 173 | struct rw_semaphore busy_lock; | ||
| 174 | |||
| 175 | bool init_done; | ||
| 176 | }; | ||
| 177 | |||
| 178 | static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g) | ||
| 179 | { | ||
| 180 | return container_of(g, struct nvgpu_os_linux, g); | ||
| 181 | } | ||
| 182 | |||
| 183 | static inline struct device *dev_from_gk20a(struct gk20a *g) | ||
| 184 | { | ||
| 185 | return nvgpu_os_linux_from_gk20a(g)->dev; | ||
| 186 | } | ||
| 187 | |||
| 188 | #define INTERFACE_NAME "nvhost%s-gpu" | ||
| 189 | |||
| 190 | #define totalram_size_in_mb (totalram_pages >> (10 - (PAGE_SHIFT - 10))) | ||
| 191 | |||
| 192 | #endif | ||
