@@ -7,6 +7,7 @@ menuconfig CXL_BUS
77 select PCI_DOE
88 select FIRMWARE_TABLE
99 select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
10+ select FWCTL if CXL_FEATURES
1011 help
1112 CXL is a bus that is electrically compatible with PCI Express, but
1213 layers three protocols on that signalling (CXL.io, CXL.cache, and
@@ -102,6 +103,88 @@ config CXL_MEM
102103
103104 If unsure say 'm'.
104105
106+ config CXL_FEATURES
107+ bool "CXL: Features"
108+ depends on CXL_PCI
109+ help
110+ Enable support for CXL Features. A CXL device that includes a mailbox
111+ supports commands that allows listing, getting, and setting of
112+ optionally defined features such as memory sparing or post package
113+ sparing. Vendors may define custom features for the device.
114+
115+ If unsure say 'n'
116+
117+ config CXL_EDAC_MEM_FEATURES
118+ bool "CXL: EDAC Memory Features"
119+ depends on EXPERT
120+ depends on CXL_MEM
121+ depends on CXL_FEATURES
122+ depends on EDAC >= CXL_BUS
123+ help
124+ The CXL EDAC memory feature is optional and allows host to
125+ control the EDAC memory features configurations of CXL memory
126+ expander devices.
127+
128+ Say 'y' if you have an expert need to change default settings
129+ of a memory RAS feature established by the platform/device.
130+ Otherwise say 'n'.
131+
132+ config CXL_EDAC_SCRUB
133+ bool "Enable CXL Patrol Scrub Control (Patrol Read)"
134+ depends on CXL_EDAC_MEM_FEATURES
135+ depends on EDAC_SCRUB
136+ help
137+ The CXL EDAC scrub control is optional and allows host to
138+ control the scrub feature configurations of CXL memory expander
139+ devices.
140+
141+ When enabled 'cxl_mem' and 'cxl_region' EDAC devices are
142+ published with memory scrub control attributes as described by
143+ Documentation/ABI/testing/sysfs-edac-scrub.
144+
145+ Say 'y' if you have an expert need to change default settings
146+ of a memory scrub feature established by the platform/device
147+ (e.g. scrub rates for the patrol scrub feature).
148+ Otherwise say 'n'.
149+
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+
167+ config CXL_EDAC_MEM_REPAIR
168+ bool "Enable CXL Memory Repair"
169+ depends on CXL_EDAC_MEM_FEATURES
170+ depends on EDAC_MEM_REPAIR
171+ help
172+ The CXL EDAC memory repair control is optional and allows host
173+ to control the memory repair features (e.g. sparing, PPR)
174+ configurations of CXL memory expander devices.
175+
176+ When enabled, the memory repair feature requires an additional
177+ memory of approximately 43KB to store CXL DRAM and CXL general
178+ media event records.
179+
180+ When enabled 'cxl_mem' EDAC devices are published with memory
181+ repair control attributes as described by
182+ Documentation/ABI/testing/sysfs-edac-memory-repair.
183+
184+ Say 'y' if you have an expert need to change default settings
185+ of a memory repair feature established by the platform/device.
186+ Otherwise say 'n'.
187+
105188config CXL_PORT
106189 default CXL_BUS
107190 tristate
@@ -146,4 +229,8 @@ config CXL_REGION_INVALIDATION_TEST
146229 If unsure, or if this kernel is meant for production environments,
147230 say N.
148231
232+ config CXL_MCE
233+ def_bool y
234+ depends on X86_MCE && MEMORY_FAILURE
235+
149236endif
0 commit comments