Message ID | a8832a0e46cad02e76648cc79181392113dabcf7.1666841669.git.alison.schofield@intel.com |
---|---|
State | Superseded |
Headers | show |
Series | CXL XOR Interleave Arithmetic | expand |
On Wed, 26 Oct 2022 21:07:41 -0700 alison.schofield@intel.com wrote: > From: Alison Schofield <alison.schofield@intel.com> > > A linux-ized ACPI patch is included here for reference. The ACPI > pull request has been merged and we expect the upstream version > shortly. https://github.com/acpica/acpica/pull/795 > > The CXL XOR Interleave Math Structure (CXIMS) is added to the > CXL Early Discovery Table (CEDT). This new structure is defined > in the CXL 3.0 specification Section 9.17.1.4 > > https://www.computeexpresslink.org/spec-landing > > Signed-off-by: Alison Schofield <alison.schofield@intel.com> One trivial comment. Checked against spec and lgtm Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > include/acpi/actbl1.h | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h > index 15c78678c5d3..f96f4fe5328d 100644 > --- a/include/acpi/actbl1.h > +++ b/include/acpi/actbl1.h > @@ -329,7 +329,8 @@ struct acpi_cedt_header { > enum acpi_cedt_type { > ACPI_CEDT_TYPE_CHBS = 0, > ACPI_CEDT_TYPE_CFMWS = 1, > - ACPI_CEDT_TYPE_RESERVED = 2, > + ACPI_CEDT_TYPE_CXIMS = 2, > + ACPI_CEDT_TYPE_RESERVED = 3, Whilst I struggle to see the point of this RESERVED DEFINE it's almost in keeping with other similar definitions. However they do have comments to say that /* 3 and greater are reserved */ and the comma isn't present as these are guaranteed to be last element. Probably want to do the same. > }; > > /* Values for version field above */ > @@ -380,6 +381,7 @@ struct acpi_cedt_cfmws_target_element { > /* Values for Interleave Arithmetic field above */ > > #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) > +#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1) > > /* Values for Restrictions field above */ > > @@ -389,6 +391,16 @@ struct acpi_cedt_cfmws_target_element { > #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) > #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) > > +/* 2: CXL XOR Interleave Math Structure */ > + > +struct acpi_cedt_cxims { > + struct acpi_cedt_header header; > + u16 reserved1; > + u8 hbig; > + u8 nr_xormaps; > + u64 xormap_list[]; > +}; > + > /******************************************************************************* > * > * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
On Thu, Nov 03, 2022 at 06:02:48PM +0000, Jonathan Cameron wrote: > On Wed, 26 Oct 2022 21:07:41 -0700 > alison.schofield@intel.com wrote: > > > From: Alison Schofield <alison.schofield@intel.com> > > > > A linux-ized ACPI patch is included here for reference. The ACPI > > pull request has been merged and we expect the upstream version > > shortly. https://github.com/acpica/acpica/pull/795 > > > > The CXL XOR Interleave Math Structure (CXIMS) is added to the > > CXL Early Discovery Table (CEDT). This new structure is defined > > in the CXL 3.0 specification Section 9.17.1.4 > > > > https://www.computeexpresslink.org/spec-landing > > > > Signed-off-by: Alison Schofield <alison.schofield@intel.com> > One trivial comment. > > Checked against spec and lgtm > > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > --- > > include/acpi/actbl1.h | 14 +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h > > index 15c78678c5d3..f96f4fe5328d 100644 > > --- a/include/acpi/actbl1.h > > +++ b/include/acpi/actbl1.h > > @@ -329,7 +329,8 @@ struct acpi_cedt_header { > > enum acpi_cedt_type { > > ACPI_CEDT_TYPE_CHBS = 0, > > ACPI_CEDT_TYPE_CFMWS = 1, > > - ACPI_CEDT_TYPE_RESERVED = 2, > > + ACPI_CEDT_TYPE_CXIMS = 2, > > + ACPI_CEDT_TYPE_RESERVED = 3, > > Whilst I struggle to see the point of this RESERVED DEFINE it's almost in keeping > with other similar definitions. However they do have comments to say > that /* 3 and greater are reserved */ and the comma isn't present > as these are guaranteed to be last element. Probably want to do the same. Thanks Jonathan, I see what you mean (now). I think my best option here is to submit a separate (new) pull request to ACPICA for the cleanup: remove comma and add comment. FYI - The actual linuxized version of this patch, which grew to include RDPAS is now available here: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=f350c68e3cd5ce605e44c7830029cd936a223f66 and was previously posted to linux-cxl as: https://lore.kernel.org/linux-cxl/20220916232102.673102-1-alison.schofield@intel.com/ Alison > > > }; > > > > /* Values for version field above */ > > @@ -380,6 +381,7 @@ struct acpi_cedt_cfmws_target_element { > > /* Values for Interleave Arithmetic field above */ > > > > #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) > > +#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1) > > > > /* Values for Restrictions field above */ > > > > @@ -389,6 +391,16 @@ struct acpi_cedt_cfmws_target_element { > > #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) > > #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) > > > > +/* 2: CXL XOR Interleave Math Structure */ > > + > > +struct acpi_cedt_cxims { > > + struct acpi_cedt_header header; > > + u16 reserved1; > > + u8 hbig; > > + u8 nr_xormaps; > > + u64 xormap_list[]; > > +}; > > + > > /******************************************************************************* > > * > > * CPEP - Corrected Platform Error Polling table (ACPI 4.0) >
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 15c78678c5d3..f96f4fe5328d 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -329,7 +329,8 @@ struct acpi_cedt_header { enum acpi_cedt_type { ACPI_CEDT_TYPE_CHBS = 0, ACPI_CEDT_TYPE_CFMWS = 1, - ACPI_CEDT_TYPE_RESERVED = 2, + ACPI_CEDT_TYPE_CXIMS = 2, + ACPI_CEDT_TYPE_RESERVED = 3, }; /* Values for version field above */ @@ -380,6 +381,7 @@ struct acpi_cedt_cfmws_target_element { /* Values for Interleave Arithmetic field above */ #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) +#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1) /* Values for Restrictions field above */ @@ -389,6 +391,16 @@ struct acpi_cedt_cfmws_target_element { #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) +/* 2: CXL XOR Interleave Math Structure */ + +struct acpi_cedt_cxims { + struct acpi_cedt_header header; + u16 reserved1; + u8 hbig; + u8 nr_xormaps; + u64 xormap_list[]; +}; + /******************************************************************************* * * CPEP - Corrected Platform Error Polling table (ACPI 4.0)