Message ID | 162982119604.1124374.8364301519543316156.stgit@dwillia2-desk3.amr.corp.intel.com |
---|---|
State | Superseded |
Commit | 23471e4c94ec192ae5f96a65d2643988247887d6 |
Headers | show |
Series | cxl_test: Enable CXL Topology and UAPI regression tests | expand |
On Tue, 24 Aug 2021 09:06:36 -0700 Dan Williams <dan.j.williams@intel.com> wrote: > Add a definition of the CXL 2.0 region label format. Note this is done > as a separate patch to make the next patch that adds namespace label > support easier to read. > > Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Signed-off-by: Dan Williams <dan.j.williams@intel.com> FWIW Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/nvdimm/label.h | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h > index 31f94fad7b92..76ecd0347dc2 100644 > --- a/drivers/nvdimm/label.h > +++ b/drivers/nvdimm/label.h > @@ -65,6 +65,36 @@ struct nd_namespace_index { > u8 free[]; > }; > > +/** > + * struct cxl_region_label - CXL 2.0 Table 211 > + * @type: uuid identifying this label format (region) > + * @uuid: uuid for the region this label describes > + * @flags: NSLABEL_FLAG_UPDATING (all other flags reserved) > + * @position: this label's position in the set > + * @dpa: start address in device-local capacity for this label > + * @rawsize: size of this label's contribution to region > + * @hpa: mandatory system physical address to map this region > + * @slot: slot id of this label in label area > + * @ig: interleave granularity (1 << @ig) * 256 bytes > + * @align: alignment in SZ_256M blocks > + * @checksum: fletcher64 sum of this label > + */ > +struct cxl_region_label { > + u8 type[NSLABEL_UUID_LEN]; > + u8 uuid[NSLABEL_UUID_LEN]; > + __le32 flags; > + __le16 nlabel; > + __le16 position; > + __le64 dpa; > + __le64 rawsize; > + __le64 hpa; > + __le32 slot; > + __le32 ig; > + __le32 align; > + u8 reserved[0xac]; > + __le64 checksum; > +}; > + > /** > * struct nd_namespace_label - namespace superblock > * @uuid: UUID per RFC 4122 >
On Thu, 2 Sep 2021 17:36:02 +0100 Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote: > On Tue, 24 Aug 2021 09:06:36 -0700 > Dan Williams <dan.j.williams@intel.com> wrote: > > > Add a definition of the CXL 2.0 region label format. Note this is done > > as a separate patch to make the next patch that adds namespace label > > support easier to read. > > > > Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > FWIW > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Oops. Just noticed something below that needs fixing, so keep that RB with the missing docs fixed. > > > --- > > drivers/nvdimm/label.h | 30 ++++++++++++++++++++++++++++++ > > 1 file changed, 30 insertions(+) > > > > diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h > > index 31f94fad7b92..76ecd0347dc2 100644 > > --- a/drivers/nvdimm/label.h > > +++ b/drivers/nvdimm/label.h > > @@ -65,6 +65,36 @@ struct nd_namespace_index { > > u8 free[]; > > }; > > > > +/** > > + * struct cxl_region_label - CXL 2.0 Table 211 > > + * @type: uuid identifying this label format (region) > > + * @uuid: uuid for the region this label describes > > + * @flags: NSLABEL_FLAG_UPDATING (all other flags reserved) nlabel docs missing here. > > + * @position: this label's position in the set > > + * @dpa: start address in device-local capacity for this label > > + * @rawsize: size of this label's contribution to region > > + * @hpa: mandatory system physical address to map this region > > + * @slot: slot id of this label in label area > > + * @ig: interleave granularity (1 << @ig) * 256 bytes > > + * @align: alignment in SZ_256M blocks Probably need to add docs for reserved to suppress warnings from the kernel-doc build (unless it's clever about things called reserved?) > > + * @checksum: fletcher64 sum of this label > > + */ > > +struct cxl_region_label { > > + u8 type[NSLABEL_UUID_LEN]; > > + u8 uuid[NSLABEL_UUID_LEN]; > > + __le32 flags; > > + __le16 nlabel; > > + __le16 position; > > + __le64 dpa; > > + __le64 rawsize; > > + __le64 hpa; > > + __le32 slot; > > + __le32 ig; > > + __le32 align; > > + u8 reserved[0xac]; > > + __le64 checksum; > > +}; > > + > > /** > > * struct nd_namespace_label - namespace superblock > > * @uuid: UUID per RFC 4122 > > >
On Thu, Sep 2, 2021 at 9:41 AM Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote: > > On Thu, 2 Sep 2021 17:36:02 +0100 > Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote: > > > On Tue, 24 Aug 2021 09:06:36 -0700 > > Dan Williams <dan.j.williams@intel.com> wrote: > > > > > Add a definition of the CXL 2.0 region label format. Note this is done > > > as a separate patch to make the next patch that adds namespace label > > > support easier to read. > > > > > > Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > > FWIW > > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Oops. Just noticed something below that needs fixing, so keep > that RB with the missing docs fixed. > > > > > > --- > > > drivers/nvdimm/label.h | 30 ++++++++++++++++++++++++++++++ > > > 1 file changed, 30 insertions(+) > > > > > > diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h > > > index 31f94fad7b92..76ecd0347dc2 100644 > > > --- a/drivers/nvdimm/label.h > > > +++ b/drivers/nvdimm/label.h > > > @@ -65,6 +65,36 @@ struct nd_namespace_index { > > > u8 free[]; > > > }; > > > > > > +/** > > > + * struct cxl_region_label - CXL 2.0 Table 211 > > > + * @type: uuid identifying this label format (region) > > > + * @uuid: uuid for the region this label describes > > > + * @flags: NSLABEL_FLAG_UPDATING (all other flags reserved) > > nlabel docs missing here. > > > > + * @position: this label's position in the set > > > + * @dpa: start address in device-local capacity for this label > > > + * @rawsize: size of this label's contribution to region > > > + * @hpa: mandatory system physical address to map this region > > > + * @slot: slot id of this label in label area > > > + * @ig: interleave granularity (1 << @ig) * 256 bytes > > > + * @align: alignment in SZ_256M blocks > > Probably need to add docs for reserved to suppress warnings > from the kernel-doc build (unless it's clever about things called reserved?) Nope, it complains about @reserved not being documented. There's some legacy kernel-doc escapes in this file, so I fix those up in a separate patch before this one.
diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h index 31f94fad7b92..76ecd0347dc2 100644 --- a/drivers/nvdimm/label.h +++ b/drivers/nvdimm/label.h @@ -65,6 +65,36 @@ struct nd_namespace_index { u8 free[]; }; +/** + * struct cxl_region_label - CXL 2.0 Table 211 + * @type: uuid identifying this label format (region) + * @uuid: uuid for the region this label describes + * @flags: NSLABEL_FLAG_UPDATING (all other flags reserved) + * @position: this label's position in the set + * @dpa: start address in device-local capacity for this label + * @rawsize: size of this label's contribution to region + * @hpa: mandatory system physical address to map this region + * @slot: slot id of this label in label area + * @ig: interleave granularity (1 << @ig) * 256 bytes + * @align: alignment in SZ_256M blocks + * @checksum: fletcher64 sum of this label + */ +struct cxl_region_label { + u8 type[NSLABEL_UUID_LEN]; + u8 uuid[NSLABEL_UUID_LEN]; + __le32 flags; + __le16 nlabel; + __le16 position; + __le64 dpa; + __le64 rawsize; + __le64 hpa; + __le32 slot; + __le32 ig; + __le32 align; + u8 reserved[0xac]; + __le64 checksum; +}; + /** * struct nd_namespace_label - namespace superblock * @uuid: UUID per RFC 4122
Add a definition of the CXL 2.0 region label format. Note this is done as a separate patch to make the next patch that adds namespace label support easier to read. Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- drivers/nvdimm/label.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)