File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Documentation/ABI/testing Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,21 @@ Description:
178
178
hardware decoder target list.
179
179
180
180
181
+ What: /sys/bus/cxl/devices/portX/decoders_committed
182
+ Date: October, 2023
183
+ KernelVersion: v6.7
184
+
185
+ Description:
186
+ (RO) A memory device is considered active when any of its
187
+ decoders are in the "committed" state (See CXL 3.0 8.2.4.19.7
188
+ CXL HDM Decoder n Control Register). Hotplug and destructive
189
+ operations like "sanitize" are blocked while device is actively
190
+ decoding a Host Physical Address range. Note that this number
191
+ may be elevated without any regionX objects active or even
192
+ enumerated, as this may be due to decoders established by
193
+ platform firwmare or a previous kernel (kexec).
194
+
195
+
181
196
What: /sys/bus/cxl/devices/decoderX.Y
182
197
Date: June, 2021
183
198
KernelVersion: v5.14
Original file line number Diff line number Diff line change @@ -534,8 +534,33 @@ static void cxl_port_release(struct device *dev)
534
534
kfree (port );
535
535
}
536
536
537
+ static ssize_t decoders_committed_show (struct device * dev ,
538
+ struct device_attribute * attr , char * buf )
539
+ {
540
+ struct cxl_port * port = to_cxl_port (dev );
541
+ int rc ;
542
+
543
+ down_read (& cxl_region_rwsem );
544
+ rc = sysfs_emit (buf , "%d\n" , cxl_num_decoders_committed (port ));
545
+ up_read (& cxl_region_rwsem );
546
+
547
+ return rc ;
548
+ }
549
+
550
+ static DEVICE_ATTR_RO (decoders_committed );
551
+
552
+ static struct attribute * cxl_port_attrs [] = {
553
+ & dev_attr_decoders_committed .attr ,
554
+ NULL ,
555
+ };
556
+
557
+ static struct attribute_group cxl_port_attribute_group = {
558
+ .attrs = cxl_port_attrs ,
559
+ };
560
+
537
561
static const struct attribute_group * cxl_port_attribute_groups [] = {
538
562
& cxl_base_attribute_group ,
563
+ & cxl_port_attribute_group ,
539
564
NULL ,
540
565
};
541
566
You can’t perform that action at this time.
0 commit comments