Message ID | 166026222564.1454405.200833694547817544.stgit@djiang5-desk4.jf.intel.com |
---|---|
State | Superseded |
Headers | show |
Series | Add sanity check for interleave setup | expand |
Dave Jiang wrote: > Attach the cxl mock hdm to the port device to allow cxl_interleave_verify() > to check the interleave configuration. Set the interleave_mask as well > to support the new verification code. > > Signed-off-by: Dave Jiang <dave.jiang@intel.com> > --- > tools/testing/cxl/test/cxl.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c > index a072b2d3e726..3ce353a20b80 100644 > --- a/tools/testing/cxl/test/cxl.c > +++ b/tools/testing/cxl/test/cxl.c > @@ -398,6 +398,9 @@ static struct cxl_hdm *mock_cxl_setup_hdm(struct cxl_port *port) > return ERR_PTR(-ENOMEM); > > cxlhdm->port = port; > + cxlhdm->interleave_mask = GENMASK(14, 8); > + cxlhdm->interleave_cap = CXL_HDM_INTERLEAVE_CAP_DEFAULT; > + dev_set_drvdata(&port->dev, cxlhdm); > return cxlhdm; > } Looks good, Reviewed-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c index a072b2d3e726..3ce353a20b80 100644 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@ -398,6 +398,9 @@ static struct cxl_hdm *mock_cxl_setup_hdm(struct cxl_port *port) return ERR_PTR(-ENOMEM); cxlhdm->port = port; + cxlhdm->interleave_mask = GENMASK(14, 8); + cxlhdm->interleave_cap = CXL_HDM_INTERLEAVE_CAP_DEFAULT; + dev_set_drvdata(&port->dev, cxlhdm); return cxlhdm; }
Attach the cxl mock hdm to the port device to allow cxl_interleave_verify() to check the interleave configuration. Set the interleave_mask as well to support the new verification code. Signed-off-by: Dave Jiang <dave.jiang@intel.com> --- tools/testing/cxl/test/cxl.c | 3 +++ 1 file changed, 3 insertions(+)