Skip to contentSkip to conversation

cxl/edac: Fix using wrong repair type to check dram event record

PATCH Applied Li Ming 6 participants 6 messages Jun 20, 2025 – Jun 25, 2025 CXL

lore
Share & tools
lore

Li Ming

author reviewer
#0 lore raw

PATCH 1/1 cxl/edac: Fix using wrong repair type to check dram event record

cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways.
When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking.

Fixes 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing control feature")

---
base-commit: 3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8 cxl/fixes

---
 drivers/cxl/core/edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/edac.c +1 -1
index d725ee954199..623aaa4439c4 100644
@@ -1323,7 +1323,7 @@ cxl_mem_get_rec_dram(struct cxl_memdev *cxlmd,
 		attrbs.bank = ctx->bank;
 	break;
 	case EDAC_REPAIR_RANK_SPARING:
-		attrbs.repair_type = CXL_BANK_SPARING;
+		attrbs.repair_type = CXL_RANK_SPARING;
 		break;
 	default:
 		return NULL;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Li Ming

cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways.
When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking.

Fixes 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing control feature")

[snip]

Reviewed-by on v1 1/1
#2 lore raw
In reply to Li Ming
Quoted 9 lines · On Fri, 20 Jun 2025 13:29:24 +0800 Li Ming <[email protected]> wrote:

cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways.
When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking.

Fixes 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing control feature")
Reviewed-by on v1 1/1
#3 lore raw
In reply to Li Ming
Quoted 19 lines

-----Original Message-----
From: Li Ming <[email protected]>
Sent: 20 June 2025 06:29
To: [email protected]; Jonathan Cameron <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Shiju Jose <[email protected]>
Cc: [email protected]; [email protected]; Li Ming <[email protected]>
Subject: [PATCH 1/1] cxl/edac: Fix using wrong repair type to check dram event record

cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways.
When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking.

Quoted 5 lines
Fixes 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing

control feature")

---
base-commit: 3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8 cxl/fixes

Quoted 19 lines

---
drivers/cxl/core/edac.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/edac.c index renamed from drivers/cxl/core/edac.c +0 -0

d725ee954199..623aaa4439c4 100644

drivers/cxl/core/edac.c +1 -2
@@ -1323,7 +1323,7 @@ cxl_mem_get_rec_dram(struct cxl_memdev *cxlmd,
 		attrbs.bank = ctx->bank;
 	break;
 	case EDAC_REPAIR_RANK_SPARING:
-		attrbs.repair_type = CXL_BANK_SPARING;
+		attrbs.repair_type = CXL_RANK_SPARING;
 		break;
 	default:
 		return NULL;
--

2.34.1

maintainer Applied
#4 lore raw
In reply to Li Ming
Quoted 9 lines · Li Ming

cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways.
When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking.

Fixes 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing control feature")

Applied to cxl/fixes. Thanks Ming!

Quoted 19 lines

---
base-commit: 3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8 cxl/fixes

---
 drivers/cxl/core/edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/edac.c +1 -1
index d725ee954199..623aaa4439c4 100644
@@ -1323,7 +1323,7 @@ cxl_mem_get_rec_dram(struct cxl_memdev *cxlmd,
 		attrbs.bank = ctx->bank;
 	break;
 	case EDAC_REPAIR_RANK_SPARING:
-		attrbs.repair_type = CXL_BANK_SPARING;
+		attrbs.repair_type = CXL_RANK_SPARING;
 		break;
 	default:
 		return NULL;
Reviewed-by on v1 1/1
#5 lore raw
In reply to Li Ming
Quoted 10 lines · Li Ming

cxl_find_rec_dram() is used to find a DRAM event record based on the inputted attributes. Different repair_type of the inputted attributes will check the DRAM event record in different ways.
When EDAC driver is performing a memory rank sparing, it should use CXL_RANK_SPARING rather than CXL_BANK_SPARING as repair_type for DRAM event record checking.

Fixes 588ca944c277 ("cxl/edac: Add CXL memory device memory sparing control feature")

---

Quoted 21 lines

base-commit: 3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8 cxl/fixes

---
 drivers/cxl/core/edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/edac.c +1 -1
index d725ee954199..623aaa4439c4 100644
@@ -1323,7 +1323,7 @@ cxl_mem_get_rec_dram(struct cxl_memdev *cxlmd,
 		attrbs.bank = ctx->bank;
 	break;
 	case EDAC_REPAIR_RANK_SPARING:
-		attrbs.repair_type = CXL_BANK_SPARING;
+		attrbs.repair_type = CXL_RANK_SPARING;
 		break;
 	default:
 		return NULL;
Signature · 1 line
2.34.1
Signature · 1 line
Fan Ni