On 20/09/25 12:44PM, Ira Weiny wrote:
Dave Jiang wrote:
[snip]
> @@ -998,9 +998,8 @@ static int init_labels(struct nd_mapping *nd_mapping, int
num_labels)
>label_ent = kzalloc(sizeof(*label_ent), GFP_KERNEL);
>if (!label_ent)
>return -ENOMEM;
> -
On 19/09/25 05:00PM, Ira Weiny wrote:
Neeraj Kumar wrote:
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
Again I'm curious as to why?
Is it to be able to us
On 19/09/25 04:55PM, Ira Weiny wrote:
Neeraj Kumar wrote:
Updated mutex_lock() with guard(mutex)()
You are missing the 'why' justification here.
The detail is that __pmem_label_update() is getting more complex and this
change helps to reduce the complexity later.
However
On 19/09/25 04:34PM, Dave Jiang wrote:
On 9/17/25 6:40 AM, Neeraj Kumar wrote:
nd_label_base() was being used after typecasting with 'unsigned long'. Thus
modified nd_label_base() to return 'unsigned long' instead of 'struct
nd_namespace_label *'
Signed-off-
On 19/09/25 04:10PM, Dave Jiang wrote:
On 9/17/25 6:40 AM, Neeraj Kumar wrote:
Prior to LSA 2.1 version, LSA contain only namespace labels. LSA 2.1
introduced in CXL 2.0 Spec, which contain region label along with
namespace label.
NDD_LABELING flag is used for namespace. Introduced
On 17/09/25 04:36PM, Jonathan Cameron wrote:
On Wed, 17 Sep 2025 19:11:02 +0530
Neeraj Kumar wrote:
Modified __pmem_label_update() to update region labels into LSA
I'm struggling to follow the use of the union for the two label types
in much of this code. To me if feels like that s
On 17/09/25 03:46PM, Jonathan Cameron wrote:
On Wed, 17 Sep 2025 18:59:24 +0530
Neeraj Kumar wrote:
Updated mutex_lock() with guard(mutex)()
Say why.
Sure, I will update it in next patch-set.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 36
On 17/09/25 03:50PM, Jonathan Cameron wrote:
On Wed, 17 Sep 2025 19:10:56 +0530
Neeraj Kumar wrote:
Hi,
Not sure what difference between the two versions I'm seeing is.
Patch 02 is missing in both of them.
Jonathan
Hi Jonathan,
Because of some compliance check, Patch 02 got delayed
Add support of CXL LSA 2.1 using NDD_REGION_LABELING flag. It creates
cxl region based on region information parsed from LSA.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/pmem_region.c | 53 ++
drivers/cxl/cxl.h | 4 +++
drivers/cxl/pmem.c
Using these attributes region label is added/deleted into LSA. These
attributes are called from userspace (ndctl) after region creation.
Signed-off-by: Neeraj Kumar
---
Documentation/ABI/testing/sysfs-bus-cxl | 22 ++
drivers/cxl/core/pmem_region.c | 91
Saved root decoder info is required for cxl region persistency
Signed-off-by: Neeraj Kumar
---
drivers/cxl/cxlmem.h | 1 +
drivers/cxl/mem.c| 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 434031a0c1f7..25cb115b72bd 100644
--- a
]
[PATCH 12/20]
- Fix comment syntax [Jonathan]
[PATCH 13/20]
- Elaborate commit message and remove history statement from comment [Jonathan]
- Move cxl_region_discovery() from core/port.c to core/region.c [Dave]
[PATCH 14/20]
- Spell check fix in commit message [Jonathan]
- Use ACQUIRE() instead of do
CXL LSA v2.1 utilizes the region labels stored in the LSA for interleave
set configuration instead of interleave-set cookie used in previous LSA
versions. As interleave-set cookie is not required for CXL LSA v2.1 format
so skip its usage for CXL LSA 2.1 format
Signed-off-by: Neeraj Kumar
Save region information stored in cxlr to nd_set during
cxl_pmem_region_probe in nd_set. This saved region information is being
stored into LSA, which will be used for cxl region persistence
Signed-off-by: Neeraj Kumar
---
drivers/cxl/pmem.c | 13 +++--
1 file changed, 7 insertions
Add cxl_find_root_decoder_by_port() to find root decoder on cxl bus.
It is used to find root decoder using cxl port.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/port.c | 27 +++
drivers/cxl/cxl.h | 1 +
2 files changed, 28 insertions(+)
diff --git a/drivers
operation on namespace label or region label.
NDD_REGION_LABELING will be utilized by cxl driver to enable LSA 2.1
region label support
Accordingly updated label index version
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm.c | 1 +
drivers/nvdimm/dimm_devs.c | 7 +++
drivers/nvdimm
On 05/09/25 03:08PM, Ira Weiny wrote:
Neeraj Kumar wrote:
On 19/08/25 01:56PM, Ira Weiny wrote:
>Neeraj Kumar wrote:
>> nd_mapping->labels maintains the list of labels present into LSA.
>> init_labels() prepares this list while adding new label into LSA
>> and up
Added LSA v2.1 format region label deletion routine. This function is
used to delete region label from LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 79 ++---
drivers/nvdimm/label.h | 1 +
drivers/nvdimm/namespace_devs.c | 12
Slot validation routine validates label slot by calculating label
checksum. It was only validating namespace label. This changeset also
validates region label if present.
Signed-off-by: Neeraj Kumar
Reviewed-by: Jonathan Cameron
---
drivers/nvdimm/label.c | 72
If Namespace label is present in LSA during nvdimm_probe() then DPA
reservation is required. But this reservation is not required by region
label. Therefore if LSA scanning finds any region label, skip it.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 10 --
1 file changed, 8
this dependency of pmem region on libnvdimm, segregated pmem
region related code from core/region.c
Signed-off-by: Neeraj Kumar
---
drivers/cxl/Kconfig| 14 +++
drivers/cxl/core/Makefile | 1 +
drivers/cxl/core/core.h| 8 +-
drivers/cxl/core/pmem_region.c | 203
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 3 +++
drivers/nvdimm/nd.h| 23
nd_label_base() was being used after typecasting with 'unsigned long'. Thus
modified nd_label_base() to return 'unsigned long' instead of 'struct
nd_namespace_label *'
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 10 +-
1 file changed, 5 inser
CXL region information preserved from the LSA needs to be exported for
use by the CXL driver for CXL region re-creation.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm_devs.c | 18 ++
include/linux/libnvdimm.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a
Using these attributes region label is added/deleted into LSA. These
attributes are called from userspace (ndctl) after region creation.
Signed-off-by: Neeraj Kumar
---
Documentation/ABI/testing/sysfs-bus-cxl | 22 ++
drivers/cxl/core/pmem_region.c | 91
Add support of CXL LSA 2.1 using NDD_REGION_LABELING flag. It creates
cxl region based on region information parsed from LSA.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/pmem_region.c | 53 ++
drivers/cxl/cxl.h | 4 +++
drivers/cxl/pmem.c
Added LSA v2.1 format region label deletion routine. This function is
used to delete region label from LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 79 ++---
drivers/nvdimm/label.h | 1 +
drivers/nvdimm/namespace_devs.c | 12
create cxl region after
fetching region information from LSA.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/region.c | 127 --
drivers/cxl/cxl.h | 12
2 files changed, 134 insertions(+), 5 deletions(-)
diff --git a/drivers/cxl/core/reg
on of endpoint probe.
2. Moved cxl pmem region auto-assembly from cxl_endpoint_port_probe() to
cxl_mem_probe() after devm_cxl_add_nvdimm(). It gurantees both the
completion of endpoint probe and cxl_nvd presence before its call.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/region.c
Preserve region information from region label during nvdimm_probe. This
preserved region information is used for creating cxl region to achieve
region persistency across reboot.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm.c | 4
drivers/nvdimm/label.c| 41
this dependency of pmem region on libnvdimm, segregated pmem
region related code from core/region.c
Signed-off-by: Neeraj Kumar
---
drivers/cxl/Kconfig| 14 +++
drivers/cxl/core/Makefile | 1 +
drivers/cxl/core/core.h| 8 +-
drivers/cxl/core/pmem_region.c | 203
If Namespace label is present in LSA during nvdimm_probe() then DPA
reservation is required. But this reservation is not required by region
label. Therefore if LSA scanning finds any region label, skip it.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 10 --
1 file changed, 8
Save region information stored in cxlr to nd_set during
cxl_pmem_region_probe in nd_set. This saved region information is being
stored into LSA, which will be used for cxl region persistence
Signed-off-by: Neeraj Kumar
---
drivers/cxl/pmem.c | 13 +++--
1 file changed, 7 insertions
During namespace creation, skip any region labels found. And Preserve
region label into labels list if present.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/namespace_devs.c | 52 +
1 file changed, 47 insertions(+), 5 deletions(-)
diff --git a/drivers/nvdimm
Saved root decoder info is required for cxl region persistency
Signed-off-by: Neeraj Kumar
---
drivers/cxl/cxlmem.h | 1 +
drivers/cxl/mem.c| 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 434031a0c1f7..25cb115b72bd 100644
--- a
Add cxl_find_root_decoder_by_port() to find root decoder on cxl bus.
It is used to find root decoder using cxl port.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/port.c | 27 +++
drivers/cxl/cxl.h | 1 +
2 files changed, 28 insertions(+)
diff --git a/drivers
Modified __pmem_label_update() to update region labels into LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 269 ++--
drivers/nvdimm/label.h | 15 ++
drivers/nvdimm/namespace_devs.c | 12 ++
drivers/nvdimm/nd.h | 38
Updated mutex_lock() with guard(mutex)()
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 36 +---
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 668e1e146229..3235562d0e1c 100644
]
[PATCH 12/20]
- Fix comment syntax [Jonathan]
[PATCH 13/20]
- Elaborate commit message and remove history statement from comment [Jonathan]
- Move cxl_region_discovery() from core/port.c to core/region.c [Dave]
[PATCH 14/20]
- Spell check fix in commit message [Jonathan]
- Use ACQUIRE() instead of do
Slot validation routine validates label slot by calculating label
checksum. It was only validating namespace label. This changeset also
validates region label if present.
Signed-off-by: Neeraj Kumar
Reviewed-by: Jonathan Cameron
---
drivers/nvdimm/label.c | 72
operation on namespace label or region label.
NDD_REGION_LABELING will be utilized by cxl driver to enable LSA 2.1
region label support
Accordingly updated label index version
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm.c | 1 +
drivers/nvdimm/dimm_devs.c | 7 +++
drivers/nvdimm
create cxl region after
fetching region information from LSA.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/region.c | 127 --
drivers/cxl/cxl.h | 12
2 files changed, 134 insertions(+), 5 deletions(-)
diff --git a/drivers/cxl/core/reg
Preserve region information from region label during nvdimm_probe. This
preserved region information is used for creating cxl region to achieve
region persistency across reboot.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm.c | 4
drivers/nvdimm/label.c| 41
During namespace creation, skip any region labels found. And Preserve
region label into labels list if present.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/namespace_devs.c | 52 +
1 file changed, 47 insertions(+), 5 deletions(-)
diff --git a/drivers/nvdimm
CXL region information preserved from the LSA needs to be exported for
use by the CXL driver for CXL region re-creation.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm_devs.c | 18 ++
include/linux/libnvdimm.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a
nd_label_base() was being used after typecasting with 'unsigned long'. Thus
modified nd_label_base() to return 'unsigned long' instead of 'struct
nd_namespace_label *'
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 10 +-
1 file changed, 5 inser
Updated mutex_lock() with guard(mutex)()
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 36 +---
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 668e1e146229..3235562d0e1c 100644
on of endpoint probe.
2. Moved cxl pmem region auto-assembly from cxl_endpoint_port_probe() to
cxl_mem_probe() after devm_cxl_add_nvdimm(). It gurantees both the
completion of endpoint probe and cxl_nvd presence before its call.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/region.c
Modified __pmem_label_update() to update region labels into LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 269 ++--
drivers/nvdimm/label.h | 15 ++
drivers/nvdimm/namespace_devs.c | 12 ++
drivers/nvdimm/nd.h | 38
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 3 +++
drivers/nvdimm/nd.h| 23
On 13/08/25 03:58PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:56 +0530
Neeraj Kumar wrote:
nd_mapping->labels maintains the list of labels present into LSA.
init_labels() prepares this list while adding new label into LSA
and updates nd_mapping->labels accordingly. During cxl
On 13/08/25 04:11PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:59 +0530
Neeraj Kumar wrote:
Preserve region information from region label during nvdimm_probe. This
preserved region information is used for creating cxl region to achieve
region persistency across reboot.
Signed-off-by
On 15/08/25 03:22PM, Dave Jiang wrote:
On 7/30/25 5:11 AM, Neeraj Kumar wrote:
Added cxl v2.1 format region label deletion routine. This function is
used to delete region label from LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 77
On 19/08/25 01:56PM, Ira Weiny wrote:
Neeraj Kumar wrote:
nd_mapping->labels maintains the list of labels present into LSA.
init_labels() prepares this list while adding new label into LSA
and updates nd_mapping->labels accordingly. During cxl region
creation nd_mapping->labels list an
On 19/08/25 10:38AM, Ira Weiny wrote:
Neeraj Kumar wrote:
LSA 2.1 format introduces region label, which can also reside
into LSA along with only namespace label as per v1.1 and v1.2
As both namespace and region labels are of same size of 256 bytes.
Soft-NAK
Having 2 data structures of the
On 15/08/25 02:02PM, Dave Jiang wrote:
On 7/30/25 5:11 AM, Neeraj Kumar wrote:
CXL LSA v2.1 utilizes the region labels stored in the LSA for interleave
set configuration instead of interleave-set cookie used in previous LSA
versions. As interleave-set cookie is not required for CXL LSA v2.1
On 20/08/25 09:41AM, Dave Jiang wrote:
On 7/30/25 5:12 AM, Neeraj Kumar wrote:
In 84ec985944ef3, devm_cxl_add_nvdimm() sequence was changed and called
before devm_cxl_add_endpoint(). It's because cxl pmem region auto-assembly
used to get called at last in cxl_endpoint_port_probe(),
On 18/08/25 02:48PM, Dave Jiang wrote:
On 7/30/25 5:11 AM, Neeraj Kumar wrote:
LSA 2.1 format introduces region label, which can also reside
into LSA along with only namespace label as per v1.1 and v1.2
As both namespace and region labels are of same size of 256 bytes.
Thus renamed "s
On 15/08/25 11:06AM, Dave Jiang wrote:
On 8/13/25 6:12 AM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:50 +0530
Neeraj Kumar wrote:
Prior to LSA 2.1 version, LSA contain only namespace labels. LSA 2.1
introduced in CXL 2.0 Spec, which contain region label along with
namespace label
On 19/08/25 05:30PM, Dave Jiang wrote:
On 7/30/25 5:12 AM, Neeraj Kumar wrote:
devm_cxl_pmem_add_region() is used to create cxl region based on region
information scanned from LSA.
devm_cxl_add_region() is used to just allocate cxlr and its fields are
filled later by userspace tool using
On 19/08/25 10:57AM, Ira Weiny wrote:
Neeraj Kumar wrote:
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
But why? And didn't we just remove nd_namespace_lab
On 19/08/25 11:04AM, Ira Weiny wrote:
Neeraj Kumar wrote:
CXL LSA v2.1 utilizes the region labels stored in the LSA for interleave
set configuration instead of interleave-set cookie used in previous LSA
versions. As interleave-set cookie is not required for CXL LSA v2.1 format
so skip its usage
On 15/08/25 04:12PM, Dave Jiang wrote:
On 7/30/25 5:11 AM, Neeraj Kumar wrote:
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
index 651847f1bbf9..15d94e3937f0 100644
--- a/drivers/nvdimm/nd.h
+++ b/drivers/nvdimm/nd.h
@@ -322,6 +322,26 @@ static inline void nsl_set_region_uuid
On 19/08/25 02:36PM, Ira Weiny wrote:
Neeraj Kumar wrote:
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
Signed-off-by: Neeraj Kumar
[snip]
+static inline
next patch-set
Neeraj Kumar wrote:
Added __pmem_region_label_update region label update routine to update
^^^
Add
Sure, I will fix it in next patch-set
region label.
How about:
Add __pmem_region_label_update to update region labels. ???
May be I will re-use __pmem_label_update
On 15/08/25 02:55PM, Dave Jiang wrote:
On 7/30/25 5:11 AM, Neeraj Kumar wrote:
Added __pmem_region_label_update region label update routine to update
region label.
Also used guard(mutex)(&nd_mapping->lock) in place of mutex_lock() and
mutex_unlock()
Signed-off-by: Neeraj Kumar
Sub
On 15/08/25 03:02PM, Dave Jiang wrote:
On 7/30/25 5:11 AM, Neeraj Kumar wrote:
LSA 2.1 format introduces region label, which can also reside
into LSA along with only namespace label as per v1.1 and v1.2
As both namespace and region labels are of same size of 256 bytes.
Thus renamed "s
On 13/08/25 03:53PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:55 +0530
Neeraj Kumar wrote:
Added cxl v2.1 format region label deletion routine. This function is
used to delete region label from LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 77
On 13/08/25 02:27PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:52 +0530
Neeraj Kumar wrote:
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
Signed-off-by
On 13/08/25 04:55PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:42:01 +0530
Neeraj Kumar wrote:
During namespace creation skip presence of region label if present.
Confusing description. What does skipping presence mean?
Reword.
During namespace creation, skip any region labels found
On 13/08/25 04:09PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:58 +0530
Neeraj Kumar wrote:
If Namespace label is present in LSA during nvdimm_probe then DPA
reservation is required. But this reservation is not required by region
label. Therefore if LSA scanning finds any region label
On 13/08/25 04:07PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:57 +0530
Neeraj Kumar wrote:
slot validation routine validates label slot by calculating label
Slot validation ... or
The slot validation routing ...
Sure, I will fix it in next patch-set
checksum. It was only
On 13/08/25 03:48PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:54 +0530
Neeraj Kumar wrote:
Added __pmem_region_label_update region label update routine to update
region label.
Also used guard(mutex)(&nd_mapping->lock) in place of mutex_lock() and
mutex_unlock()
Signed
On 13/08/25 02:44PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:53 +0530
Neeraj Kumar wrote:
CXL LSA v2.1 utilizes the region labels stored in the LSA for interleave
set configuration instead of interleave-set cookie used in previous LSA
versions. As interleave-set cookie is not
On 13/08/25 02:23PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:51 +0530
Neeraj Kumar wrote:
LSA 2.1 format introduces region label, which can also reside
into LSA along with only namespace label as per v1.1 and v1.2
As both namespace and region labels are of same size of 256 bytes
On 13/08/25 02:12PM, Jonathan Cameron wrote:
On Wed, 30 Jul 2025 17:41:50 +0530
Neeraj Kumar wrote:
Prior to LSA 2.1 version, LSA contain only namespace labels. LSA 2.1
introduced in CXL 2.0 Spec, which contain region label along with
namespace label.
NDD_LABELING flag is used for namespace
On 30/07/25 05:41PM, Neeraj Kumar wrote:
Introduction:
=
CXL Persistent Memory (Pmem) devices region, namespace and content must be
persistent across system reboot. In order to achieve this persistency, it
uses Label Storage Area (LSA) to store respective metadata. During system
namespace label or region label.
NDD_CXL_LABEL will be utilized by cxl driver to enable LSA2.1 region
label support
Accordingly updated label index version
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm.c | 1 +
drivers/nvdimm/dimm_devs.c | 7 +++
drivers/nvdimm/label.c
Using these attributes region label is added/deleted into LSA. These
attributes are called from userspace (ndctl) after region creation.
Signed-off-by: Neeraj Kumar
---
Documentation/ABI/testing/sysfs-bus-cxl | 22 ++
drivers/cxl/core/pmem_region.c | 94
this dependency of pmem region on libnvdimm, segregated pmem
region related code from core/region.c
Signed-off-by: Neeraj Kumar
---
drivers/cxl/Kconfig| 12 ++
drivers/cxl/core/Makefile | 1 +
drivers/cxl/core/core.h| 8 +-
drivers/cxl/core/pmem_region.c | 202
Add support of cxl lsa 2.1 using NDD_CXL_LABEL flag. It also creates cxl
region based on region information parsed from LSA.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/region.c | 58 +++
drivers/cxl/cxl.h | 4 +++
drivers/cxl/pmem.c| 2
Save region information stored in cxlr to nd_set during
cxl_pmem_region_probe in nd_set. This saved region information is being
stored into LSA, which will be used for cxl region persistence
Signed-off-by: Neeraj Kumar
---
drivers/cxl/pmem.c | 13 +++--
1 file changed, 7 insertions
Saved root decoder info is required for cxl region persistency
Signed-off-by: Neeraj Kumar
---
drivers/cxl/cxlmem.h | 1 +
drivers/cxl/mem.c| 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 751478dfc410..72dfcf4671f2 100644
--- a
Add cxl_find_root_decoder_by_port() to find root decoder on cxl bus.
It is used to find root decoder using cxl port.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/port.c | 27 +++
drivers/cxl/cxl.h | 1 +
2 files changed, 28 insertions(+)
diff --git a/drivers
on of endpoint probe.
2. Moved cxl pmem region auto-assembly from cxl_endpoint_port_probe() to
cxl_mem_probe() after devm_cxl_add_nvdimm(). It gurantees both the
completion of endpoint probe and cxl_nvd presence before its call.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/region.c
create cxl region after
fetching region information from LSA.
Also created some helper routines and refactored dpa_size_store(),
commit_store() to avoid duplicate code usage in devm_cxl_pmem_add_region()
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/core.h | 1 +
drivers/cxl/core/port.c
During namespace creation skip presence of region label if present.
Also preserve region label into labels list if present.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/namespace_devs.c | 50 +
1 file changed, 45 insertions(+), 5 deletions(-)
diff --git a
Preserve region information from region label during nvdimm_probe. This
preserved region information is used for creating cxl region to achieve
region persistency across reboot.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm.c | 4
drivers/nvdimm/label.c| 41
cxl region information preserved from LSA need to be exported so as to
use by cxl driver for cxl region re-creation
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/dimm_devs.c | 18 ++
include/linux/libnvdimm.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a/drivers
If Namespace label is present in LSA during nvdimm_probe then DPA
reservation is required. But this reservation is not required by region
label. Therefore if LSA scanning finds any region label, skip it.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 4
1 file changed, 4
slot validation routine validates label slot by calculating label
checksum. It was only validating namespace label. This changeset also
validates region label if present.
Also validate and calculate lsa v2.1 namespace label checksum
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 55
uring new namespace label creation
pre-include the previously created region label, so increase
num_labels count by 1.
Also updated nsl_set_region_uuid with region uuid with which
namespace is associated with.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 5 +++--
1 file changed, 3 inserti
Added cxl v2.1 format region label deletion routine. This function is
used to delete region label from LSA
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 77 ++---
drivers/nvdimm/label.h | 6 +++
drivers/nvdimm/namespace_devs.c | 12
Added __pmem_region_label_update region label update routine to update
region label.
Also used guard(mutex)(&nd_mapping->lock) in place of mutex_lock() and
mutex_unlock()
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 171 +---
drivers
CXL LSA v2.1 utilizes the region labels stored in the LSA for interleave
set configuration instead of interleave-set cookie used in previous LSA
versions. As interleave-set cookie is not required for CXL LSA v2.1 format
so skip its usage for CXL LSA 2.1 format
Signed-off-by: Neeraj Kumar
CXL 3.2 Spec mentions CXL LSA 2.1 Namespace Labels at section 9.13.2.5
Modified __pmem_label_update function using setter functions to update
namespace label as per CXL LSA 2.1
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 3 +++
drivers/nvdimm/nd.h| 27
ace label and region label can stay as union.
No functional change introduced.
Signed-off-by: Neeraj Kumar
---
drivers/nvdimm/label.c | 58 +++--
drivers/nvdimm/label.h | 12 ++-
drivers/nvdimm/namespace_devs.c | 33 +--
8/20]
- Simplify return in is_region_label() and flip if condition [Jonathan]
[PATCH 12/20]
- Fix comment syntax [Jonathan]
[PATCH 13/20]
- Elaborate commit message and remove history statement from comment [Jonathan]
- Move cxl_region_discovery() from core/port.c to core/region.c [Dave]
[PATCH 14/20]
- Spell check fix in
On 10/07/25 09:23AM, Dave Jiang wrote:
On 6/17/25 5:39 AM, Neeraj Kumar wrote:
Add cxl_find_root_decoder to find root decoder on cxl bus. It is used to
find root decoder during region creation
Signed-off-by: Neeraj Kumar
---
drivers/cxl/core/port.c | 26 ++
drivers
On 10/07/25 10:18AM, Dave Jiang wrote:
On 6/17/25 5:39 AM, Neeraj Kumar wrote:
Add support of cxl lsa 2.1 using NDD_CXL_LABEL flag. It also creates cxl
region based on region information parsed from LSA.
Signed-off-by: Neeraj Kumar
---
drivers/cxl/pmem.c | 59
1 - 100 of 143 matches
Mail list logo