Re: [PATCH v9 07/19] cxl/region: Add sparse DAX region support

2025-05-08 Thread Fan Ni
t; Signed-off-by: Ira Weiny LGTM, although I am not very familiar with dax. Reviewed-by: Fan Ni > > --- > Changes: > [iweiny: adjust to new partition mode and new singular dynamic ram > partition] > --- > Documentation/ABI/testing/sysfs-bus-cxl | 22 +

Re: [PATCH v9 07/19] cxl/region: Add sparse DAX region support

2025-05-08 Thread Fan Ni
_region *dax_region; > struct dev_dax_data data; > + resource_size_t dev_size; > + unsigned long flags; > > if (nid == NUMA_NO_NODE) > nid = memory_add_physaddr_to_nid(cxlr_dax->hpa_range.start); > > + flags = IORESOURCE_DAX_KMEM; > + if (cxlr->mode == CXL_PARTMODE_DYNAMIC_RAM_A) > + flags |= IORESOURCE_DAX_SPARSE_CAP; > + > dax_region = alloc_dax_region(dev, cxlr->id, &cxlr_dax->hpa_range, nid, > - PMD_SIZE, IORESOURCE_DAX_KMEM); > + PMD_SIZE, flags); > if (!dax_region) > return -ENOMEM; > > + if (cxlr->mode == CXL_PARTMODE_DYNAMIC_RAM_A) > + /* Add empty seed dax device */ > + dev_size = 0; > + else > + dev_size = range_len(&cxlr_dax->hpa_range); > + > data = (struct dev_dax_data) { > .dax_region = dax_region, > .id = -1, > - .size = range_len(&cxlr_dax->hpa_range), > + .size = dev_size, > .memmap_on_memory = true, > }; > > > -- > 2.49.0 > -- Fan Ni (From gmail)

Re: [PATCH v9 06/19] cxl/port: Add 'dynamic_ram_a' to endpoint decoder mode

2025-05-07 Thread Fan Ni
einy > Reviewed-by: Fan Ni > --- > Changes: > [iweiny: completely re-written] > --- > Documentation/ABI/testing/sysfs-bus-cxl | 18 +- > drivers/cxl/core/port.c | 4 > 2 files changed, 13 insertions(+), 9 deletions(-) > > d

Re: [PATCH v9 02/19] cxl/mem: Read dynamic capacity configuration from the device

2025-05-07 Thread Fan Ni
son(struct cxl_memdev *cxlmd, u64 offset, u64 len, > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c > index 7b14a154463c..bc40cf6e2fe9 100644 > --- a/drivers/cxl/pci.c > +++ b/drivers/cxl/pci.c > @@ -998,6 +998,9 @@ static int cxl_pci_probe(struct pci_dev *pdev, const > struct pci_device_id *id) > if (rc) > return rc; > > + if (cxl_dcd_supported(mds)) > + cxl_configure_dcd(mds, &range_info); > + > rc = cxl_dpa_setup(cxlds, &range_info); > if (rc) > return rc; > > -- > 2.49.0 > -- Fan Ni

Re: [PATCH v9 01/19] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)

2025-05-06 Thread Fan Ni
On Tue, May 06, 2025 at 11:09:09AM -0500, Ira Weiny wrote: > Fan Ni wrote: > > On Mon, Apr 14, 2025 at 03:19:50PM +0100, Jonathan Cameron wrote: > > > On Sun, 13 Apr 2025 17:52:09 -0500 > > > Ira Weiny wrote: > > [snip] > > > > > > &g

Re: [PATCH v9 01/19] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)

2025-05-05 Thread Fan Ni
mentation. Fan > > > > +{ > > + DECLARE_BITMAP(all_cmds, CXL_DCD_ENABLED_MAX); > > + DECLARE_BITMAP(dst, CXL_DCD_ENABLED_MAX); > > + > > + bitmap_fill(all_cmds, CXL_DCD_ENABLED_MAX); > > + return bitmap_and(dst, cmds_seen, all_cmds, CXL_DCD_ENABLED_MAX); > > +} > > + > > -- Fan Ni

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-14 Thread Fan Ni
On Mon, Apr 14, 2025 at 09:37:02PM -0500, Ira Weiny wrote: > Fan Ni wrote: > > On Sun, Apr 13, 2025 at 05:52:08PM -0500, Ira Weiny wrote: > > > A git tree of this series can be found here: > > > > > > https://github.com/weiny2/linux-kernel/tree/dcd-v6-2025-

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-14 Thread Fan Ni
On Sun, Apr 13, 2025 at 05:52:08PM -0500, Ira Weiny wrote: > A git tree of this series can be found here: > > https://github.com/weiny2/linux-kernel/tree/dcd-v6-2025-04-13 > > This is now based on 6.15-rc2. > > Due to the stagnation of solid requirements for users of DCD I do not > plan to