mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: remove trivial operations before BUG
Corrected ECC errors are not applicable to GV11B. Remove unnecesary lines of code before invoking BUG(). Jira NVGPU-6272 Change-Id: I410d6463efd39584efdff7939ad66fae8ee63afc Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2473098 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7a1c65c65d
commit
df1c9c4640
@@ -97,7 +97,8 @@ static void gv11b_gr_intr_handle_fecs_ecc_error(struct gk20a *g)
|
|||||||
nvgpu_log(g, gpu_dbg_intr, "imem ecc error uncorrected");
|
nvgpu_log(g, gpu_dbg_intr, "imem ecc error uncorrected");
|
||||||
}
|
}
|
||||||
if (fecs_ecc_status.dmem_corrected_err) {
|
if (fecs_ecc_status.dmem_corrected_err) {
|
||||||
nvgpu_log(g, gpu_dbg_intr, "dmem ecc error corrected");
|
nvgpu_log(g, gpu_dbg_intr,
|
||||||
|
"unexpected dmem ecc error corrected");
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -289,25 +290,11 @@ void gv11b_gr_intr_handle_gcc_exception(struct gk20a *g, u32 gpc,
|
|||||||
if ((gcc_l15_corrected_err_count_delta > 0U) ||
|
if ((gcc_l15_corrected_err_count_delta > 0U) ||
|
||||||
is_gcc_l15_ecc_corrected_total_err_overflow) {
|
is_gcc_l15_ecc_corrected_total_err_overflow) {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
||||||
"corrected error (SBE) detected in GCC L1.5!"
|
"unexpected corrected error (SBE) detected in GCC L1.5!"
|
||||||
"err_mask [%08x] is_overf [%d]",
|
"err_mask [%08x] is_overf [%d]",
|
||||||
gcc_l15_ecc_corrected_err_status,
|
gcc_l15_ecc_corrected_err_status,
|
||||||
is_gcc_l15_ecc_corrected_total_err_overflow);
|
is_gcc_l15_ecc_corrected_total_err_overflow);
|
||||||
|
|
||||||
/* HW uses 16-bits counter */
|
|
||||||
if (is_gcc_l15_ecc_corrected_total_err_overflow) {
|
|
||||||
gcc_l15_corrected_err_count_delta =
|
|
||||||
nvgpu_safe_add_u32(
|
|
||||||
gcc_l15_corrected_err_count_delta,
|
|
||||||
BIT32(
|
|
||||||
gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_total_s()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
*corrected_err = nvgpu_safe_add_u32(
|
|
||||||
*corrected_err,
|
|
||||||
gcc_l15_corrected_err_count_delta);
|
|
||||||
nvgpu_writel(g, nvgpu_safe_add_u32(
|
|
||||||
gr_pri_gpc0_gcc_l15_ecc_corrected_err_count_r(), offset), 0);
|
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -352,7 +339,8 @@ static void gv11b_gr_intr_report_gpcmmu_ecc_err(struct gk20a *g,
|
|||||||
if ((ecc_status &
|
if ((ecc_status &
|
||||||
gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_sa_data_m()) !=
|
gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_sa_data_m()) !=
|
||||||
0U) {
|
0U) {
|
||||||
nvgpu_log(g, gpu_dbg_intr, "corrected ecc sa data error");
|
nvgpu_log(g, gpu_dbg_intr,
|
||||||
|
"unexpected corrected ecc sa data error");
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -369,7 +357,8 @@ static void gv11b_gr_intr_report_gpcmmu_ecc_err(struct gk20a *g,
|
|||||||
if ((ecc_status &
|
if ((ecc_status &
|
||||||
gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_fa_data_m()) !=
|
gr_gpc0_mmu_l1tlb_ecc_status_corrected_err_l1tlb_fa_data_m()) !=
|
||||||
0U) {
|
0U) {
|
||||||
nvgpu_log(g, gpu_dbg_intr, "corrected ecc fa data error");
|
nvgpu_log(g, gpu_dbg_intr,
|
||||||
|
"unexpected corrected ecc fa data error");
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -492,7 +481,8 @@ static void gv11b_gr_intr_report_gpccs_ecc_err(struct gk20a *g,
|
|||||||
}
|
}
|
||||||
if ((ecc_status &
|
if ((ecc_status &
|
||||||
gr_gpc0_gpccs_falcon_ecc_status_corrected_err_dmem_m()) != 0U) {
|
gr_gpc0_gpccs_falcon_ecc_status_corrected_err_dmem_m()) != 0U) {
|
||||||
nvgpu_log(g, gpu_dbg_intr, "dmem ecc error corrected");
|
nvgpu_log(g, gpu_dbg_intr,
|
||||||
|
"unexpected dmem ecc error corrected");
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -1217,25 +1207,14 @@ static void gv11b_gr_intr_handle_lrf_exception(struct gk20a *g, u32 gpc, u32 tpc
|
|||||||
*/
|
*/
|
||||||
tpc = tpc & U8_MAX;
|
tpc = tpc & U8_MAX;
|
||||||
|
|
||||||
if ((lrf_corrected_err_count_delta > 0U) || is_lrf_ecc_corrected_total_err_overflow) {
|
if ((lrf_corrected_err_count_delta > 0U) ||
|
||||||
|
is_lrf_ecc_corrected_total_err_overflow) {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
||||||
"corrected error (SBE) detected in SM LRF! err_mask [%08x] is_overf [%d]",
|
"unexpected corrected error (SBE) detected in SM LRF!"
|
||||||
ecc_status.corrected_err_status, is_lrf_ecc_corrected_total_err_overflow);
|
" err_mask [%08x] is_overf [%d]",
|
||||||
|
ecc_status.corrected_err_status,
|
||||||
|
is_lrf_ecc_corrected_total_err_overflow);
|
||||||
|
|
||||||
/* HW uses 16-bits counter */
|
|
||||||
if (is_lrf_ecc_corrected_total_err_overflow) {
|
|
||||||
lrf_corrected_err_count_delta =
|
|
||||||
nvgpu_safe_add_u32(
|
|
||||||
lrf_corrected_err_count_delta,
|
|
||||||
BIT32(gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_total_s()));
|
|
||||||
}
|
|
||||||
g->ecc.gr.sm_lrf_ecc_single_err_count[gpc][tpc].counter =
|
|
||||||
nvgpu_safe_add_u32(
|
|
||||||
g->ecc.gr.sm_lrf_ecc_single_err_count[gpc][tpc].counter,
|
|
||||||
lrf_corrected_err_count_delta);
|
|
||||||
nvgpu_writel(g, nvgpu_safe_add_u32(
|
|
||||||
gr_pri_gpc0_tpc0_sm_lrf_ecc_corrected_err_count_r(), offset),
|
|
||||||
0U);
|
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -1363,24 +1342,14 @@ static void gv11b_gr_intr_handle_cbu_exception(struct gk20a *g, u32 gpc, u32 tpc
|
|||||||
*/
|
*/
|
||||||
tpc = tpc & U8_MAX;
|
tpc = tpc & U8_MAX;
|
||||||
|
|
||||||
if ((cbu_corrected_err_count_delta > 0U) || is_cbu_ecc_corrected_total_err_overflow) {
|
if ((cbu_corrected_err_count_delta > 0U) ||
|
||||||
|
is_cbu_ecc_corrected_total_err_overflow) {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
||||||
"corrected error (SBE) detected in SM CBU! err_mask [%08x] is_overf [%d]",
|
"unexpected corrected error (SBE) detected in SM CBU!"
|
||||||
ecc_status.corrected_err_status, is_cbu_ecc_corrected_total_err_overflow);
|
" err_mask [%08x] is_overf [%d]",
|
||||||
|
ecc_status.corrected_err_status,
|
||||||
|
is_cbu_ecc_corrected_total_err_overflow);
|
||||||
|
|
||||||
/* HW uses 16-bits counter */
|
|
||||||
if (is_cbu_ecc_corrected_total_err_overflow) {
|
|
||||||
cbu_corrected_err_count_delta =
|
|
||||||
nvgpu_safe_add_u32(cbu_corrected_err_count_delta,
|
|
||||||
BIT32(gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_total_s()));
|
|
||||||
}
|
|
||||||
g->ecc.gr.sm_cbu_ecc_corrected_err_count[gpc][tpc].counter =
|
|
||||||
nvgpu_safe_add_u32(
|
|
||||||
g->ecc.gr.sm_cbu_ecc_corrected_err_count[gpc][tpc].counter,
|
|
||||||
cbu_corrected_err_count_delta);
|
|
||||||
nvgpu_writel(g, nvgpu_safe_add_u32(
|
|
||||||
gr_pri_gpc0_tpc0_sm_cbu_ecc_corrected_err_count_r(), offset),
|
|
||||||
0U);
|
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
@@ -1502,25 +1471,14 @@ static void gv11b_gr_intr_handle_l1_data_exception(struct gk20a *g, u32 gpc, u32
|
|||||||
*/
|
*/
|
||||||
tpc = tpc & U8_MAX;
|
tpc = tpc & U8_MAX;
|
||||||
|
|
||||||
if ((l1_data_corrected_err_count_delta > 0U) || is_l1_data_ecc_corrected_total_err_overflow) {
|
if ((l1_data_corrected_err_count_delta > 0U) ||
|
||||||
|
is_l1_data_ecc_corrected_total_err_overflow) {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_intr,
|
||||||
"corrected error (SBE) detected in SM L1 data! err_mask [%08x] is_overf [%d]",
|
"unexpected corrected error (SBE) detected in SM L1 data!"
|
||||||
ecc_status.corrected_err_status, is_l1_data_ecc_corrected_total_err_overflow);
|
" err_mask [%08x] is_overf [%d]",
|
||||||
|
ecc_status.corrected_err_status,
|
||||||
|
is_l1_data_ecc_corrected_total_err_overflow);
|
||||||
|
|
||||||
/* HW uses 16-bits counter */
|
|
||||||
if (is_l1_data_ecc_corrected_total_err_overflow) {
|
|
||||||
l1_data_corrected_err_count_delta =
|
|
||||||
nvgpu_safe_add_u32(
|
|
||||||
l1_data_corrected_err_count_delta,
|
|
||||||
BIT32(gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_total_s()));
|
|
||||||
}
|
|
||||||
g->ecc.gr.sm_l1_data_ecc_corrected_err_count[gpc][tpc].counter =
|
|
||||||
nvgpu_safe_add_u32(
|
|
||||||
g->ecc.gr.sm_l1_data_ecc_corrected_err_count[gpc][tpc].counter,
|
|
||||||
l1_data_corrected_err_count_delta);
|
|
||||||
nvgpu_writel(g, nvgpu_safe_add_u32(
|
|
||||||
gr_pri_gpc0_tpc0_sm_l1_data_ecc_corrected_err_count_r(), offset),
|
|
||||||
0U);
|
|
||||||
/* This error is not expected to occur in gv11b and hence,
|
/* This error is not expected to occur in gv11b and hence,
|
||||||
* this scenario is considered as a fatal error.
|
* this scenario is considered as a fatal error.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user