From: sashiko-bot@kernel.org
To: "Alison Schofield" <alison.schofield@intel.com>
Cc: linux-cxl@vger.kernel.org
Subject: Re: [PATCH v3 1/2] cxl/region: Allow passthrough decoders with >16K granularity
Date: Sat, 25 Jul 2026 01:26:37 +0000 [thread overview]
Message-ID: <20260725012637.F34231F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <5b1f9970140ad1ea5924de06b7e6879e3b9deea1.1784940306.git.alison.schofield@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] During region auto-discovery, a passthrough decoder's interleave granularity is not updated to its correct topological value, causing valid interleaving descendants to fail auto-discovery.
--
--- Patch [1]: [PATCH v3 1/2] cxl/region: Allow passthrough decoders with >16K granularity ---
commit d213bad3e4cb8647e64aafb5eacaa82258aa533b
Author: Alison Schofield <alison.schofield@intel.com>
cxl/region: Allow passthrough decoders with >16K granularity
This commit allows passthrough decoders to have computed granularities larger
than 16K by treating the interleave granularity as a don't-care value for
non-interleaving decoders. It updates the region configuration to skip
validation and hardware encodability checks for these granularities, while
keeping the computed value to seed descendant decoder setup.
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
[ ... ]
> @@ -1549,20 +1557,21 @@ static int cxl_port_setup_targets(struct cxl_port *port,
[ ... ]
> + ig = parent_ig * parent_iw;
>
> - rc = eig_to_granularity(eig, &ig);
> - if (rc) {
> - dev_dbg(&cxlr->dev, "%s:%s: invalid interleave: %d\n",
> - dev_name(port->uport_dev), dev_name(&port->dev),
> - 256 << eig);
> - return rc;
> + /*
> + * Keep the computed granularity for descendant setup. Only
> + * interleaving decoders require an encodable granularity.
> + */
> + if (iw > 1) {
> + rc = granularity_to_eig(ig, &eig);
> + if (rc) {
> + dev_dbg(&cxlr->dev,
> + "%s: invalid granularity calculation (%d * %d)\n",
> + dev_name(&parent_port->dev), parent_ig,
> + parent_iw);
> + return rc;
> + }
> }
>
> if (iw > 8 || iw > cxlsd->nr_targets) {
[Severity: High]
When auto-discovering a region with a passthrough decoder (iw == 1), does this
skip updating the decoder's interleave granularity to the computed 'ig'?
Looking at cxl_port_setup_targets(), the auto-discovery path handles
non-interleaving decoders by bypassing the granularity mismatch check:
if (test_bit(CXL_REGION_F_AUTO, &cxlr->flags)) {
if (cxld->interleave_ways != iw ||
(iw > 1 && cxld->interleave_granularity != ig) || ...
However, because cxld->interleave_granularity is never updated to 'ig' for
auto-discovered passthrough decoders, won't it retain its stale hardware
value (which could be a don't-care value like 0)?
If so, when descendant decoders load their parent's interleave granularity
earlier in cxl_port_setup_targets():
parent_rr = cxl_rr_load(parent_port, cxlr);
parent_cxld = parent_rr->decoder;
parent_ig = parent_cxld->interleave_granularity;
won't they inherit this stale hardware don't-care value? This appears to
cause their own expected 'ig' calculation to fail validation during
auto-discovery, resulting in the region being rejected.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1784940306.git.alison.schofield@intel.com?part=1
next prev parent reply other threads:[~2026-07-25 1:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 1:08 [PATCH v3 0/2] cxl: Allow passthrough decoders with >16K granularity Alison Schofield
2026-07-25 1:08 ` [PATCH v3 1/2] cxl/region: " Alison Schofield
2026-07-25 1:26 ` sashiko-bot [this message]
2026-07-25 1:42 ` Alison Schofield
2026-07-25 1:08 ` [PATCH v3 2/2] cxl/test: Add a 2-way 16K root decoder for passthrough testing Alison Schofield
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=20260725012637.F34231F00AC4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alison.schofield@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.