Skip to content

Commit 85fb6a1

Browse files
shijujose4davejiang
authored andcommitted
cxl/edac: Add CXL memory device ECS control feature
CXL spec 3.2 section 8.2.10.9.11.2 describes the DDR5 ECS (Error Check Scrub) control feature. The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM Specification (JESD79-5) and allows the DRAM to internally read, correct single-bit errors, and write back corrected data bits to the DRAM array while providing transparency to error counts. The ECS control allows the requester to change the log entry type, the ECS threshold count (provided the request falls within the limits specified in DDR5 mode registers), switch between codeword mode and row count mode, and reset the ECS counter. Register with EDAC device driver, which retrieves the ECS attribute descriptors from the EDAC ECS and exposes the ECS control attributes to userspace via sysfs. For example, the ECS control for the memory media FRU0 in CXL mem0 device is located at /sys/bus/edac/devices/cxl_mem0/ecs_fru0/ Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Shiju Jose <shiju.jose@huawei.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Link: https://patch.msgid.link/20250521124749.817-5-shiju.jose@huawei.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
1 parent 0c6e6f1 commit 85fb6a1

File tree

2 files changed

+375
-1
lines changed

2 files changed

+375
-1
lines changed

drivers/cxl/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,23 @@ config CXL_EDAC_SCRUB
147147
(e.g. scrub rates for the patrol scrub feature).
148148
Otherwise say 'n'.
149149

150+
config CXL_EDAC_ECS
151+
bool "Enable CXL Error Check Scrub (Repair)"
152+
depends on CXL_EDAC_MEM_FEATURES
153+
depends on EDAC_ECS
154+
help
155+
The CXL EDAC ECS control is optional and allows host to
156+
control the ECS feature configurations of CXL memory expander
157+
devices.
158+
159+
When enabled 'cxl_mem' EDAC devices are published with memory
160+
ECS control attributes as described by
161+
Documentation/ABI/testing/sysfs-edac-ecs.
162+
163+
Say 'y' if you have an expert need to change default settings
164+
of a memory ECS feature established by the platform/device.
165+
Otherwise say 'n'.
166+
150167
config CXL_PORT
151168
default CXL_BUS
152169
tristate

0 commit comments

Comments
 (0)