drm/amdgpu: print more correctable error info
Subsystems (2)
PATCH 1/1 drm/amdgpu: print more correctable error info
--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 62 ++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +60 -2
@@ -70,15 +70,46 @@ static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_device {uint64_t mc_umc_status;uint32_t eccinfo_table_idx; +uint32_t umc_reg_offset; +uint32_t mc_umc_addr; +uint64_t reg_value;struct amdgpu_ras *ras =amdgpu_ras_get_context (adev); + umc_reg_offset =get_umc_v6_7_reg_offset (adev, + umc_inst, ch_inst); + eccinfo_table_idx = umc_inst * adev->umc.channel_inst_num + ch_inst;/* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras->umc_ecc.ecc[eccinfo_table_idx].mca_umc_status;if (REG_GET_FIELD (mc_umc_status,MCA_UMC_UMC0_MCUMC_STATUST0 , Val) ==1 && -REG_GET_FIELD (mc_umc_status,MCA_UMC_UMC0_MCUMC_STATUST0 ,CECC ) ==1 ) +REG_GET_FIELD (mc_umc_status,MCA_UMC_UMC0_MCUMC_STATUST0 ,CECC ) ==1 ) { *error_count +=1 ; + +if (mc_umc_status) +dev_info (adev->dev,"MCA STATUS 0x%llx, umc_reg_offset 0x%x\n" , mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = +SOC15_REG_OFFSET (UMC ,0 , regMCA_UMC_UMC0_MCUMC_IPIDT0); + reg_value =RREG64_PCIE ((mc_umc_addr + umc_reg_offset) *4 ); +if (reg_value) +dev_info (adev->dev,"MCA IPID 0x%llx, umc_reg_offset 0x%x\n" , reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = +SOC15_REG_OFFSET (UMC ,0 , regMCA_UMC_UMC0_MCUMC_SYNDT0); + reg_value =RREG64_PCIE ((mc_umc_addr + umc_reg_offset) *4 ); +if (reg_value) +dev_info (adev->dev,"MCA SYND 0x%llx, umc_reg_offset 0x%x\n" , reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = +SOC15_REG_OFFSET (UMC ,0 , regMCA_UMC_UMC0_MCUMC_MISC0T0); + reg_value =RREG64_PCIE ((mc_umc_addr + umc_reg_offset) *4 ); +if (reg_value) +dev_info (adev->dev,"MCA MISC0 0x%llx, umc_reg_offset 0x%x\n" , reg_value, umc_reg_offset); + } } static void umc_v6_7_ecc_info_querry_uncorrectable_error_count(struct amdgpu_device *adev,
@@ -242,7 +273,9 @@ static void umc_v6_7_query_correctable_error_count(struct amdgpu_device *adev,uint32_t ecc_err_cnt_sel, ecc_err_cnt_sel_addr;uint32_t ecc_err_cnt, ecc_err_cnt_addr;uint64_t mc_umc_status; +uint32_t mc_umc_addr;uint32_t mc_umc_status_addr; +uint64_t reg_value;/* UMC 6_1_1 registers */ ecc_err_cnt_sel_addr =
@@ -277,8 +310,33 @@ static void umc_v6_7_query_correctable_error_count(struct amdgpu_device *adev,MCUMC_STATUS is a 64 bit register */ mc_umc_status =RREG64_PCIE ((mc_umc_status_addr + umc_reg_offset) *4 );if (REG_GET_FIELD (mc_umc_status,MCA_UMC_UMC0_MCUMC_STATUST0 , Val) ==1 && -REG_GET_FIELD (mc_umc_status,MCA_UMC_UMC0_MCUMC_STATUST0 ,CECC ) ==1 ) +REG_GET_FIELD (mc_umc_status,MCA_UMC_UMC0_MCUMC_STATUST0 ,CECC ) ==1 ) { *error_count +=1 ; + +if (mc_umc_status) +dev_info (adev->dev,"MCA STATUS 0x%llx, umc_reg_offset 0x%x\n" , mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = +SOC15_REG_OFFSET (UMC ,0 , regMCA_UMC_UMC0_MCUMC_IPIDT0); + reg_value =RREG64_PCIE ((mc_umc_addr + umc_reg_offset) *4 ); +if (reg_value) +dev_info (adev->dev,"MCA IPID 0x%llx, umc_reg_offset 0x%x\n" , reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = +SOC15_REG_OFFSET (UMC ,0 , regMCA_UMC_UMC0_MCUMC_SYNDT0); + reg_value =RREG64_PCIE ((mc_umc_addr + umc_reg_offset) *4 ); +if (reg_value) +dev_info (adev->dev,"MCA SYND 0x%llx, umc_reg_offset 0x%x\n" , reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = +SOC15_REG_OFFSET (UMC ,0 , regMCA_UMC_UMC0_MCUMC_MISC0T0); + reg_value =RREG64_PCIE ((mc_umc_addr + umc_reg_offset) *4 ); +if (reg_value) +dev_info (adev->dev,"MCA MISC0 0x%llx, umc_reg_offset 0x%x\n" , reg_value, umc_reg_offset); + } } static void umc_v6_7_querry_uncorrectable_error_count(struct amdgpu_device *adev,
Signature · 1 line
2.17.1
[AMD Official Use Only]
Quoted 9 lines
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Friday, April 8, 2022 10:18 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: print more correctable error info
[Tao] it's better to add description for the patch.
Quoted 74 lines
Change-Id I09a2aae85cde3ab2cb6b042b973da6839ad024ecSigned-off-by Stanley.Yang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 62 ++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +6
-0@@ -70,15 +70,46 @@ static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_device { uint64_t mc_umc_status; uint32_t eccinfo_table_idx; + uint32_t umc_reg_offset; + uint32_t mc_umc_addr; + uint64_t reg_value; struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); + umc_reg_offset = get_umc_v6_7_reg_offset(adev, + umc_inst, ch_inst); + eccinfo_table_idx = umc_inst * adev->umc.channel_inst_num + ch_inst; /* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras- >umc_ecc.ecc[eccinfo_table_idx].mca_umc_status; if (REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1- REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) ==
+1) {drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +3
-0*error_count +=1 ; + +if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_IPIDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx, umc_reg_offset0x%x\n",
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_SYNDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_MISC0T0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx,
umc_reg_offset0x%x\n",reg_value,umc_reg_offset);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ }
[Tao] can we implement a query_error_status function and:
1. call query_error_status in xxx_error_count function, like this patch, or
2. register it to adev->umc.ras and call it in amdgpu_ras_get_ecc_info.
Quoted 71 lines
}
static void umc_v6_7_ecc_info_querry_uncorrectable_error_count(struct
amdgpu_device*adev, @@ -242,7 +273,9 @@ static void umc_v6_7_query_correctable_error_count(structamdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0uint32_t ecc_err_cnt_sel, ecc_err_cnt_sel_addr;uint32_t ecc_err_cnt, ecc_err_cnt_addr;uint64_t mc_umc_status; +uint32_t mc_umc_addr;uint32_t mc_umc_status_addr; +uint64_t reg_value;/* UMC 6_1_1 registers */ ecc_err_cnt_sel_addr =@@ -277,8 +310,33 @@ static voidumc_v6_7_query_correctable_error_count(struct amdgpu_device *adev, MCUMC_STATUS is a 64 bit register */ mc_umc_status =RREG64_PCIE ((mc_umc_status_addr + umc_reg_offset) *4 ); if (REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1- REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) ==
+1) {drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +3
-0*error_count +=1 ; + +if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_IPIDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx, umc_reg_offset0x%x\n",
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_SYNDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_MISC0T0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx,
umc_reg_offset0x%x\n",reg_value,umc_reg_offset);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ } } static void umc_v6_7_querry_uncorrectable_error_count(struct amdgpu_device*adev,
--
2.17.1
We shall consider centralize UMC MCA status check in a helper function, at least, querying IPID, SYND, and MCA_STATUS should be the same for both ue and ce.
Regards,
Hawking
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, April 8, 2022 10:59
To: Yang, Stanley <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Li, Candice <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: RE: [PATCH Review 1/1] drm/amdgpu: print more correctable error info
[AMD Official Use Only]
Quoted 10 lines
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Friday, April 8, 2022 10:18 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: print more correctable error info
[Tao] it's better to add description for the patch.
Quoted 74 lines
Change-Id I09a2aae85cde3ab2cb6b042b973da6839ad024ecSigned-off-by Stanley.Yang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 62 ++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +6
-0@@ -70,15 +70,46 @@ static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_device { uint64_t mc_umc_status; uint32_t eccinfo_table_idx; + uint32_t umc_reg_offset; + uint32_t mc_umc_addr; + uint64_t reg_value; struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); + umc_reg_offset = get_umc_v6_7_reg_offset(adev, + umc_inst, ch_inst); + eccinfo_table_idx = umc_inst * adev->umc.channel_inst_num + ch_inst; /* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras- >umc_ecc.ecc[eccinfo_table_idx].mca_umc_status; if (REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1- REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) ==
+1) {drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +3
-0*error_count +=1 ; + +if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_IPIDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx, umc_reg_offset0x%x\n",
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_SYNDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_MISC0T0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx,
umc_reg_offset0x%x\n",reg_value,umc_reg_offset);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ }
[Tao] can we implement a query_error_status function and:
1. call query_error_status in xxx_error_count function, like this patch, or 2. register it to adev->umc.ras and call it in amdgpu_ras_get_ecc_info.
Quoted 71 lines
}
static void umc_v6_7_ecc_info_querry_uncorrectable_error_count(struct
amdgpu_device*adev, @@ -242,7 +273,9 @@ static void umc_v6_7_query_correctable_error_count(structamdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0uint32_t ecc_err_cnt_sel, ecc_err_cnt_sel_addr;uint32_t ecc_err_cnt, ecc_err_cnt_addr;uint64_t mc_umc_status; +uint32_t mc_umc_addr;uint32_t mc_umc_status_addr; +uint64_t reg_value;/* UMC 6_1_1 registers */ ecc_err_cnt_sel_addr =@@ -277,8 +310,33 @@ static voidumc_v6_7_query_correctable_error_count(struct amdgpu_device *adev, MCUMC_STATUS is a 64 bit register */ mc_umc_status =RREG64_PCIE ((mc_umc_status_addr + umc_reg_offset) *4 ); if (REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1- REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) ==
+1) {drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +3
-0*error_count +=1 ; + +if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_IPIDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx, umc_reg_offset0x%x\n",
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_SYNDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_MISC0T0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset) *4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx,
umc_reg_offset0x%x\n",reg_value,umc_reg_offset);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ } } static void umc_v6_7_querry_uncorrectable_error_count(struct
amdgpu_device*adev,
--
2.17.1
Thanks for your suggestion, it’s better to centralize umc mca status check in a helper function, will update.
Regards,
Stanley
Quoted 207 lines
-----邮件原件-----
发件人: Zhang, Hawking <[email protected]>
发送时间: Friday, April 8, 2022 11:11 AM
收件人: Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; [email protected]; Li, Candice <[email protected]>
抄送: Yang, Stanley <[email protected]>
主题: RE: [PATCH Review 1/1] drm/amdgpu: print more correctable error infoWe shall consider centralize UMC MCA status check in a helper function, at least, querying IPID, SYND, and
MCA_STATUSshould be the same for both ue and ce.Regards,
Hawking-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, April 8, 2022 10:59
To: Yang, Stanley <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Li, Candice <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: RE: [PATCH Review 1/1] drm/amdgpu: print more correctable error info[AMD Official Use Only]
Quoted 5 lines
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Friday, April 8, 2022 10:18 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li,Candice
Quoted 5 lines
<[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: print more correctable error info[Tao] it's better to add description for the patch.
Quoted 13 lines
Change-Id I09a2aae85cde3ab2cb6b042b973da6839ad024ecSigned-off-by Stanley.Yang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 62 ++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-0@@ -70,15 +70,46 @@ static voidQuoted 1 line
umc_v6_7_ecc_info_query_correctable_error_count(struct
amdgpu_device{
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_device
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +6
-0uint64_t mc_umc_status;uint32_t eccinfo_table_idx; +uint32_t umc_reg_offset; +uint32_t mc_umc_addr; +uint64_t reg_value;struct amdgpu_ras *ras =amdgpu_ras_get_context (adev); + umc_reg_offset =get_umc_v6_7_reg_offset (adev, + umc_inst, ch_inst); + eccinfo_table_idx = umc_inst * adev->umc.channel_inst_num +
ch_inst;Quoted 22 lines
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-0/* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras-Quoted 1 line
umc_ecc.ecc[eccinfo_table_idx].mca_umc_status;
if (REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1- REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) ==
+1) {drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +3
-0*error_count +=1 ; + +if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_IPIDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset)*
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 3 lines
4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx,
umc_reg_offsetdrivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 8 lines
0x%x\n",
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_SYNDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset)*
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 11 lines
4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_MISC0T0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset)*
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 5 lines
4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx,
umc_reg_offset0x%x\n",reg_value,umc_reg_offset);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ }[Tao] can we implement a
query_error_statusfunction and:1. call
query_error_statusinxxx_error_countfunction, like this patch, or 2. register it toadev->umc.rasand call it inamdgpu_ras_get_ecc_info.Quoted 37 lines
}
static void umc_v6_7_ecc_info_querry_uncorrectable_error_count(struct
amdgpu_device*adev, @@ -242,7 +273,9 @@ static void umc_v6_7_query_correctable_error_count(structamdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0uint32_t ecc_err_cnt_sel, ecc_err_cnt_sel_addr;uint32_t ecc_err_cnt, ecc_err_cnt_addr;uint64_t mc_umc_status; +uint32_t mc_umc_addr;uint32_t mc_umc_status_addr; +uint64_t reg_value;/* UMC 6_1_1 registers */ ecc_err_cnt_sel_addr =@@ -277,8 +310,33 @@ static voidumc_v6_7_query_correctable_error_count(struct amdgpu_device *adev, MCUMC_STATUS is a 64 bit register */ mc_umc_status =RREG64_PCIE ((mc_umc_status_addr + umc_reg_offset) *4 ); if (REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1- REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ REG_GET_FIELD(mc_umc_status,
MCA_UMC_UMC0_MCUMC_STATUST0, CECC) ==
+1) {drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +3
-0*error_count +=1 ; + +if (mc_umc_status) + dev_info(adev->dev, "MCA STATUS 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+mc_umc_status, umc_reg_offset); + +/* print IPID registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_IPIDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset)*
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 3 lines
4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA IPID 0x%llx,
umc_reg_offsetdrivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 8 lines
0x%x\n",
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print SYND registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_SYNDT0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset)*
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
Quoted 11 lines
4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA SYND 0x%llx,
umc_reg_offset0x%x\n",drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5
-0+reg_value, umc_reg_offset); + +/* print MISC0 registers value */ + mc_umc_addr = + SOC15_REG_OFFSET(UMC, 0,
regMCA_UMC_UMC0_MCUMC_MISC0T0);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ reg_value = RREG64_PCIE((mc_umc_addr + umc_reg_offset)*
Quoted 11 lines
4);
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +2
-0+if (reg_value) + dev_info(adev->dev, "MCA MISC0 0x%llx,
umc_reg_offset0x%x\n",reg_value,umc_reg_offset);drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +1
-0+ } } static void umc_v6_7_querry_uncorrectable_error_count(struct
amdgpu_device*adev,
--
2.17.1