diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/ecc_gv11b.h | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 203 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | 80 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h | 236 |
4 files changed, 513 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/ecc_gv11b.h b/drivers/gpu/nvgpu/gv11b/ecc_gv11b.h index 70b1bab8..10750426 100644 --- a/drivers/gpu/nvgpu/gv11b/ecc_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/ecc_gv11b.h | |||
@@ -40,4 +40,16 @@ struct ecc_ltc_t19x { | |||
40 | struct gk20a_ecc_stat l2_cache_uncorrected_err_count; | 40 | struct gk20a_ecc_stat l2_cache_uncorrected_err_count; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* TODO: PMU and FB ECC features are still under embargo */ | ||
44 | struct ecc_eng_t19x { | ||
45 | /* FB */ | ||
46 | struct gk20a_ecc_stat mmu_l2tlb_corrected_err_count; | ||
47 | struct gk20a_ecc_stat mmu_l2tlb_uncorrected_err_count; | ||
48 | struct gk20a_ecc_stat mmu_hubtlb_corrected_err_count; | ||
49 | struct gk20a_ecc_stat mmu_hubtlb_uncorrected_err_count; | ||
50 | struct gk20a_ecc_stat mmu_fillunit_corrected_err_count; | ||
51 | struct gk20a_ecc_stat mmu_fillunit_uncorrected_err_count; | ||
52 | /* PMU */ | ||
53 | }; | ||
54 | |||
43 | #endif | 55 | #endif |
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 975692a6..9a4ea36b 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c | |||
@@ -224,6 +224,185 @@ void gv11b_fb_disable_hub_intr(struct gk20a *g, | |||
224 | gv11b_fb_intr_en_clr(g, index, mask); | 224 | gv11b_fb_intr_en_clr(g, index, mask); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void gv11b_handle_l2tlb_ecc_isr(struct gk20a *g, u32 ecc_status) | ||
228 | { | ||
229 | u32 ecc_addr, corrected_cnt, uncorrected_cnt; | ||
230 | u32 corrected_delta, uncorrected_delta; | ||
231 | u32 corrected_overflow, uncorrected_overflow; | ||
232 | |||
233 | ecc_addr = gk20a_readl(g, fb_mmu_l2tlb_ecc_address_r()); | ||
234 | corrected_cnt = gk20a_readl(g, | ||
235 | fb_mmu_l2tlb_ecc_corrected_err_count_r()); | ||
236 | uncorrected_cnt = gk20a_readl(g, | ||
237 | fb_mmu_l2tlb_ecc_uncorrected_err_count_r()); | ||
238 | |||
239 | corrected_delta = fb_mmu_l2tlb_ecc_corrected_err_count_total_v( | ||
240 | corrected_cnt); | ||
241 | uncorrected_delta = fb_mmu_l2tlb_ecc_uncorrected_err_count_total_v( | ||
242 | uncorrected_cnt); | ||
243 | corrected_overflow = ecc_status & | ||
244 | fb_mmu_l2tlb_ecc_status_corrected_err_total_counter_overflow_m(); | ||
245 | |||
246 | uncorrected_overflow = ecc_status & | ||
247 | fb_mmu_l2tlb_ecc_status_uncorrected_err_total_counter_overflow_m(); | ||
248 | |||
249 | /* clear the interrupt */ | ||
250 | if ((corrected_delta > 0) || corrected_overflow) | ||
251 | gk20a_writel(g, fb_mmu_l2tlb_ecc_corrected_err_count_r(), 0); | ||
252 | if ((uncorrected_delta > 0) || uncorrected_overflow) | ||
253 | gk20a_writel(g, fb_mmu_l2tlb_ecc_uncorrected_err_count_r(), 0); | ||
254 | |||
255 | gk20a_writel(g, fb_mmu_l2tlb_ecc_status_r(), | ||
256 | fb_mmu_l2tlb_ecc_status_reset_clear_f()); | ||
257 | |||
258 | /* Handle overflow */ | ||
259 | if (corrected_overflow) | ||
260 | corrected_delta += (0x1UL << fb_mmu_l2tlb_ecc_corrected_err_count_total_s()); | ||
261 | if (uncorrected_overflow) | ||
262 | uncorrected_delta += (0x1UL << fb_mmu_l2tlb_ecc_uncorrected_err_count_total_s()); | ||
263 | |||
264 | |||
265 | g->ecc.eng.t19x.mmu_l2tlb_corrected_err_count.counters[0] += | ||
266 | corrected_delta; | ||
267 | g->ecc.eng.t19x.mmu_l2tlb_uncorrected_err_count.counters[0] += | ||
268 | uncorrected_delta; | ||
269 | |||
270 | if (ecc_status & fb_mmu_l2tlb_ecc_status_corrected_err_l2tlb_sa_data_m()) | ||
271 | nvgpu_log(g, gpu_dbg_intr, "corrected ecc sa data error"); | ||
272 | if (ecc_status & fb_mmu_l2tlb_ecc_status_uncorrected_err_l2tlb_sa_data_m()) | ||
273 | nvgpu_log(g, gpu_dbg_intr, "uncorrected ecc sa data error"); | ||
274 | if (corrected_overflow || uncorrected_overflow) | ||
275 | nvgpu_info(g, "mmu l2tlb ecc counter overflow!"); | ||
276 | |||
277 | nvgpu_log(g, gpu_dbg_intr, | ||
278 | "ecc error address: 0x%x", ecc_addr); | ||
279 | nvgpu_log(g, gpu_dbg_intr, | ||
280 | "ecc error count corrected: %d, uncorrected %d", | ||
281 | g->ecc.eng.t19x.mmu_l2tlb_corrected_err_count.counters[0], | ||
282 | g->ecc.eng.t19x.mmu_l2tlb_uncorrected_err_count.counters[0]); | ||
283 | } | ||
284 | |||
285 | static void gv11b_handle_hubtlb_ecc_isr(struct gk20a *g, u32 ecc_status) | ||
286 | { | ||
287 | u32 ecc_addr, corrected_cnt, uncorrected_cnt; | ||
288 | u32 corrected_delta, uncorrected_delta; | ||
289 | u32 corrected_overflow, uncorrected_overflow; | ||
290 | |||
291 | ecc_addr = gk20a_readl(g, fb_mmu_hubtlb_ecc_address_r()); | ||
292 | corrected_cnt = gk20a_readl(g, | ||
293 | fb_mmu_hubtlb_ecc_corrected_err_count_r()); | ||
294 | uncorrected_cnt = gk20a_readl(g, | ||
295 | fb_mmu_hubtlb_ecc_uncorrected_err_count_r()); | ||
296 | |||
297 | corrected_delta = fb_mmu_hubtlb_ecc_corrected_err_count_total_v( | ||
298 | corrected_cnt); | ||
299 | uncorrected_delta = fb_mmu_hubtlb_ecc_uncorrected_err_count_total_v( | ||
300 | uncorrected_cnt); | ||
301 | corrected_overflow = ecc_status & | ||
302 | fb_mmu_hubtlb_ecc_status_corrected_err_total_counter_overflow_m(); | ||
303 | |||
304 | uncorrected_overflow = ecc_status & | ||
305 | fb_mmu_hubtlb_ecc_status_uncorrected_err_total_counter_overflow_m(); | ||
306 | |||
307 | /* clear the interrupt */ | ||
308 | if ((corrected_delta > 0) || corrected_overflow) | ||
309 | gk20a_writel(g, fb_mmu_hubtlb_ecc_corrected_err_count_r(), 0); | ||
310 | if ((uncorrected_delta > 0) || uncorrected_overflow) | ||
311 | gk20a_writel(g, fb_mmu_hubtlb_ecc_uncorrected_err_count_r(), 0); | ||
312 | |||
313 | gk20a_writel(g, fb_mmu_hubtlb_ecc_status_r(), | ||
314 | fb_mmu_hubtlb_ecc_status_reset_clear_f()); | ||
315 | |||
316 | /* Handle overflow */ | ||
317 | if (corrected_overflow) | ||
318 | corrected_delta += (0x1UL << fb_mmu_hubtlb_ecc_corrected_err_count_total_s()); | ||
319 | if (uncorrected_overflow) | ||
320 | uncorrected_delta += (0x1UL << fb_mmu_hubtlb_ecc_uncorrected_err_count_total_s()); | ||
321 | |||
322 | |||
323 | g->ecc.eng.t19x.mmu_hubtlb_corrected_err_count.counters[0] += | ||
324 | corrected_delta; | ||
325 | g->ecc.eng.t19x.mmu_hubtlb_uncorrected_err_count.counters[0] += | ||
326 | uncorrected_delta; | ||
327 | |||
328 | if (ecc_status & fb_mmu_hubtlb_ecc_status_corrected_err_sa_data_m()) | ||
329 | nvgpu_log(g, gpu_dbg_intr, "corrected ecc sa data error"); | ||
330 | if (ecc_status & fb_mmu_hubtlb_ecc_status_uncorrected_err_sa_data_m()) | ||
331 | nvgpu_log(g, gpu_dbg_intr, "uncorrected ecc sa data error"); | ||
332 | if (corrected_overflow || uncorrected_overflow) | ||
333 | nvgpu_info(g, "mmu hubtlb ecc counter overflow!"); | ||
334 | |||
335 | nvgpu_log(g, gpu_dbg_intr, | ||
336 | "ecc error address: 0x%x", ecc_addr); | ||
337 | nvgpu_log(g, gpu_dbg_intr, | ||
338 | "ecc error count corrected: %d, uncorrected %d", | ||
339 | g->ecc.eng.t19x.mmu_hubtlb_corrected_err_count.counters[0], | ||
340 | g->ecc.eng.t19x.mmu_hubtlb_uncorrected_err_count.counters[0]); | ||
341 | } | ||
342 | |||
343 | static void gv11b_handle_fillunit_ecc_isr(struct gk20a *g, u32 ecc_status) | ||
344 | { | ||
345 | u32 ecc_addr, corrected_cnt, uncorrected_cnt; | ||
346 | u32 corrected_delta, uncorrected_delta; | ||
347 | u32 corrected_overflow, uncorrected_overflow; | ||
348 | |||
349 | ecc_addr = gk20a_readl(g, fb_mmu_fillunit_ecc_address_r()); | ||
350 | corrected_cnt = gk20a_readl(g, | ||
351 | fb_mmu_fillunit_ecc_corrected_err_count_r()); | ||
352 | uncorrected_cnt = gk20a_readl(g, | ||
353 | fb_mmu_fillunit_ecc_uncorrected_err_count_r()); | ||
354 | |||
355 | corrected_delta = fb_mmu_fillunit_ecc_corrected_err_count_total_v( | ||
356 | corrected_cnt); | ||
357 | uncorrected_delta = fb_mmu_fillunit_ecc_uncorrected_err_count_total_v( | ||
358 | uncorrected_cnt); | ||
359 | corrected_overflow = ecc_status & | ||
360 | fb_mmu_fillunit_ecc_status_corrected_err_total_counter_overflow_m(); | ||
361 | |||
362 | uncorrected_overflow = ecc_status & | ||
363 | fb_mmu_fillunit_ecc_status_uncorrected_err_total_counter_overflow_m(); | ||
364 | |||
365 | /* clear the interrupt */ | ||
366 | if ((corrected_delta > 0) || corrected_overflow) | ||
367 | gk20a_writel(g, fb_mmu_fillunit_ecc_corrected_err_count_r(), 0); | ||
368 | if ((uncorrected_delta > 0) || uncorrected_overflow) | ||
369 | gk20a_writel(g, fb_mmu_fillunit_ecc_uncorrected_err_count_r(), 0); | ||
370 | |||
371 | gk20a_writel(g, fb_mmu_fillunit_ecc_status_r(), | ||
372 | fb_mmu_fillunit_ecc_status_reset_clear_f()); | ||
373 | |||
374 | /* Handle overflow */ | ||
375 | if (corrected_overflow) | ||
376 | corrected_delta += (0x1UL << fb_mmu_fillunit_ecc_corrected_err_count_total_s()); | ||
377 | if (uncorrected_overflow) | ||
378 | uncorrected_delta += (0x1UL << fb_mmu_fillunit_ecc_uncorrected_err_count_total_s()); | ||
379 | |||
380 | |||
381 | g->ecc.eng.t19x.mmu_fillunit_corrected_err_count.counters[0] += | ||
382 | corrected_delta; | ||
383 | g->ecc.eng.t19x.mmu_fillunit_uncorrected_err_count.counters[0] += | ||
384 | uncorrected_delta; | ||
385 | |||
386 | if (ecc_status & fb_mmu_fillunit_ecc_status_corrected_err_pte_data_m()) | ||
387 | nvgpu_log(g, gpu_dbg_intr, "corrected ecc pte data error"); | ||
388 | if (ecc_status & fb_mmu_fillunit_ecc_status_uncorrected_err_pte_data_m()) | ||
389 | nvgpu_log(g, gpu_dbg_intr, "uncorrected ecc pte data error"); | ||
390 | if (ecc_status & fb_mmu_fillunit_ecc_status_corrected_err_pde0_data_m()) | ||
391 | nvgpu_log(g, gpu_dbg_intr, "corrected ecc pde0 data error"); | ||
392 | if (ecc_status & fb_mmu_fillunit_ecc_status_uncorrected_err_pde0_data_m()) | ||
393 | nvgpu_log(g, gpu_dbg_intr, "uncorrected ecc pde0 data error"); | ||
394 | |||
395 | if (corrected_overflow || uncorrected_overflow) | ||
396 | nvgpu_info(g, "mmu fillunit ecc counter overflow!"); | ||
397 | |||
398 | nvgpu_log(g, gpu_dbg_intr, | ||
399 | "ecc error address: 0x%x", ecc_addr); | ||
400 | nvgpu_log(g, gpu_dbg_intr, | ||
401 | "ecc error count corrected: %d, uncorrected %d", | ||
402 | g->ecc.eng.t19x.mmu_fillunit_corrected_err_count.counters[0], | ||
403 | g->ecc.eng.t19x.mmu_fillunit_uncorrected_err_count.counters[0]); | ||
404 | } | ||
405 | |||
227 | static void gv11b_fb_hub_isr(struct gk20a *g) | 406 | static void gv11b_fb_hub_isr(struct gk20a *g) |
228 | { | 407 | { |
229 | u32 status; | 408 | u32 status; |
@@ -246,28 +425,16 @@ static void gv11b_fb_hub_isr(struct gk20a *g) | |||
246 | HUB_INTR_TYPE_ECC_UNCORRECTED); | 425 | HUB_INTR_TYPE_ECC_UNCORRECTED); |
247 | 426 | ||
248 | status = gk20a_readl(g, fb_mmu_l2tlb_ecc_status_r()); | 427 | status = gk20a_readl(g, fb_mmu_l2tlb_ecc_status_r()); |
249 | if (status) { | 428 | if (status) |
250 | nvgpu_info(g, "hub mmu L2 ecc status: 0x%x", | 429 | gv11b_handle_l2tlb_ecc_isr(g, status); |
251 | status); | ||
252 | gk20a_writel(g, fb_mmu_l2tlb_ecc_status_r(), | ||
253 | fb_mmu_l2tlb_ecc_status_reset_clear_f()); | ||
254 | } | ||
255 | 430 | ||
256 | status = gk20a_readl(g, fb_mmu_hubtlb_ecc_status_r()); | 431 | status = gk20a_readl(g, fb_mmu_hubtlb_ecc_status_r()); |
257 | if (status) { | 432 | if (status) |
258 | nvgpu_info(g, "hub mmu hub tlb ecc status: 0x%x", | 433 | gv11b_handle_hubtlb_ecc_isr(g, status); |
259 | status); | ||
260 | gk20a_writel(g, fb_mmu_hubtlb_ecc_status_r(), | ||
261 | fb_mmu_hubtlb_ecc_status_reset_clear_f()); | ||
262 | } | ||
263 | 434 | ||
264 | status = gk20a_readl(g, fb_mmu_fillunit_ecc_status_r()); | 435 | status = gk20a_readl(g, fb_mmu_fillunit_ecc_status_r()); |
265 | if (status) { | 436 | if (status) |
266 | nvgpu_info(g, "hub mmu fill unit ecc status: 0x%x", | 437 | gv11b_handle_fillunit_ecc_isr(g, status); |
267 | status); | ||
268 | gk20a_writel(g, fb_mmu_fillunit_ecc_status_r(), | ||
269 | fb_mmu_fillunit_ecc_status_reset_clear_f()); | ||
270 | } | ||
271 | 438 | ||
272 | /* re-enable interrupts after handling */ | 439 | /* re-enable interrupts after handling */ |
273 | gv11b_fb_enable_hub_intr(g, STALL_REG_INDEX, | 440 | gv11b_fb_enable_hub_intr(g, STALL_REG_INDEX, |
diff --git a/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c index c69e1478..95bbfbd3 100644 --- a/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | |||
@@ -182,6 +182,13 @@ static struct device_attribute *dev_attr_gpccs_ecc_uncorrected_err_count_array; | |||
182 | static struct device_attribute *dev_attr_l2_cache_ecc_corrected_err_count_array; | 182 | static struct device_attribute *dev_attr_l2_cache_ecc_corrected_err_count_array; |
183 | static struct device_attribute *dev_attr_l2_cache_ecc_uncorrected_err_count_array; | 183 | static struct device_attribute *dev_attr_l2_cache_ecc_uncorrected_err_count_array; |
184 | 184 | ||
185 | static struct device_attribute *dev_attr_mmu_l2tlb_ecc_corrected_err_count_array; | ||
186 | static struct device_attribute *dev_attr_mmu_l2tlb_ecc_uncorrected_err_count_array; | ||
187 | static struct device_attribute *dev_attr_mmu_hubtlb_ecc_corrected_err_count_array; | ||
188 | static struct device_attribute *dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_array; | ||
189 | static struct device_attribute *dev_attr_mmu_fillunit_ecc_corrected_err_count_array; | ||
190 | static struct device_attribute *dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array; | ||
191 | |||
185 | void gr_gv11b_create_sysfs(struct device *dev) | 192 | void gr_gv11b_create_sysfs(struct device *dev) |
186 | { | 193 | { |
187 | struct gk20a *g = get_gk20a(dev); | 194 | struct gk20a *g = get_gk20a(dev); |
@@ -310,6 +317,49 @@ void gr_gv11b_create_sysfs(struct device *dev) | |||
310 | "mmu_l1tlb_ecc_corrected_err_count", | 317 | "mmu_l1tlb_ecc_corrected_err_count", |
311 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, | 318 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, |
312 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); | 319 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); |
320 | |||
321 | error |= gp10b_ecc_stat_create(dev, | ||
322 | 1, | ||
323 | "eng", | ||
324 | "mmu_l2tlb_ecc_uncorrected_err_count", | ||
325 | &g->ecc.eng.t19x.mmu_l2tlb_uncorrected_err_count, | ||
326 | dev_attr_mmu_l2tlb_ecc_uncorrected_err_count_array); | ||
327 | |||
328 | error |= gp10b_ecc_stat_create(dev, | ||
329 | 1, | ||
330 | "eng", | ||
331 | "mmu_l2tlb_ecc_corrected_err_count", | ||
332 | &g->ecc.eng.t19x.mmu_l2tlb_corrected_err_count, | ||
333 | dev_attr_mmu_l2tlb_ecc_corrected_err_count_array); | ||
334 | |||
335 | error |= gp10b_ecc_stat_create(dev, | ||
336 | 1, | ||
337 | "eng", | ||
338 | "mmu_hubtlb_ecc_uncorrected_err_count", | ||
339 | &g->ecc.eng.t19x.mmu_hubtlb_uncorrected_err_count, | ||
340 | dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_array); | ||
341 | |||
342 | error |= gp10b_ecc_stat_create(dev, | ||
343 | 1, | ||
344 | "eng", | ||
345 | "mmu_hubtlb_ecc_corrected_err_count", | ||
346 | &g->ecc.eng.t19x.mmu_hubtlb_corrected_err_count, | ||
347 | dev_attr_mmu_hubtlb_ecc_corrected_err_count_array); | ||
348 | |||
349 | error |= gp10b_ecc_stat_create(dev, | ||
350 | 1, | ||
351 | "eng", | ||
352 | "mmu_fillunit_ecc_uncorrected_err_count", | ||
353 | &g->ecc.eng.t19x.mmu_fillunit_uncorrected_err_count, | ||
354 | dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array); | ||
355 | |||
356 | error |= gp10b_ecc_stat_create(dev, | ||
357 | 1, | ||
358 | "eng", | ||
359 | "mmu_fillunit_ecc_corrected_err_count", | ||
360 | &g->ecc.eng.t19x.mmu_fillunit_corrected_err_count, | ||
361 | dev_attr_mmu_fillunit_ecc_corrected_err_count_array); | ||
362 | |||
313 | if (error) | 363 | if (error) |
314 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); | 364 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); |
315 | } | 365 | } |
@@ -407,4 +457,34 @@ static void gr_gv11b_remove_sysfs(struct device *dev) | |||
407 | g->gr.gpc_count, | 457 | g->gr.gpc_count, |
408 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, | 458 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, |
409 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); | 459 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); |
460 | |||
461 | gp10b_ecc_stat_remove(dev, | ||
462 | 1, | ||
463 | &g->ecc.eng.t19x.mmu_l2tlb_uncorrected_err_count, | ||
464 | dev_attr_mmu_l2tlb_ecc_uncorrected_err_count_array); | ||
465 | |||
466 | gp10b_ecc_stat_remove(dev, | ||
467 | 1, | ||
468 | &g->ecc.eng.t19x.mmu_l2tlb_corrected_err_count, | ||
469 | dev_attr_mmu_l2tlb_ecc_corrected_err_count_array); | ||
470 | |||
471 | gp10b_ecc_stat_remove(dev, | ||
472 | 1, | ||
473 | &g->ecc.eng.t19x.mmu_hubtlb_uncorrected_err_count, | ||
474 | dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_array); | ||
475 | |||
476 | gp10b_ecc_stat_remove(dev, | ||
477 | 1, | ||
478 | &g->ecc.eng.t19x.mmu_hubtlb_corrected_err_count, | ||
479 | dev_attr_mmu_hubtlb_ecc_corrected_err_count_array); | ||
480 | |||
481 | gp10b_ecc_stat_remove(dev, | ||
482 | 1, | ||
483 | &g->ecc.eng.t19x.mmu_fillunit_uncorrected_err_count, | ||
484 | dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array); | ||
485 | |||
486 | gp10b_ecc_stat_remove(dev, | ||
487 | 1, | ||
488 | &g->ecc.eng.t19x.mmu_fillunit_corrected_err_count, | ||
489 | dev_attr_mmu_fillunit_ecc_corrected_err_count_array); | ||
410 | } | 490 | } |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h index 76b4e902..0ddccd45 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h | |||
@@ -466,6 +466,22 @@ static inline u32 fb_mmu_l2tlb_ecc_status_r(void) | |||
466 | { | 466 | { |
467 | return 0x00100e70; | 467 | return 0x00100e70; |
468 | } | 468 | } |
469 | static inline u32 fb_mmu_l2tlb_ecc_status_corrected_err_l2tlb_sa_data_m(void) | ||
470 | { | ||
471 | return 0x1 << 0; | ||
472 | } | ||
473 | static inline u32 fb_mmu_l2tlb_ecc_status_uncorrected_err_l2tlb_sa_data_m(void) | ||
474 | { | ||
475 | return 0x1 << 1; | ||
476 | } | ||
477 | static inline u32 fb_mmu_l2tlb_ecc_status_corrected_err_total_counter_overflow_m(void) | ||
478 | { | ||
479 | return 0x1 << 16; | ||
480 | } | ||
481 | static inline u32 fb_mmu_l2tlb_ecc_status_uncorrected_err_total_counter_overflow_m(void) | ||
482 | { | ||
483 | return 0x1 << 18; | ||
484 | } | ||
469 | static inline u32 fb_mmu_l2tlb_ecc_status_reset_f(u32 v) | 485 | static inline u32 fb_mmu_l2tlb_ecc_status_reset_f(u32 v) |
470 | { | 486 | { |
471 | return (v & 0x1) << 30; | 487 | return (v & 0x1) << 30; |
@@ -474,10 +490,86 @@ static inline u32 fb_mmu_l2tlb_ecc_status_reset_clear_f(void) | |||
474 | { | 490 | { |
475 | return 0x40000000; | 491 | return 0x40000000; |
476 | } | 492 | } |
493 | static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_r(void) | ||
494 | { | ||
495 | return 0x00100e74; | ||
496 | } | ||
497 | static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_s(void) | ||
498 | { | ||
499 | return 16; | ||
500 | } | ||
501 | static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_f(u32 v) | ||
502 | { | ||
503 | return (v & 0xffff) << 0; | ||
504 | } | ||
505 | static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_m(void) | ||
506 | { | ||
507 | return 0xffff << 0; | ||
508 | } | ||
509 | static inline u32 fb_mmu_l2tlb_ecc_corrected_err_count_total_v(u32 r) | ||
510 | { | ||
511 | return (r >> 0) & 0xffff; | ||
512 | } | ||
513 | static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_r(void) | ||
514 | { | ||
515 | return 0x00100e78; | ||
516 | } | ||
517 | static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_s(void) | ||
518 | { | ||
519 | return 16; | ||
520 | } | ||
521 | static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_f(u32 v) | ||
522 | { | ||
523 | return (v & 0xffff) << 0; | ||
524 | } | ||
525 | static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_m(void) | ||
526 | { | ||
527 | return 0xffff << 0; | ||
528 | } | ||
529 | static inline u32 fb_mmu_l2tlb_ecc_uncorrected_err_count_total_v(u32 r) | ||
530 | { | ||
531 | return (r >> 0) & 0xffff; | ||
532 | } | ||
533 | static inline u32 fb_mmu_l2tlb_ecc_address_r(void) | ||
534 | { | ||
535 | return 0x00100e7c; | ||
536 | } | ||
537 | static inline u32 fb_mmu_l2tlb_ecc_address_index_s(void) | ||
538 | { | ||
539 | return 32; | ||
540 | } | ||
541 | static inline u32 fb_mmu_l2tlb_ecc_address_index_f(u32 v) | ||
542 | { | ||
543 | return (v & 0xffffffff) << 0; | ||
544 | } | ||
545 | static inline u32 fb_mmu_l2tlb_ecc_address_index_m(void) | ||
546 | { | ||
547 | return 0xffffffff << 0; | ||
548 | } | ||
549 | static inline u32 fb_mmu_l2tlb_ecc_address_index_v(u32 r) | ||
550 | { | ||
551 | return (r >> 0) & 0xffffffff; | ||
552 | } | ||
477 | static inline u32 fb_mmu_hubtlb_ecc_status_r(void) | 553 | static inline u32 fb_mmu_hubtlb_ecc_status_r(void) |
478 | { | 554 | { |
479 | return 0x00100e84; | 555 | return 0x00100e84; |
480 | } | 556 | } |
557 | static inline u32 fb_mmu_hubtlb_ecc_status_corrected_err_sa_data_m(void) | ||
558 | { | ||
559 | return 0x1 << 0; | ||
560 | } | ||
561 | static inline u32 fb_mmu_hubtlb_ecc_status_uncorrected_err_sa_data_m(void) | ||
562 | { | ||
563 | return 0x1 << 1; | ||
564 | } | ||
565 | static inline u32 fb_mmu_hubtlb_ecc_status_corrected_err_total_counter_overflow_m(void) | ||
566 | { | ||
567 | return 0x1 << 16; | ||
568 | } | ||
569 | static inline u32 fb_mmu_hubtlb_ecc_status_uncorrected_err_total_counter_overflow_m(void) | ||
570 | { | ||
571 | return 0x1 << 18; | ||
572 | } | ||
481 | static inline u32 fb_mmu_hubtlb_ecc_status_reset_f(u32 v) | 573 | static inline u32 fb_mmu_hubtlb_ecc_status_reset_f(u32 v) |
482 | { | 574 | { |
483 | return (v & 0x1) << 30; | 575 | return (v & 0x1) << 30; |
@@ -486,10 +578,94 @@ static inline u32 fb_mmu_hubtlb_ecc_status_reset_clear_f(void) | |||
486 | { | 578 | { |
487 | return 0x40000000; | 579 | return 0x40000000; |
488 | } | 580 | } |
581 | static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_r(void) | ||
582 | { | ||
583 | return 0x00100e88; | ||
584 | } | ||
585 | static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_s(void) | ||
586 | { | ||
587 | return 16; | ||
588 | } | ||
589 | static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_f(u32 v) | ||
590 | { | ||
591 | return (v & 0xffff) << 0; | ||
592 | } | ||
593 | static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_m(void) | ||
594 | { | ||
595 | return 0xffff << 0; | ||
596 | } | ||
597 | static inline u32 fb_mmu_hubtlb_ecc_corrected_err_count_total_v(u32 r) | ||
598 | { | ||
599 | return (r >> 0) & 0xffff; | ||
600 | } | ||
601 | static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_r(void) | ||
602 | { | ||
603 | return 0x00100e8c; | ||
604 | } | ||
605 | static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_s(void) | ||
606 | { | ||
607 | return 16; | ||
608 | } | ||
609 | static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_f(u32 v) | ||
610 | { | ||
611 | return (v & 0xffff) << 0; | ||
612 | } | ||
613 | static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_m(void) | ||
614 | { | ||
615 | return 0xffff << 0; | ||
616 | } | ||
617 | static inline u32 fb_mmu_hubtlb_ecc_uncorrected_err_count_total_v(u32 r) | ||
618 | { | ||
619 | return (r >> 0) & 0xffff; | ||
620 | } | ||
621 | static inline u32 fb_mmu_hubtlb_ecc_address_r(void) | ||
622 | { | ||
623 | return 0x00100e90; | ||
624 | } | ||
625 | static inline u32 fb_mmu_hubtlb_ecc_address_index_s(void) | ||
626 | { | ||
627 | return 32; | ||
628 | } | ||
629 | static inline u32 fb_mmu_hubtlb_ecc_address_index_f(u32 v) | ||
630 | { | ||
631 | return (v & 0xffffffff) << 0; | ||
632 | } | ||
633 | static inline u32 fb_mmu_hubtlb_ecc_address_index_m(void) | ||
634 | { | ||
635 | return 0xffffffff << 0; | ||
636 | } | ||
637 | static inline u32 fb_mmu_hubtlb_ecc_address_index_v(u32 r) | ||
638 | { | ||
639 | return (r >> 0) & 0xffffffff; | ||
640 | } | ||
489 | static inline u32 fb_mmu_fillunit_ecc_status_r(void) | 641 | static inline u32 fb_mmu_fillunit_ecc_status_r(void) |
490 | { | 642 | { |
491 | return 0x00100e98; | 643 | return 0x00100e98; |
492 | } | 644 | } |
645 | static inline u32 fb_mmu_fillunit_ecc_status_corrected_err_pte_data_m(void) | ||
646 | { | ||
647 | return 0x1 << 0; | ||
648 | } | ||
649 | static inline u32 fb_mmu_fillunit_ecc_status_uncorrected_err_pte_data_m(void) | ||
650 | { | ||
651 | return 0x1 << 1; | ||
652 | } | ||
653 | static inline u32 fb_mmu_fillunit_ecc_status_corrected_err_pde0_data_m(void) | ||
654 | { | ||
655 | return 0x1 << 2; | ||
656 | } | ||
657 | static inline u32 fb_mmu_fillunit_ecc_status_uncorrected_err_pde0_data_m(void) | ||
658 | { | ||
659 | return 0x1 << 3; | ||
660 | } | ||
661 | static inline u32 fb_mmu_fillunit_ecc_status_corrected_err_total_counter_overflow_m(void) | ||
662 | { | ||
663 | return 0x1 << 16; | ||
664 | } | ||
665 | static inline u32 fb_mmu_fillunit_ecc_status_uncorrected_err_total_counter_overflow_m(void) | ||
666 | { | ||
667 | return 0x1 << 18; | ||
668 | } | ||
493 | static inline u32 fb_mmu_fillunit_ecc_status_reset_f(u32 v) | 669 | static inline u32 fb_mmu_fillunit_ecc_status_reset_f(u32 v) |
494 | { | 670 | { |
495 | return (v & 0x1) << 30; | 671 | return (v & 0x1) << 30; |
@@ -498,6 +674,66 @@ static inline u32 fb_mmu_fillunit_ecc_status_reset_clear_f(void) | |||
498 | { | 674 | { |
499 | return 0x40000000; | 675 | return 0x40000000; |
500 | } | 676 | } |
677 | static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_r(void) | ||
678 | { | ||
679 | return 0x00100e9c; | ||
680 | } | ||
681 | static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_s(void) | ||
682 | { | ||
683 | return 16; | ||
684 | } | ||
685 | static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_f(u32 v) | ||
686 | { | ||
687 | return (v & 0xffff) << 0; | ||
688 | } | ||
689 | static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_m(void) | ||
690 | { | ||
691 | return 0xffff << 0; | ||
692 | } | ||
693 | static inline u32 fb_mmu_fillunit_ecc_corrected_err_count_total_v(u32 r) | ||
694 | { | ||
695 | return (r >> 0) & 0xffff; | ||
696 | } | ||
697 | static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_r(void) | ||
698 | { | ||
699 | return 0x00100ea0; | ||
700 | } | ||
701 | static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_s(void) | ||
702 | { | ||
703 | return 16; | ||
704 | } | ||
705 | static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_f(u32 v) | ||
706 | { | ||
707 | return (v & 0xffff) << 0; | ||
708 | } | ||
709 | static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_m(void) | ||
710 | { | ||
711 | return 0xffff << 0; | ||
712 | } | ||
713 | static inline u32 fb_mmu_fillunit_ecc_uncorrected_err_count_total_v(u32 r) | ||
714 | { | ||
715 | return (r >> 0) & 0xffff; | ||
716 | } | ||
717 | static inline u32 fb_mmu_fillunit_ecc_address_r(void) | ||
718 | { | ||
719 | return 0x00100ea4; | ||
720 | } | ||
721 | static inline u32 fb_mmu_fillunit_ecc_address_index_s(void) | ||
722 | { | ||
723 | return 32; | ||
724 | } | ||
725 | static inline u32 fb_mmu_fillunit_ecc_address_index_f(u32 v) | ||
726 | { | ||
727 | return (v & 0xffffffff) << 0; | ||
728 | } | ||
729 | static inline u32 fb_mmu_fillunit_ecc_address_index_m(void) | ||
730 | { | ||
731 | return 0xffffffff << 0; | ||
732 | } | ||
733 | static inline u32 fb_mmu_fillunit_ecc_address_index_v(u32 r) | ||
734 | { | ||
735 | return (r >> 0) & 0xffffffff; | ||
736 | } | ||
501 | static inline u32 fb_niso_flush_sysmem_addr_r(void) | 737 | static inline u32 fb_niso_flush_sysmem_addr_r(void) |
502 | { | 738 | { |
503 | return 0x00100c10; | 739 | return 0x00100c10; |