Skip to contentSkip to conversation

drm/amdgpu: Support poison error injection via ras_ctrl debugfs

PATCH In review Candice Li 2 participants 2 messages Jan 4, 2024

Subsystems (2)
lore
Share & tools
lore

Candice Li

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Support poison error injection via ras_ctrl debugfs

Support poison error injection.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -1
index caf00df669bf7e..5851c7a80a5a8c 100644
@@ -305,11 +305,13 @@ static int amdgpu_ras_debugfs_ctrl_parse_data(struct file *f,
 			return -EINVAL;
 
 		data->head.block = block_id;
-		/* only ue and ce errors are supported */
+		/* only ue, ce and poison errors are supported */
 		if (!memcmp("ue", err, 2))
 			data->head.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
 		else if (!memcmp("ce", err, 2))
 			data->head.type = AMDGPU_RAS_ERROR__SINGLE_CORRECTABLE;
+		else if (!memcmp("poison", err, 6))
+			data->head.type = AMDGPU_RAS_ERROR__POISON;
 		else
 			return -EINVAL;
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Please also update the description of error type in "DOC: AMDGPU RAS debugfs control interface" for ras_debugfs_ctrl_write.

With that fixed, the patch is:

Quoted 39 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Candice Li
Sent: Thursday, January 4, 2024 1:16 PM
To: [email protected]
Cc: Li, Candice <[email protected]>
Subject: [PATCH] drm/amdgpu: Support poison error injection via ras_ctrl debugfs

Support poison error injection.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -1
index caf00df669bf7e..5851c7a80a5a8c 100644
@@ -305,11 +305,13 @@ static int amdgpu_ras_debugfs_ctrl_parse_data(struct
 file *f,
                      return -EINVAL;
 
              data->head.block = block_id;
-             /* only ue and ce errors are supported */
+             /* only ue, ce and poison errors are supported */
              if (!memcmp("ue", err, 2))
                      data->head.type =
 AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
              else if (!memcmp("ce", err, 2))
                      data->head.type =
 AMDGPU_RAS_ERROR__SINGLE_CORRECTABLE;
+             else if (!memcmp("poison", err, 6))
+                     data->head.type = AMDGPU_RAS_ERROR__POISON;
              else
                      return -EINVAL;

--
2.25.1