drm/amdgpu/ras: Parse all deferred errors with UMC aca handle
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 drm/amdgpu/ras: Parse all deferred errors with UMC aca handle
We should only increase the deferred errors in UMC block
--- drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +6 -7
@@ -213,7 +213,7 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,struct aca_bank_reg *bank = (struct aca_bank_reg *)data;struct aca_bank_ecc *ecc = (struct aca_bank_ecc *)buf;struct aca_ecc_info bank_info; -uint32_t ext_error_code; +uint32_t ext_error_code, misc0_errcnt;uint64_t status0; status0 = bank->regs[ACA_REG_IDX__STATUS ];
@@ -228,15 +228,14 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core, ecc->bank_info.addr = bank->regs[ACA_REG_IDX__ADDR ]; ext_error_code =ACA_REG_STATUS_ERRORCODEEXT (status0); + misc0_errcnt =ACA_REG_MISC0_ERRCNT (bank->regs[ACA_REG_IDX__MISC0 ]);if (aca_check_umc_de (ras_core, status0)) - ecc->de_count =1 ; + ecc->de_count = misc0_errcnt ? misc0_errcnt :1 ;else if (aca_check_umc_ue (ras_core, status0)) - ecc->ue_count = ext_error_code ? -1 :ACA_REG_MISC0_ERRCNT (bank->regs[ACA_REG_IDX__MISC0 ]); + ecc->ue_count = ext_error_code ?1 : misc0_errcnt;else if (aca_check_umc_ce (ras_core, status0)) - ecc->ce_count = ext_error_code ? -1 :ACA_REG_MISC0_ERRCNT (bank->regs[ACA_REG_IDX__MISC0 ]); + ecc->ce_count = ext_error_code ?1 : misc0_errcnt;return 0 ; }
@@ -266,7 +265,7 @@ static int aca_parse_bank_default(struct ras_core_context *ras_core, ecc->bank_info.addr = bank->regs[ACA_REG_IDX__ADDR ];if (aca_check_bank_is_de (ras_core, status)) { - ecc->de_count =1 ; + ecc->de_count =0 ; }else {if (bank->ecc_type ==RAS_ERR_TYPE__UE ) ecc->ue_count =1 ;
Signature · 1 line
2.34.1
AMD General
Quoted 67 lines
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Wednesday, June 3, 2026 10:51 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH v1 1/2] drm/amdgpu/ras: Parse all deferred errors with UMC aca handleWe should only increase the deferred errors in UMC block
Signed-off-by Ce Sun <[email protected]>--- drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +1
-1@@ -213,7 +213,7 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core, struct aca_bank_reg *bank = (struct aca_bank_reg *)data;struct aca_bank_ecc *ecc = (struct aca_bank_ecc *)buf;struct aca_ecc_info bank_info; -uint32_t ext_error_code; +uint32_t ext_error_code, misc0_errcnt;uint64_t status0;status0 = bank->regs[ACA_REG_IDX__STATUS]; @@ -228,15 +228,14 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core, ecc->bank_info.addr = bank->regs[ACA_REG_IDX__ADDR]; ext_error_code = ACA_REG_STATUS_ERRORCODEEXT(status0);+
misc0_errcnt= ACA_REG_MISC0_ERRCNT(bank-Quoted 1 line
regs[ACA_REG_IDX__MISC0]);
if (
aca_check_umc_de(ras_core, status0))drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +1
-3- ecc->de_count =1 ; + ecc->de_count = misc0_errcnt ? misc0_errcnt :1 ; else if (aca_check_umc_ue(ras_core, status0)) - ecc->ue_count = ext_error_code ? - 1 : ACA_REG_MISC0_ERRCNT(bank-Quoted 1 line
regs[ACA_REG_IDX__MISC0]);
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +1
-2+ ecc->ue_count = ext_error_code ?1 : misc0_errcnt; else if (aca_check_umc_ce(ras_core, status0)) - ecc->ce_count = ext_error_code ? - 1 : ACA_REG_MISC0_ERRCNT(bank-Quoted 1 line
regs[ACA_REG_IDX__MISC0]);
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +2
-1+ ecc->ce_count = ext_error_code ?1 : misc0_errcnt;return 0 ; }@@ -266,7 +265,7 @@ static int aca_parse_bank_default(struct ras_core_context *ras_core, ecc->bank_info.addr = bank->regs[ACA_REG_IDX__ADDR ];if (aca_check_bank_is_de (ras_core, status)) { - ecc->de_count =1 ; + ecc->de_count =0 ; }else {if (bank->ecc_type ==RAS_ERR_TYPE__UE )ecc->ue_count = 1;--
2.34.1
PATCH 2/2 drm/amdgpu/ras: adjust the update of RAS bad page number
In reply to a message not in the archiveOne eeprom record may not map to unit number of bad pages, Correct the relevant update logic accordingly
--- drivers/gpu/drm/amd/ras/rascore/ras_umc.c | 3 ++- drivers/gpu/drm/amd/ras/rascore/ras_umc.h | 2 ++ drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_umc.c +2 -1
@@ -548,7 +548,8 @@ static int ras_umc_save_bad_pages(struct ras_core_context *ras_core) goto exit; } -RAS_DEV_INFO (ras_core->dev,"Saved %d pages to EEPROM table.\n" , save_count); +RAS_DEV_INFO (ras_core->dev,"Saved %d pages to EEPROM table.\n" , + save_count * ras_core->ras_umc.retire_unit); } exit:
drivers/gpu/drm/amd/ras/rascore/ras_umc.h +2 -0
@@ -143,6 +143,8 @@ struct ras_umc {u32 pending_ecc_count;/* number of entries dropped because pending_ecc_list was full */ u32 pending_ecc_dropped; +/* how many pages are retired */ +u32 retire_unit; };/*
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +2 -1
@@ -110,6 +110,7 @@ static void __get_nps_pa_flip_bits(struct ras_core_context *ras_core, "Unknown HBM type, set RAS retire flip bits to the value in NPS1 mode.\n");break ; } + ras_core->ras_umc.retire_unit =0x1 << flip_bits->bit_num; } static uint64_t convert_nps_pa_to_row_pa(struct ras_core_context *ras_core,
@@ -166,7 +167,7 @@ static int lookup_bad_pages_in_a_row(struct ras_core_context *ras_core, idx =0 ; row =0 ; - retire_unit =0x1 << flip_bits.bit_num; + retire_unit = ras_core->ras_umc.retire_unit;/* loop for all possibilities of retire bits */ for (column =0 ; column < retire_unit; column++) { soc_pa = row_pa;
Signature · 1 line
2.34.1
RE: [PATCH v1 2/2] drm/amdgpu/ras: adjust the update of RAS bad page number
AMD General
As discussed offline, the saved page number can be smaller than save_count * ras_core->ras_umc.retire_unit since page address could be invalid and needs to be excluded.
Tao
Quoted 79 lines
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Wednesday, June 3, 2026 10:52 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH v1 2/2] drm/amdgpu/ras: adjust the update of RAS bad page numberOne eeprom record may not map to unit number of bad pages, Correct the relevant update logic accordingly
Signed-off-by Ce Sun <[email protected]>--- drivers/gpu/drm/amd/ras/rascore/ras_umc.c | 3 ++- drivers/gpu/drm/amd/ras/rascore/ras_umc.h | 2 ++ drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/ras/rascore/ras_umc.c +2
-1@@ -548,7 +548,8 @@ static int ras_umc_save_bad_pages(struct ras_core_context *ras_core) goto exit; } - RAS_DEV_INFO(ras_core->dev, "Saved %d pages to EEPROM table.\n", save_count); + RAS_DEV_INFO(ras_core->dev, "Saved %d pages to EEPROM table.\n", + save_count * ras_core->ras_umc.retire_unit);}exit:
drivers/gpu/drm/amd/ras/rascore/ras_umc.h +2
-0@@ -143,6 +143,8 @@ struct ras_umc {u32 pending_ecc_count;/* number of entries dropped because pending_ecc_list was full */ u32 pending_ecc_dropped; +/* how many pages are retired */ +u32 retire_unit; };/* drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +1
-0@@ -110,6 +110,7 @@ static void __get_nps_pa_flip_bits(struct ras_core_context *ras_core, "Unknown HBM type, set RAS retire flip bits to the value in NPS1 mode.\n"); break; } + ras_core->ras_umc.retire_unit =0x1 << flip_bits->bit_num; }static
uint64_tconvert_nps_pa_to_row_pa(structras_core_context*ras_core, @@
-166,7 +167,7 @@ static int lookup_bad_pages_in_a_row(structras_core_context*ras_core,idx = 0; row = 0;drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +1
-2- retire_unit =0x1 << flip_bits.bit_num; + retire_unit = ras_core->ras_umc.retire_unit;/* loop for all possibilities of retire bits */ for (column =0 ; column < retire_unit; column++) { soc_pa = row_pa; --2.34.1