From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: <alison.schofield@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Dave Jiang <dave.jiang@intel.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v8 2/3] cxl/acpi: Support CXL XOR Interleave Math (CXIMS)
Date: Wed, 30 Nov 2022 18:23:09 +0000 [thread overview]
Message-ID: <20221130182309.000015e4@Huawei.com> (raw)
In-Reply-To: <20221130181436.0000782f@Huawei.com>
> > +static int cxl_parse_cxims(union acpi_subtable_headers *header, void *arg,
> > + const unsigned long end)
> > +{
> > + struct acpi_cedt_cxims *cxims = (struct acpi_cedt_cxims *)header;
> > + struct cxl_cxims_context *ctx = arg;
> > + struct cxl_root_decoder *cxlrd = ctx->cxlrd;
> > + struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld;
> > + struct device *dev = ctx->dev;
> > + struct cxl_cxims_data *cximsd;
> > + unsigned int hbig, nr_maps;
> > + int rc;
> > +
> > + rc = cxl_to_granularity(cxims->hbig, &hbig);
> > + if (rc)
> > + return rc;
> > +
> > + if (hbig == cxld->interleave_granularity) {
> > + /* IW 1,3 do not use xormaps and skip this parsing entirely */
> > +
> > + if (is_power_of_2(cxld->interleave_ways))
> > + /* 2, 4, 8, 16 way */
> > + nr_maps = ilog2(cxld->interleave_ways);
> > + else
> > + /* 6, 12 way */
> > + nr_maps = ilog2(cxld->interleave_ways / 3);
> > +
> > + if (cxims->nr_xormaps < nr_maps) {
>
> Why is cxims->nr_xormaps > nr_maps not an error?
> Whilst we are just going to drop the extra entries it certainly seems
> like an oddity we should perhaps report?
Ah. I see from your example that a subset can be used so one cxims gets
used for different numbers of iw. I'd missed that detail but it is clear
we only have one of these for each HBIG.
next prev parent reply other threads:[~2022-11-30 18:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 22:52 [PATCH v8 0/3] CXL XOR Interleave Arithmetic alison.schofield
2022-11-22 22:52 ` [PATCH v8 1/3] ACPICA commit 2d8dc0383d3c908389053afbdc329bbd52f009ce alison.schofield
2022-11-22 22:52 ` [PATCH v8 2/3] cxl/acpi: Support CXL XOR Interleave Math (CXIMS) alison.schofield
2022-11-30 18:14 ` Jonathan Cameron
2022-11-30 18:23 ` Jonathan Cameron [this message]
2022-11-30 22:51 ` Alison Schofield
2022-11-22 22:52 ` [PATCH v8 3/3] tools/testing/cxl: Add XOR Math support to cxl_test alison.schofield
2022-11-30 18:24 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221130182309.000015e4@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox