On Wed, May 27, 2026 at 05:01:44PM -0700, Dave Jiang wrote: > > > On 5/23/26 2:43 AM, Anisa Su wrote: > > From: Ira Weiny <[email protected]> > > > > Endpoints can now support a single dynamic ram partition following the > > persistent memory partition. > > > > Expand the mode to allow a decoder to point to the first dynamic ram > > partition. > > > > Signed-off-by: Ira Weiny <[email protected]> > > Need Anisa sign off > > Reviewed-by: Dave Jiang <[email protected]> > > Just update kver and dates below. > Updated!
Thanks, Anisa > > > > --- > > Changes: > > [anisa: rebase] > > --- > > Documentation/ABI/testing/sysfs-bus-cxl | 18 +++++++++--------- > > drivers/cxl/core/port.c | 4 ++++ > > 2 files changed, 13 insertions(+), 9 deletions(-) > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-cxl > > b/Documentation/ABI/testing/sysfs-bus-cxl > > index 3d95c325f6e0..c604c7ca6432 100644 > > --- a/Documentation/ABI/testing/sysfs-bus-cxl > > +++ b/Documentation/ABI/testing/sysfs-bus-cxl > > @@ -358,22 +358,22 @@ Description: > > > > > > What: /sys/bus/cxl/devices/decoderX.Y/mode > > -Date: May, 2022 > > -KernelVersion: v6.0 > > +Date: May, 2022, May 2025 > > A later date > > > +KernelVersion: v6.0, v6.16 (dynamic_ram_a) > > 7.3 maybe? > > DJ > > > Contact: [email protected] > > Description: > > (RW) When a CXL decoder is of devtype "cxl_decoder_endpoint" it > > translates from a host physical address range, to a device > > local address range. Device-local address ranges are further > > - split into a 'ram' (volatile memory) range and 'pmem' > > - (persistent memory) range. The 'mode' attribute emits one of > > - 'ram', 'pmem', or 'none'. The 'none' indicates the decoder is > > - not actively decoding, or no DPA allocation policy has been > > - set. > > + split into a 'ram' (volatile memory) range, 'pmem' (persistent > > + memory), and 'dynamic_ram_a' (first Dynamic RAM) range. The > > + 'mode' attribute emits one of 'ram', 'pmem', 'dynamic_ram_a' or > > + 'none'. The 'none' indicates the decoder is not actively > > + decoding, or no DPA allocation policy has been set. > > > > 'mode' can be written, when the decoder is in the 'disabled' > > - state, with either 'ram' or 'pmem' to set the boundaries for the > > - next allocation. > > + state, with either 'ram', 'pmem', or 'dynamic_ram_a' to set the > > + boundaries for the next allocation. > > > > > > What: /sys/bus/cxl/devices/decoderX.Y/dpa_resource > > diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c > > index 0c5957d1d329..a7f71f36531f 100644 > > --- a/drivers/cxl/core/port.c > > +++ b/drivers/cxl/core/port.c > > @@ -128,6 +128,7 @@ static DEVICE_ATTR_RO(name) > > > > CXL_DECODER_FLAG_ATTR(cap_pmem, CXL_DECODER_F_PMEM); > > CXL_DECODER_FLAG_ATTR(cap_ram, CXL_DECODER_F_RAM); > > +CXL_DECODER_FLAG_ATTR(cap_dynamic_ram_a, CXL_DECODER_F_RAM); > > CXL_DECODER_FLAG_ATTR(cap_type2, CXL_DECODER_F_TYPE2); > > CXL_DECODER_FLAG_ATTR(cap_type3, CXL_DECODER_F_TYPE3); > > CXL_DECODER_FLAG_ATTR(locked, CXL_DECODER_F_LOCK); > > @@ -222,6 +223,8 @@ static ssize_t mode_store(struct device *dev, struct > > device_attribute *attr, > > mode = CXL_PARTMODE_PMEM; > > else if (sysfs_streq(buf, "ram")) > > mode = CXL_PARTMODE_RAM; > > + else if (sysfs_streq(buf, "dynamic_ram_a")) > > + mode = CXL_PARTMODE_DYNAMIC_RAM_A; > > else > > return -EINVAL; > > > > @@ -327,6 +330,7 @@ static struct attribute_group > > cxl_decoder_base_attribute_group = { > > static struct attribute *cxl_decoder_root_attrs[] = { > > &dev_attr_cap_pmem.attr, > > &dev_attr_cap_ram.attr, > > + &dev_attr_cap_dynamic_ram_a.attr, > > &dev_attr_cap_type2.attr, > > &dev_attr_cap_type3.attr, > > &dev_attr_target_list.attr, >

