@@ -191,6 +191,17 @@ Description:
the data is 0 reading the CDAT data failed. Otherwise the CDAT
data is reported.
+What: /sys/bus/cxl/devices/endpointX/interleave_mask
+ /sys/bus/cxl/devices/portX/interleave_mask
+Date: Aug, 2020
+KernelVersion: v6.1
+Contact: linux-cxl@vger.kernel.org
+Description:
+ (RO) Interleave address mask from the HDM decoder attached to the
+ port. The address bits are set depending on the CXL HDM Decoder
+ Capability Register (CXL spec rev3.0 8.2.4.19.1) where the "A11to8
+ Interleave Capable" bit and the "AA14to12 Interleave Capable" bits
+ are set.
What: /sys/bus/cxl/devices/decoderX.Y/mode
Date: May, 2022
@@ -123,8 +123,27 @@ static struct attribute_group cxl_cdat_attribute_group = {
.is_bin_visible = cxl_port_bin_attr_is_visible,
};
+static ssize_t interleave_mask_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct cxl_hdm *cxlhdm = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%#x\n", cxlhdm->interleave_mask);
+}
+static DEVICE_ATTR_RO(interleave_mask);
+
+static struct attribute *cxl_port_info_attributes[] = {
+ &dev_attr_interleave_mask.attr,
+ NULL
+};
+
+static struct attribute_group cxl_port_info_attribute_group = {
+ .attrs = cxl_port_info_attributes,
+};
+
static const struct attribute_group *cxl_port_dynamic_attr_groups[] = {
&cxl_cdat_attribute_group,
+ &cxl_port_info_attribute_group,
NULL,
};