diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | 94 |
1 files changed, 73 insertions, 21 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c index 39ae68eb..1cfa2ef2 100644 --- a/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | |||
@@ -134,6 +134,11 @@ static struct device_attribute *dev_attr_sm_icache_ecc_uncorrected_err_count_arr | |||
134 | static struct device_attribute *dev_attr_gcc_l15_ecc_corrected_err_count_array; | 134 | static struct device_attribute *dev_attr_gcc_l15_ecc_corrected_err_count_array; |
135 | static struct device_attribute *dev_attr_gcc_l15_ecc_uncorrected_err_count_array; | 135 | static struct device_attribute *dev_attr_gcc_l15_ecc_uncorrected_err_count_array; |
136 | 136 | ||
137 | static struct device_attribute *dev_attr_fecs_ecc_corrected_err_count_array; | ||
138 | static struct device_attribute *dev_attr_fecs_ecc_uncorrected_err_count_array; | ||
139 | static struct device_attribute *dev_attr_gpccs_ecc_corrected_err_count_array; | ||
140 | static struct device_attribute *dev_attr_gpccs_ecc_uncorrected_err_count_array; | ||
141 | |||
137 | void gr_gv11b_create_sysfs(struct device *dev) | 142 | void gr_gv11b_create_sysfs(struct device *dev) |
138 | { | 143 | { |
139 | struct gk20a *g = get_gk20a(dev); | 144 | struct gk20a *g = get_gk20a(dev); |
@@ -142,7 +147,7 @@ void gr_gv11b_create_sysfs(struct device *dev) | |||
142 | initialized multiple times but we only need to create the ECC | 147 | initialized multiple times but we only need to create the ECC |
143 | stats once. Therefore, add the following check to avoid | 148 | stats once. Therefore, add the following check to avoid |
144 | creating duplicate stat sysfs nodes. */ | 149 | creating duplicate stat sysfs nodes. */ |
145 | if (g->gr.t19x.ecc_stats.sm_l1_tag_corrected_err_count.counters != NULL) | 150 | if (g->ecc.gr.t19x.sm_l1_tag_corrected_err_count.counters != NULL) |
146 | return; | 151 | return; |
147 | 152 | ||
148 | gr_gp10b_create_sysfs(dev); | 153 | gr_gp10b_create_sysfs(dev); |
@@ -150,63 +155,91 @@ void gr_gv11b_create_sysfs(struct device *dev) | |||
150 | error |= gr_gp10b_ecc_stat_create(dev, | 155 | error |= gr_gp10b_ecc_stat_create(dev, |
151 | 0, | 156 | 0, |
152 | "sm_l1_tag_ecc_corrected_err_count", | 157 | "sm_l1_tag_ecc_corrected_err_count", |
153 | &g->gr.t19x.ecc_stats.sm_l1_tag_corrected_err_count, | 158 | &g->ecc.gr.t19x.sm_l1_tag_corrected_err_count, |
154 | dev_attr_sm_l1_tag_ecc_corrected_err_count_array); | 159 | dev_attr_sm_l1_tag_ecc_corrected_err_count_array); |
155 | 160 | ||
156 | error |= gr_gp10b_ecc_stat_create(dev, | 161 | error |= gr_gp10b_ecc_stat_create(dev, |
157 | 0, | 162 | 0, |
158 | "sm_l1_tag_ecc_uncorrected_err_count", | 163 | "sm_l1_tag_ecc_uncorrected_err_count", |
159 | &g->gr.t19x.ecc_stats.sm_l1_tag_uncorrected_err_count, | 164 | &g->ecc.gr.t19x.sm_l1_tag_uncorrected_err_count, |
160 | dev_attr_sm_l1_tag_ecc_uncorrected_err_count_array); | 165 | dev_attr_sm_l1_tag_ecc_uncorrected_err_count_array); |
161 | 166 | ||
162 | error |= gr_gp10b_ecc_stat_create(dev, | 167 | error |= gr_gp10b_ecc_stat_create(dev, |
163 | 0, | 168 | 0, |
164 | "sm_cbu_ecc_corrected_err_count", | 169 | "sm_cbu_ecc_corrected_err_count", |
165 | &g->gr.t19x.ecc_stats.sm_cbu_corrected_err_count, | 170 | &g->ecc.gr.t19x.sm_cbu_corrected_err_count, |
166 | dev_attr_sm_cbu_ecc_corrected_err_count_array); | 171 | dev_attr_sm_cbu_ecc_corrected_err_count_array); |
167 | 172 | ||
168 | error |= gr_gp10b_ecc_stat_create(dev, | 173 | error |= gr_gp10b_ecc_stat_create(dev, |
169 | 0, | 174 | 0, |
170 | "sm_cbu_ecc_uncorrected_err_count", | 175 | "sm_cbu_ecc_uncorrected_err_count", |
171 | &g->gr.t19x.ecc_stats.sm_cbu_uncorrected_err_count, | 176 | &g->ecc.gr.t19x.sm_cbu_uncorrected_err_count, |
172 | dev_attr_sm_cbu_ecc_uncorrected_err_count_array); | 177 | dev_attr_sm_cbu_ecc_uncorrected_err_count_array); |
173 | 178 | ||
174 | error |= gr_gp10b_ecc_stat_create(dev, | 179 | error |= gr_gp10b_ecc_stat_create(dev, |
175 | 0, | 180 | 0, |
176 | "sm_l1_data_ecc_corrected_err_count", | 181 | "sm_l1_data_ecc_corrected_err_count", |
177 | &g->gr.t19x.ecc_stats.sm_l1_data_corrected_err_count, | 182 | &g->ecc.gr.t19x.sm_l1_data_corrected_err_count, |
178 | dev_attr_sm_l1_data_ecc_corrected_err_count_array); | 183 | dev_attr_sm_l1_data_ecc_corrected_err_count_array); |
179 | 184 | ||
180 | error |= gr_gp10b_ecc_stat_create(dev, | 185 | error |= gr_gp10b_ecc_stat_create(dev, |
181 | 0, | 186 | 0, |
182 | "sm_l1_data_ecc_uncorrected_err_count", | 187 | "sm_l1_data_ecc_uncorrected_err_count", |
183 | &g->gr.t19x.ecc_stats.sm_l1_data_uncorrected_err_count, | 188 | &g->ecc.gr.t19x.sm_l1_data_uncorrected_err_count, |
184 | dev_attr_sm_l1_data_ecc_uncorrected_err_count_array); | 189 | dev_attr_sm_l1_data_ecc_uncorrected_err_count_array); |
185 | 190 | ||
186 | error |= gr_gp10b_ecc_stat_create(dev, | 191 | error |= gr_gp10b_ecc_stat_create(dev, |
187 | 0, | 192 | 0, |
188 | "sm_icache_ecc_corrected_err_count", | 193 | "sm_icache_ecc_corrected_err_count", |
189 | &g->gr.t19x.ecc_stats.sm_icache_corrected_err_count, | 194 | &g->ecc.gr.t19x.sm_icache_corrected_err_count, |
190 | dev_attr_sm_icache_ecc_corrected_err_count_array); | 195 | dev_attr_sm_icache_ecc_corrected_err_count_array); |
191 | 196 | ||
192 | error |= gr_gp10b_ecc_stat_create(dev, | 197 | error |= gr_gp10b_ecc_stat_create(dev, |
193 | 0, | 198 | 0, |
194 | "sm_icache_ecc_uncorrected_err_count", | 199 | "sm_icache_ecc_uncorrected_err_count", |
195 | &g->gr.t19x.ecc_stats.sm_icache_uncorrected_err_count, | 200 | &g->ecc.gr.t19x.sm_icache_uncorrected_err_count, |
196 | dev_attr_sm_icache_ecc_uncorrected_err_count_array); | 201 | dev_attr_sm_icache_ecc_uncorrected_err_count_array); |
197 | 202 | ||
198 | error |= gr_gp10b_ecc_stat_create(dev, | 203 | error |= gr_gp10b_ecc_stat_create(dev, |
199 | 0, | 204 | 0, |
200 | "gcc_l15_ecc_corrected_err_count", | 205 | "gcc_l15_ecc_corrected_err_count", |
201 | &g->gr.t19x.ecc_stats.gcc_l15_corrected_err_count, | 206 | &g->ecc.gr.t19x.gcc_l15_corrected_err_count, |
202 | dev_attr_gcc_l15_ecc_corrected_err_count_array); | 207 | dev_attr_gcc_l15_ecc_corrected_err_count_array); |
203 | 208 | ||
204 | error |= gr_gp10b_ecc_stat_create(dev, | 209 | error |= gr_gp10b_ecc_stat_create(dev, |
205 | 0, | 210 | 0, |
206 | "gcc_l15_ecc_uncorrected_err_count", | 211 | "gcc_l15_ecc_uncorrected_err_count", |
207 | &g->gr.t19x.ecc_stats.gcc_l15_uncorrected_err_count, | 212 | &g->ecc.gr.t19x.gcc_l15_uncorrected_err_count, |
208 | dev_attr_gcc_l15_ecc_uncorrected_err_count_array); | 213 | dev_attr_gcc_l15_ecc_uncorrected_err_count_array); |
209 | 214 | ||
215 | error |= gp10b_ecc_stat_create(dev, | ||
216 | 1, | ||
217 | "gpc", | ||
218 | "fecs_ecc_uncorrected_err_count", | ||
219 | &g->ecc.gr.t19x.fecs_uncorrected_err_count, | ||
220 | dev_attr_fecs_ecc_uncorrected_err_count_array); | ||
221 | |||
222 | error |= gp10b_ecc_stat_create(dev, | ||
223 | 1, | ||
224 | "gpc", | ||
225 | "fecs_ecc_corrected_err_count", | ||
226 | &g->ecc.gr.t19x.fecs_corrected_err_count, | ||
227 | dev_attr_fecs_ecc_corrected_err_count_array); | ||
228 | |||
229 | error |= gp10b_ecc_stat_create(dev, | ||
230 | g->gr.gpc_count, | ||
231 | "gpc", | ||
232 | "gpccs_ecc_uncorrected_err_count", | ||
233 | &g->ecc.gr.t19x.gpccs_uncorrected_err_count, | ||
234 | dev_attr_gpccs_ecc_uncorrected_err_count_array); | ||
235 | |||
236 | error |= gp10b_ecc_stat_create(dev, | ||
237 | g->gr.gpc_count, | ||
238 | "gpc", | ||
239 | "gpccs_ecc_corrected_err_count", | ||
240 | &g->ecc.gr.t19x.gpccs_corrected_err_count, | ||
241 | dev_attr_gpccs_ecc_corrected_err_count_array); | ||
242 | |||
210 | if (error) | 243 | if (error) |
211 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); | 244 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); |
212 | } | 245 | } |
@@ -217,52 +250,71 @@ static void gr_gv11b_remove_sysfs(struct device *dev) | |||
217 | 250 | ||
218 | gr_gp10b_ecc_stat_remove(dev, | 251 | gr_gp10b_ecc_stat_remove(dev, |
219 | 0, | 252 | 0, |
220 | &g->gr.t19x.ecc_stats.sm_l1_tag_corrected_err_count, | 253 | &g->ecc.gr.t19x.sm_l1_tag_corrected_err_count, |
221 | dev_attr_sm_l1_tag_ecc_corrected_err_count_array); | 254 | dev_attr_sm_l1_tag_ecc_corrected_err_count_array); |
222 | 255 | ||
223 | gr_gp10b_ecc_stat_remove(dev, | 256 | gr_gp10b_ecc_stat_remove(dev, |
224 | 0, | 257 | 0, |
225 | &g->gr.t19x.ecc_stats.sm_l1_tag_uncorrected_err_count, | 258 | &g->ecc.gr.t19x.sm_l1_tag_uncorrected_err_count, |
226 | dev_attr_sm_l1_tag_ecc_uncorrected_err_count_array); | 259 | dev_attr_sm_l1_tag_ecc_uncorrected_err_count_array); |
227 | 260 | ||
228 | gr_gp10b_ecc_stat_remove(dev, | 261 | gr_gp10b_ecc_stat_remove(dev, |
229 | 0, | 262 | 0, |
230 | &g->gr.t19x.ecc_stats.sm_cbu_corrected_err_count, | 263 | &g->ecc.gr.t19x.sm_cbu_corrected_err_count, |
231 | dev_attr_sm_cbu_ecc_corrected_err_count_array); | 264 | dev_attr_sm_cbu_ecc_corrected_err_count_array); |
232 | 265 | ||
233 | gr_gp10b_ecc_stat_remove(dev, | 266 | gr_gp10b_ecc_stat_remove(dev, |
234 | 0, | 267 | 0, |
235 | &g->gr.t19x.ecc_stats.sm_cbu_uncorrected_err_count, | 268 | &g->ecc.gr.t19x.sm_cbu_uncorrected_err_count, |
236 | dev_attr_sm_cbu_ecc_uncorrected_err_count_array); | 269 | dev_attr_sm_cbu_ecc_uncorrected_err_count_array); |
237 | 270 | ||
238 | gr_gp10b_ecc_stat_remove(dev, | 271 | gr_gp10b_ecc_stat_remove(dev, |
239 | 0, | 272 | 0, |
240 | &g->gr.t19x.ecc_stats.sm_l1_data_corrected_err_count, | 273 | &g->ecc.gr.t19x.sm_l1_data_corrected_err_count, |
241 | dev_attr_sm_l1_data_ecc_corrected_err_count_array); | 274 | dev_attr_sm_l1_data_ecc_corrected_err_count_array); |
242 | 275 | ||
243 | gr_gp10b_ecc_stat_remove(dev, | 276 | gr_gp10b_ecc_stat_remove(dev, |
244 | 0, | 277 | 0, |
245 | &g->gr.t19x.ecc_stats.sm_l1_data_uncorrected_err_count, | 278 | &g->ecc.gr.t19x.sm_l1_data_uncorrected_err_count, |
246 | dev_attr_sm_l1_data_ecc_uncorrected_err_count_array); | 279 | dev_attr_sm_l1_data_ecc_uncorrected_err_count_array); |
247 | 280 | ||
248 | gr_gp10b_ecc_stat_remove(dev, | 281 | gr_gp10b_ecc_stat_remove(dev, |
249 | 0, | 282 | 0, |
250 | &g->gr.t19x.ecc_stats.sm_icache_corrected_err_count, | 283 | &g->ecc.gr.t19x.sm_icache_corrected_err_count, |
251 | dev_attr_sm_icache_ecc_corrected_err_count_array); | 284 | dev_attr_sm_icache_ecc_corrected_err_count_array); |
252 | 285 | ||
253 | gr_gp10b_ecc_stat_remove(dev, | 286 | gr_gp10b_ecc_stat_remove(dev, |
254 | 0, | 287 | 0, |
255 | &g->gr.t19x.ecc_stats.sm_icache_uncorrected_err_count, | 288 | &g->ecc.gr.t19x.sm_icache_uncorrected_err_count, |
256 | dev_attr_sm_icache_ecc_uncorrected_err_count_array); | 289 | dev_attr_sm_icache_ecc_uncorrected_err_count_array); |
257 | 290 | ||
258 | gr_gp10b_ecc_stat_remove(dev, | 291 | gr_gp10b_ecc_stat_remove(dev, |
259 | 0, | 292 | 0, |
260 | &g->gr.t19x.ecc_stats.gcc_l15_corrected_err_count, | 293 | &g->ecc.gr.t19x.gcc_l15_corrected_err_count, |
261 | dev_attr_gcc_l15_ecc_corrected_err_count_array); | 294 | dev_attr_gcc_l15_ecc_corrected_err_count_array); |
262 | 295 | ||
263 | gr_gp10b_ecc_stat_remove(dev, | 296 | gr_gp10b_ecc_stat_remove(dev, |
264 | 0, | 297 | 0, |
265 | &g->gr.t19x.ecc_stats.gcc_l15_uncorrected_err_count, | 298 | &g->ecc.gr.t19x.gcc_l15_uncorrected_err_count, |
266 | dev_attr_gcc_l15_ecc_uncorrected_err_count_array); | 299 | dev_attr_gcc_l15_ecc_uncorrected_err_count_array); |
267 | 300 | ||
301 | gp10b_ecc_stat_remove(dev, | ||
302 | 1, | ||
303 | &g->ecc.gr.t19x.fecs_uncorrected_err_count, | ||
304 | dev_attr_fecs_ecc_uncorrected_err_count_array); | ||
305 | |||
306 | gp10b_ecc_stat_remove(dev, | ||
307 | 1, | ||
308 | &g->ecc.gr.t19x.fecs_corrected_err_count, | ||
309 | dev_attr_fecs_ecc_corrected_err_count_array); | ||
310 | |||
311 | gp10b_ecc_stat_remove(dev, | ||
312 | g->gr.gpc_count, | ||
313 | &g->ecc.gr.t19x.gpccs_uncorrected_err_count, | ||
314 | dev_attr_gpccs_ecc_uncorrected_err_count_array); | ||
315 | |||
316 | gp10b_ecc_stat_remove(dev, | ||
317 | g->gr.gpc_count, | ||
318 | &g->ecc.gr.t19x.gpccs_corrected_err_count, | ||
319 | dev_attr_gpccs_ecc_corrected_err_count_array); | ||
268 | } | 320 | } |