diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 103 |
1 files changed, 83 insertions, 20 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 764374cc..8b4471ca 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -163,7 +163,7 @@ static int gr_gv11b_handle_l1_tag_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
163 | l1_tag_corrected_err_count_delta += | 163 | l1_tag_corrected_err_count_delta += |
164 | (is_l1_tag_ecc_corrected_total_err_overflow << | 164 | (is_l1_tag_ecc_corrected_total_err_overflow << |
165 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_total_s()); | 165 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_total_s()); |
166 | g->gr.t19x.ecc_stats.sm_l1_tag_corrected_err_count.counters[tpc] += | 166 | g->ecc.gr.t19x.sm_l1_tag_corrected_err_count.counters[tpc] += |
167 | l1_tag_corrected_err_count_delta; | 167 | l1_tag_corrected_err_count_delta; |
168 | gk20a_writel(g, | 168 | gk20a_writel(g, |
169 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_r() + offset, | 169 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_corrected_err_count_r() + offset, |
@@ -178,7 +178,7 @@ static int gr_gv11b_handle_l1_tag_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
178 | l1_tag_uncorrected_err_count_delta += | 178 | l1_tag_uncorrected_err_count_delta += |
179 | (is_l1_tag_ecc_uncorrected_total_err_overflow << | 179 | (is_l1_tag_ecc_uncorrected_total_err_overflow << |
180 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_total_s()); | 180 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_total_s()); |
181 | g->gr.t19x.ecc_stats.sm_l1_tag_uncorrected_err_count.counters[tpc] += | 181 | g->ecc.gr.t19x.sm_l1_tag_uncorrected_err_count.counters[tpc] += |
182 | l1_tag_uncorrected_err_count_delta; | 182 | l1_tag_uncorrected_err_count_delta; |
183 | gk20a_writel(g, | 183 | gk20a_writel(g, |
184 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_r() + offset, | 184 | gr_pri_gpc0_tpc0_sm_l1_tag_ecc_uncorrected_err_count_r() + offset, |
@@ -255,7 +255,7 @@ static int gr_gv11b_handle_lrf_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
255 | lrf_corrected_err_count_delta += | 255 | lrf_corrected_err_count_delta += |
256 | (is_lrf_ecc_corrected_total_err_overflow << | 256 | (is_lrf_ecc_corrected_total_err_overflow << |
257 | gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_s()); | 257 | gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_s()); |
258 | g->gr.t18x.ecc_stats.sm_lrf_single_err_count.counters[tpc] += | 258 | g->ecc.gr.t18x.sm_lrf_single_err_count.counters[tpc] += |
259 | lrf_corrected_err_count_delta; | 259 | lrf_corrected_err_count_delta; |
260 | gk20a_writel(g, | 260 | gk20a_writel(g, |
261 | gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_r() + offset, | 261 | gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_r() + offset, |
@@ -270,7 +270,7 @@ static int gr_gv11b_handle_lrf_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
270 | lrf_uncorrected_err_count_delta += | 270 | lrf_uncorrected_err_count_delta += |
271 | (is_lrf_ecc_uncorrected_total_err_overflow << | 271 | (is_lrf_ecc_uncorrected_total_err_overflow << |
272 | gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_total_s()); | 272 | gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_total_s()); |
273 | g->gr.t18x.ecc_stats.sm_lrf_double_err_count.counters[tpc] += | 273 | g->ecc.gr.t18x.sm_lrf_double_err_count.counters[tpc] += |
274 | lrf_uncorrected_err_count_delta; | 274 | lrf_uncorrected_err_count_delta; |
275 | gk20a_writel(g, | 275 | gk20a_writel(g, |
276 | gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_r() + offset, | 276 | gr_pri_gpc0_tpc0_sm_lrf_ecc_uncorrected_err_count_r() + offset, |
@@ -339,7 +339,7 @@ static int gr_gv11b_handle_cbu_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
339 | cbu_corrected_err_count_delta += | 339 | cbu_corrected_err_count_delta += |
340 | (is_cbu_ecc_corrected_total_err_overflow << | 340 | (is_cbu_ecc_corrected_total_err_overflow << |
341 | gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_s()); | 341 | gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_s()); |
342 | g->gr.t19x.ecc_stats.sm_cbu_corrected_err_count.counters[tpc] += | 342 | g->ecc.gr.t19x.sm_cbu_corrected_err_count.counters[tpc] += |
343 | cbu_corrected_err_count_delta; | 343 | cbu_corrected_err_count_delta; |
344 | gk20a_writel(g, | 344 | gk20a_writel(g, |
345 | gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_r() + offset, | 345 | gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_r() + offset, |
@@ -354,7 +354,7 @@ static int gr_gv11b_handle_cbu_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
354 | cbu_uncorrected_err_count_delta += | 354 | cbu_uncorrected_err_count_delta += |
355 | (is_cbu_ecc_uncorrected_total_err_overflow << | 355 | (is_cbu_ecc_uncorrected_total_err_overflow << |
356 | gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_total_s()); | 356 | gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_total_s()); |
357 | g->gr.t19x.ecc_stats.sm_cbu_uncorrected_err_count.counters[tpc] += | 357 | g->ecc.gr.t19x.sm_cbu_uncorrected_err_count.counters[tpc] += |
358 | cbu_uncorrected_err_count_delta; | 358 | cbu_uncorrected_err_count_delta; |
359 | gk20a_writel(g, | 359 | gk20a_writel(g, |
360 | gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_r() + offset, | 360 | gr_pri_gpc0_tpc0_sm_cbu_ecc_uncorrected_err_count_r() + offset, |
@@ -419,7 +419,7 @@ static int gr_gv11b_handle_l1_data_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
419 | l1_data_corrected_err_count_delta += | 419 | l1_data_corrected_err_count_delta += |
420 | (is_l1_data_ecc_corrected_total_err_overflow << | 420 | (is_l1_data_ecc_corrected_total_err_overflow << |
421 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_s()); | 421 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_s()); |
422 | g->gr.t19x.ecc_stats.sm_l1_data_corrected_err_count.counters[tpc] += | 422 | g->ecc.gr.t19x.sm_l1_data_corrected_err_count.counters[tpc] += |
423 | l1_data_corrected_err_count_delta; | 423 | l1_data_corrected_err_count_delta; |
424 | gk20a_writel(g, | 424 | gk20a_writel(g, |
425 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_r() + offset, | 425 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_r() + offset, |
@@ -434,7 +434,7 @@ static int gr_gv11b_handle_l1_data_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
434 | l1_data_uncorrected_err_count_delta += | 434 | l1_data_uncorrected_err_count_delta += |
435 | (is_l1_data_ecc_uncorrected_total_err_overflow << | 435 | (is_l1_data_ecc_uncorrected_total_err_overflow << |
436 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_total_s()); | 436 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_total_s()); |
437 | g->gr.t19x.ecc_stats.sm_l1_data_uncorrected_err_count.counters[tpc] += | 437 | g->ecc.gr.t19x.sm_l1_data_uncorrected_err_count.counters[tpc] += |
438 | l1_data_uncorrected_err_count_delta; | 438 | l1_data_uncorrected_err_count_delta; |
439 | gk20a_writel(g, | 439 | gk20a_writel(g, |
440 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_r() + offset, | 440 | gr_pri_gpc0_tpc0_sm_l1_data_ecc_uncorrected_err_count_r() + offset, |
@@ -503,7 +503,7 @@ static int gr_gv11b_handle_icache_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
503 | icache_corrected_err_count_delta += | 503 | icache_corrected_err_count_delta += |
504 | (is_icache_ecc_corrected_total_err_overflow << | 504 | (is_icache_ecc_corrected_total_err_overflow << |
505 | gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_total_s()); | 505 | gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_total_s()); |
506 | g->gr.t19x.ecc_stats.sm_icache_corrected_err_count.counters[tpc] += | 506 | g->ecc.gr.t19x.sm_icache_corrected_err_count.counters[tpc] += |
507 | icache_corrected_err_count_delta; | 507 | icache_corrected_err_count_delta; |
508 | gk20a_writel(g, | 508 | gk20a_writel(g, |
509 | gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_r() + offset, | 509 | gr_pri_gpc0_tpc0_sm_icache_ecc_corrected_err_count_r() + offset, |
@@ -518,7 +518,7 @@ static int gr_gv11b_handle_icache_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
518 | icache_uncorrected_err_count_delta += | 518 | icache_uncorrected_err_count_delta += |
519 | (is_icache_ecc_uncorrected_total_err_overflow << | 519 | (is_icache_ecc_uncorrected_total_err_overflow << |
520 | gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_total_s()); | 520 | gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_total_s()); |
521 | g->gr.t19x.ecc_stats.sm_icache_uncorrected_err_count.counters[tpc] += | 521 | g->ecc.gr.t19x.sm_icache_uncorrected_err_count.counters[tpc] += |
522 | icache_uncorrected_err_count_delta; | 522 | icache_uncorrected_err_count_delta; |
523 | gk20a_writel(g, | 523 | gk20a_writel(g, |
524 | gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_r() + offset, | 524 | gr_pri_gpc0_tpc0_sm_icache_ecc_uncorrected_err_count_r() + offset, |
@@ -606,7 +606,7 @@ static int gr_gv11b_handle_gcc_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
606 | gcc_l15_corrected_err_count_delta += | 606 | gcc_l15_corrected_err_count_delta += |
607 | (is_gcc_l15_ecc_corrected_total_err_overflow << | 607 | (is_gcc_l15_ecc_corrected_total_err_overflow << |
608 | gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_total_s()); | 608 | gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_total_s()); |
609 | g->gr.t19x.ecc_stats.gcc_l15_corrected_err_count.counters[gpc] += | 609 | g->ecc.gr.t19x.gcc_l15_corrected_err_count.counters[gpc] += |
610 | gcc_l15_corrected_err_count_delta; | 610 | gcc_l15_corrected_err_count_delta; |
611 | gk20a_writel(g, | 611 | gk20a_writel(g, |
612 | gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_r() + offset, | 612 | gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_r() + offset, |
@@ -621,7 +621,7 @@ static int gr_gv11b_handle_gcc_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
621 | gcc_l15_uncorrected_err_count_delta += | 621 | gcc_l15_uncorrected_err_count_delta += |
622 | (is_gcc_l15_ecc_uncorrected_total_err_overflow << | 622 | (is_gcc_l15_ecc_uncorrected_total_err_overflow << |
623 | gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_total_s()); | 623 | gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_total_s()); |
624 | g->gr.t19x.ecc_stats.gcc_l15_uncorrected_err_count.counters[gpc] += | 624 | g->ecc.gr.t19x.gcc_l15_uncorrected_err_count.counters[gpc] += |
625 | gcc_l15_uncorrected_err_count_delta; | 625 | gcc_l15_uncorrected_err_count_delta; |
626 | gk20a_writel(g, | 626 | gk20a_writel(g, |
627 | gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_r() + offset, | 627 | gr_pri_gpc0_gcc_l15_ecc_uncorrected_err_count_r() + offset, |
@@ -639,6 +639,9 @@ static int gr_gv11b_handle_gpccs_ecc_exception(struct gk20a *g, u32 gpc, | |||
639 | { | 639 | { |
640 | int ret = 0; | 640 | int ret = 0; |
641 | u32 ecc_status, ecc_addr, corrected_cnt, uncorrected_cnt; | 641 | u32 ecc_status, ecc_addr, corrected_cnt, uncorrected_cnt; |
642 | u32 corrected_delta, uncorrected_delta; | ||
643 | u32 corrected_overflow, uncorrected_overflow; | ||
644 | |||
642 | int hww_esr; | 645 | int hww_esr; |
643 | u32 offset = proj_gpc_stride_v() * gpc; | 646 | u32 offset = proj_gpc_stride_v() * gpc; |
644 | 647 | ||
@@ -657,10 +660,34 @@ static int gr_gv11b_handle_gpccs_ecc_exception(struct gk20a *g, u32 gpc, | |||
657 | uncorrected_cnt = gk20a_readl(g, | 660 | uncorrected_cnt = gk20a_readl(g, |
658 | gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_r() + offset); | 661 | gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_r() + offset); |
659 | 662 | ||
663 | corrected_delta = gr_gpc0_gpccs_falcon_ecc_corrected_err_count_total_v( | ||
664 | corrected_cnt); | ||
665 | uncorrected_delta = gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_total_v( | ||
666 | uncorrected_cnt); | ||
667 | corrected_overflow = ecc_status & | ||
668 | gr_gpc0_gpccs_falcon_ecc_status_corrected_err_total_counter_overflow_m(); | ||
669 | |||
670 | uncorrected_overflow = ecc_status & | ||
671 | gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_total_counter_overflow_m(); | ||
672 | |||
673 | |||
660 | /* clear the interrupt */ | 674 | /* clear the interrupt */ |
675 | if ((corrected_delta > 0) || corrected_overflow) | ||
676 | gk20a_writel(g, | ||
677 | gr_gpc0_gpccs_falcon_ecc_corrected_err_count_r() + | ||
678 | offset, 0); | ||
679 | if ((uncorrected_delta > 0) || uncorrected_overflow) | ||
680 | gk20a_writel(g, | ||
681 | gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_r() + | ||
682 | offset, 0); | ||
683 | |||
661 | gk20a_writel(g, gr_gpc0_gpccs_falcon_ecc_status_r() + offset, | 684 | gk20a_writel(g, gr_gpc0_gpccs_falcon_ecc_status_r() + offset, |
662 | gr_gpc0_gpccs_falcon_ecc_status_reset_task_f()); | 685 | gr_gpc0_gpccs_falcon_ecc_status_reset_task_f()); |
663 | 686 | ||
687 | g->ecc.gr.t19x.gpccs_corrected_err_count.counters[gpc] += | ||
688 | corrected_delta; | ||
689 | g->ecc.gr.t19x.gpccs_uncorrected_err_count.counters[gpc] += | ||
690 | uncorrected_delta; | ||
664 | nvgpu_log(g, gpu_dbg_intr, | 691 | nvgpu_log(g, gpu_dbg_intr, |
665 | "gppcs gpc:%d ecc interrupt intr: 0x%x", gpc, hww_esr); | 692 | "gppcs gpc:%d ecc interrupt intr: 0x%x", gpc, hww_esr); |
666 | 693 | ||
@@ -675,6 +702,8 @@ static int gr_gv11b_handle_gpccs_ecc_exception(struct gk20a *g, u32 gpc, | |||
675 | if (ecc_status & | 702 | if (ecc_status & |
676 | gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_dmem_m()) | 703 | gr_gpc0_gpccs_falcon_ecc_status_uncorrected_err_dmem_m()) |
677 | nvgpu_log(g, gpu_dbg_intr, "dmem ecc error uncorrected"); | 704 | nvgpu_log(g, gpu_dbg_intr, "dmem ecc error uncorrected"); |
705 | if (corrected_overflow || uncorrected_overflow) | ||
706 | nvgpu_info(g, "gpccs ecc counter overflow!"); | ||
678 | 707 | ||
679 | nvgpu_log(g, gpu_dbg_intr, | 708 | nvgpu_log(g, gpu_dbg_intr, |
680 | "ecc error row address: 0x%x", | 709 | "ecc error row address: 0x%x", |
@@ -682,8 +711,8 @@ static int gr_gv11b_handle_gpccs_ecc_exception(struct gk20a *g, u32 gpc, | |||
682 | 711 | ||
683 | nvgpu_log(g, gpu_dbg_intr, | 712 | nvgpu_log(g, gpu_dbg_intr, |
684 | "ecc error count corrected: %d, uncorrected %d", | 713 | "ecc error count corrected: %d, uncorrected %d", |
685 | gr_gpc0_gpccs_falcon_ecc_corrected_err_count_total_v(corrected_cnt), | 714 | g->ecc.gr.t19x.gpccs_corrected_err_count.counters[gpc], |
686 | gr_gpc0_gpccs_falcon_ecc_uncorrected_err_count_total_v(uncorrected_cnt)); | 715 | g->ecc.gr.t19x.gpccs_uncorrected_err_count.counters[gpc]); |
687 | 716 | ||
688 | return ret; | 717 | return ret; |
689 | } | 718 | } |
@@ -710,8 +739,8 @@ static void gr_gv11b_enable_gpc_exceptions(struct gk20a *g) | |||
710 | gr_gpcs_gpccs_gpc_exception_en_tpc_f((1 << gr->tpc_count) - 1); | 739 | gr_gpcs_gpccs_gpc_exception_en_tpc_f((1 << gr->tpc_count) - 1); |
711 | 740 | ||
712 | gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), | 741 | gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), |
713 | (tpc_mask | gr_gpcs_gpccs_gpc_exception_en_gcc_f(1) | 742 | (tpc_mask | gr_gpcs_gpccs_gpc_exception_en_gcc_f(1) | |
714 | gr_gpcs_gpccs_gpc_exception_en_gpccs_f(1)); | 743 | gr_gpcs_gpccs_gpc_exception_en_gpccs_f(1))); |
715 | } | 744 | } |
716 | 745 | ||
717 | static int gr_gv11b_handle_tex_exception(struct gk20a *g, u32 gpc, u32 tpc, | 746 | static int gr_gv11b_handle_tex_exception(struct gk20a *g, u32 gpc, u32 tpc, |
@@ -1690,6 +1719,8 @@ static int gr_gv11b_get_cilp_preempt_pending_chid(struct gk20a *g, int *__chid) | |||
1690 | static void gr_gv11b_handle_fecs_ecc_error(struct gk20a *g, u32 intr) | 1719 | static void gr_gv11b_handle_fecs_ecc_error(struct gk20a *g, u32 intr) |
1691 | { | 1720 | { |
1692 | u32 ecc_status, ecc_addr, corrected_cnt, uncorrected_cnt; | 1721 | u32 ecc_status, ecc_addr, corrected_cnt, uncorrected_cnt; |
1722 | u32 corrected_delta, uncorrected_delta; | ||
1723 | u32 corrected_overflow, uncorrected_overflow; | ||
1693 | 1724 | ||
1694 | if (intr & (gr_fecs_host_int_status_ecc_uncorrected_m() | | 1725 | if (intr & (gr_fecs_host_int_status_ecc_uncorrected_m() | |
1695 | gr_fecs_host_int_status_ecc_corrected_m())) { | 1726 | gr_fecs_host_int_status_ecc_corrected_m())) { |
@@ -1701,10 +1732,42 @@ static void gr_gv11b_handle_fecs_ecc_error(struct gk20a *g, u32 intr) | |||
1701 | uncorrected_cnt = gk20a_readl(g, | 1732 | uncorrected_cnt = gk20a_readl(g, |
1702 | gr_fecs_falcon_ecc_uncorrected_err_count_r()); | 1733 | gr_fecs_falcon_ecc_uncorrected_err_count_r()); |
1703 | 1734 | ||
1735 | corrected_delta = | ||
1736 | gr_fecs_falcon_ecc_corrected_err_count_total_v( | ||
1737 | corrected_cnt); | ||
1738 | uncorrected_delta = | ||
1739 | gr_fecs_falcon_ecc_uncorrected_err_count_total_v( | ||
1740 | uncorrected_cnt); | ||
1741 | |||
1742 | corrected_overflow = ecc_status & | ||
1743 | gr_fecs_falcon_ecc_status_corrected_err_total_counter_overflow_m(); | ||
1744 | uncorrected_overflow = ecc_status & | ||
1745 | gr_fecs_falcon_ecc_status_uncorrected_err_total_counter_overflow_m(); | ||
1746 | |||
1747 | /* clear the interrupt */ | ||
1748 | if ((corrected_delta > 0) || corrected_overflow) | ||
1749 | gk20a_writel(g, | ||
1750 | gr_fecs_falcon_ecc_corrected_err_count_r(), 0); | ||
1751 | if ((uncorrected_delta > 0) || uncorrected_overflow) | ||
1752 | gk20a_writel(g, | ||
1753 | gr_fecs_falcon_ecc_uncorrected_err_count_r(), | ||
1754 | 0); | ||
1755 | |||
1756 | |||
1757 | /* clear the interrupt */ | ||
1758 | gk20a_writel(g, gr_fecs_falcon_ecc_uncorrected_err_count_r(), | ||
1759 | 0); | ||
1760 | gk20a_writel(g, gr_fecs_falcon_ecc_corrected_err_count_r(), 0); | ||
1761 | |||
1704 | /* clear the interrupt */ | 1762 | /* clear the interrupt */ |
1705 | gk20a_writel(g, gr_fecs_falcon_ecc_status_r(), | 1763 | gk20a_writel(g, gr_fecs_falcon_ecc_status_r(), |
1706 | gr_fecs_falcon_ecc_status_reset_task_f()); | 1764 | gr_fecs_falcon_ecc_status_reset_task_f()); |
1707 | 1765 | ||
1766 | g->ecc.gr.t19x.fecs_corrected_err_count.counters[0] += | ||
1767 | corrected_delta; | ||
1768 | g->ecc.gr.t19x.fecs_uncorrected_err_count.counters[0] += | ||
1769 | uncorrected_delta; | ||
1770 | |||
1708 | nvgpu_log(g, gpu_dbg_intr, | 1771 | nvgpu_log(g, gpu_dbg_intr, |
1709 | "fecs ecc interrupt intr: 0x%x", intr); | 1772 | "fecs ecc interrupt intr: 0x%x", intr); |
1710 | 1773 | ||
@@ -1722,6 +1785,8 @@ static void gr_gv11b_handle_fecs_ecc_error(struct gk20a *g, u32 intr) | |||
1722 | gr_fecs_falcon_ecc_status_uncorrected_err_dmem_m()) | 1785 | gr_fecs_falcon_ecc_status_uncorrected_err_dmem_m()) |
1723 | nvgpu_log(g, gpu_dbg_intr, | 1786 | nvgpu_log(g, gpu_dbg_intr, |
1724 | "dmem ecc error uncorrected"); | 1787 | "dmem ecc error uncorrected"); |
1788 | if (corrected_overflow || uncorrected_overflow) | ||
1789 | nvgpu_info(g, "gpccs ecc counter overflow!"); | ||
1725 | 1790 | ||
1726 | nvgpu_log(g, gpu_dbg_intr, | 1791 | nvgpu_log(g, gpu_dbg_intr, |
1727 | "ecc error row address: 0x%x", | 1792 | "ecc error row address: 0x%x", |
@@ -1729,10 +1794,8 @@ static void gr_gv11b_handle_fecs_ecc_error(struct gk20a *g, u32 intr) | |||
1729 | 1794 | ||
1730 | nvgpu_log(g, gpu_dbg_intr, | 1795 | nvgpu_log(g, gpu_dbg_intr, |
1731 | "ecc error count corrected: %d, uncorrected %d", | 1796 | "ecc error count corrected: %d, uncorrected %d", |
1732 | gr_fecs_falcon_ecc_corrected_err_count_total_v( | 1797 | g->ecc.gr.t19x.fecs_corrected_err_count.counters[0], |
1733 | corrected_cnt), | 1798 | g->ecc.gr.t19x.fecs_uncorrected_err_count.counters[0]); |
1734 | gr_fecs_falcon_ecc_uncorrected_err_count_total_v( | ||
1735 | uncorrected_cnt)); | ||
1736 | } | 1799 | } |
1737 | } | 1800 | } |
1738 | 1801 | ||