Skip to contentSkip to conversation

drm/amd/ras: skip poison banks read through the UE channel

PATCH In review Xiang Liu 2 participants 4 messages Aug 26

Subsystems (2)
lore
Share & tools
lore

Xiang Liu

author
#0 lore raw

PATCH 1/3 drm/amd/ras: skip poison banks read through the UE channel

Outside of UMC a bank with the poison bit set describes the consumption of an error that was already reported, not a new uncorrectable one. Injecting an uncorrectable error while a workload is running therefore buries the real bank under a dump of GFX poison banks collected from every other device of the hive.

---
 drivers/gpu/drm/amd/ras/core/aca.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/ras/core/aca.c +7 -0
index 0f5e57965ac8..f316f49c24bd 100644
@@ -403,6 +403,13 @@ static int aca_banks_update(struct ras_core_context *ras_core,
 
 		memset(&bank_ecc, 0, sizeof(bank_ecc));
 		aca_blk = aca_get_bank_aca_block(ras_core, &bank);
+
+		/* Outside of UMC a poison bank is a consumption, not a new error. */
+		if (ecc_type == RAS_ERR_TYPE__UE &&
+		    ACA_REG_STATUS_POISON(bank.regs[ACA_REG_IDX__STATUS]) &&
+		    (!aca_blk || aca_blk->blk_info->ras_block_id != RAS_BLOCK_ID__UMC))
+			continue;
+
 		if (aca_blk)
 			ret = aca_parse_bank(ras_core, aca_blk, &bank, &bank_ecc);
 
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/3 drm/amd/ras: drop the ras_ prefix from the ACA v5 file names

The prefix marks the files that back a hardware IP block. ACA is a bank format rather than an IP, and the rest of its files are named after it alone, so the v5 pair is the odd one out.

---
 drivers/gpu/drm/amd/ras/core/Makefile                       | 2 +-
 drivers/gpu/drm/amd/ras/core/aca.c                          | 2 +-
 drivers/gpu/drm/amd/ras/core/{ras_aca_v5_0.c => aca_v5_0.c} | 2 +-
 drivers/gpu/drm/amd/ras/core/{ras_aca_v5_0.h => aca_v5_0.h} | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
 rename drivers/gpu/drm/amd/ras/core/{ras_aca_v5_0.c => aca_v5_0.c} (99%)
 rename drivers/gpu/drm/amd/ras/core/{ras_aca_v5_0.h => aca_v5_0.h} (98%)
drivers/gpu/drm/amd/ras/core/Makefile +1 -1
index b2872affbf71..fb16bacaef2f 100644
@@ -25,7 +25,7 @@ RAS_CORE_FILES = core.o \
 			ras_mp1_v15_0.o \
 			aca.o  \
 			aca_v1_0.o \
-			ras_aca_v5_0.o \
+			aca_v5_0.o \
 			ras_eeprom_mgr.o \
 			eeprom.o \
 			ras_umc.o \
drivers/gpu/drm/amd/ras/core/aca.c +1 -1
index f316f49c24bd..b40098406174 100644
@@ -25,7 +25,7 @@
 #include "aca.h"
 #include "ras_mce.h"
 #include "aca_v1_0.h"
-#include "ras_aca_v5_0.h"
+#include "aca_v5_0.h"
 #include "ras_mp1_v13_0.h"
 
 #define ACA_MARK_FATAL_FLAG    0x100
drivers/gpu/drm/amd/ras/core/aca_v5_0.c renamed from drivers/gpu/drm/amd/ras/core/ras_aca_v5_0.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/ras/core/ras_aca_v5_0.c
rename to drivers/gpu/drm/amd/ras/core/aca_v5_0.c
index 2c8dcc5886f3..30fd1cdef94e 100644
@@ -24,7 +24,7 @@
 #include "ras.h"
 #include "aca.h"
 #include "core_status.h"
-#include "ras_aca_v5_0.h"
+#include "aca_v5_0.h"
 
 #define ACA_HWIP_MAP(ip, hwid, acatypes) \
 	{ACA_ECC_HWIP__##ip, hwid, acatypes, ARRAY_SIZE(acatypes)}
drivers/gpu/drm/amd/ras/core/aca_v5_0.h renamed from drivers/gpu/drm/amd/ras/core/ras_aca_v5_0.h +2 -2
similarity index 98%
rename from drivers/gpu/drm/amd/ras/core/ras_aca_v5_0.h
rename to drivers/gpu/drm/amd/ras/core/aca_v5_0.h
index a3eb6d50cc2f..7f2c296de0b2 100644
@@ -22,8 +22,8 @@
  *
  */
 
-#ifndef __RAS_ACA_V5_0_H__
-#define __RAS_ACA_V5_0_H__
+#ifndef __ACA_V5_0_H__
+#define __ACA_V5_0_H__
 #include "ras.h"
 
 #define ACA_V5_REG__FIELD(x, h, l)          (((x) & GENMASK_ULL(h, l)) >> l)
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 3/3 drm/amd/ras: report the banks the scrubber logged

In reply to Xiang Liu

A bank carrying the scrub bit was found by the background scrubber rather than by an access, which is worth telling apart from the rest when reading a log.

---
 drivers/gpu/drm/amd/ras/core/aca.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/ras/core/aca.c +5 -0
index b40098406174..881681ea9f3f 100644
@@ -128,6 +128,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,
 			"{%llu}" RAS_HW_ERR "ACA[%02d/%02d].%s=0x%016llx\n",
 			bank->seq_no, idx + 1, total,
 			aca_regs[i].name, bank->regs[aca_regs[i].reg_idx]);
+
+	if (ACA_REG_STATUS_SCRUB(bank->regs[ACA_REG_IDX__STATUS]))
+		RAS_DEV_INFO(ras_core->dev,
+			"{%llu}" RAS_HW_ERR "hardware error logged by the scrubber\n",
+			bank->seq_no);
 }
 
 static void aca_log_bank_data(struct ras_core_context *ras_core,
Signature · 1 line
2.34.1
Reviewed-by on v1 3/3
#3 lore raw

RE: [PATCH 3/3] drm/amd/ras: report the banks the scrubber logged

AMD General

Series is

Regards,
Hawking
-----Original Message-----
From: Liu, Xiang(Dean) <[email protected]>
Sent: Wednesday, August 26, 2026 11:26 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Liu, Xiang(Dean) <[email protected]>
Subject: [PATCH 3/3] drm/amd/ras: report the banks the scrubber logged

A bank carrying the scrub bit was found by the background scrubber rather than by an access, which is worth telling apart from the rest when reading a log.

---
 drivers/gpu/drm/amd/ras/core/aca.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/ras/core/aca.c +5 -0
index b40098406174..881681ea9f3f 100644
@@ -128,6 +128,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,
                        "{%llu}" RAS_HW_ERR "ACA[%02d/%02d].%s=0x%016llx\n",
                        bank->seq_no, idx + 1, total,
                        aca_regs[i].name, bank->regs[aca_regs[i].reg_idx]);
+
+       if (ACA_REG_STATUS_SCRUB(bank->regs[ACA_REG_IDX__STATUS]))
+               RAS_DEV_INFO(ras_core->dev,
+                       "{%llu}" RAS_HW_ERR "hardware error logged by the scrubber\n",
+                       bank->seq_no);
 }
 
 static void aca_log_bank_data(struct ras_core_context *ras_core,

--
2.34.1