From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Cc: "Schofield, Alison" <alison.schofield@intel.com>,
"Jonathan.Cameron@huawei.com" <Jonathan.Cameron@huawei.com>,
"Jiang, Dave" <dave.jiang@intel.com>,
"Weiny, Ira" <ira.weiny@intel.com>
Subject: Re: [PATCH v2 2/3] cxl/region: Fix x1 interleave to greater than x1 interleave routing
Date: Fri, 5 Aug 2022 21:54:10 +0000 [thread overview]
Message-ID: <b149b97b20dcfd4e3c0c59174926b749c2c474f8.camel@intel.com> (raw)
In-Reply-To: <165973126583.1526540.657948655360009242.stgit@dwillia2-xfh.jf.intel.com>
On Fri, 2022-08-05 at 13:27 -0700, Dan Williams wrote:
> In cases where the decode fans out as it traverses downstream, the
> interleave granularity needs to increment to identify the port selector
> bits out of the remaining address bits. For example, recall that with an
> x2 parent port intereleave (IW == 1), the downstream decode for children
> of those ports will either see address bit IG+8 always set, or address
> bit IG+8 always clear. So if the child port needs to select a downstream
> port it can only use address bits starting at IG+9 (where IG and IW are
> the CXL encoded values for interleave granularity (ilog2(ig) - 8) and
> ways (ilog2(iw))).
>
> When the parent port interleave is x1 no such masking occurs and the
> child port can maintain the granularity that was routed to the parent
> port.
>
> Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> drivers/cxl/core/region.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Makes sense to me,
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
>
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index e71077beb021..641bc6344a4a 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -1025,7 +1025,11 @@ static int cxl_port_setup_targets(struct cxl_port *port,
> return rc;
> }
>
> - if (cxl_rr->nr_targets > 1) {
> + /*
> + * If @parent_port is masking address bits, pick the next unused address
> + * bit to route @port's targets.
> + */
> + if (parent_iw > 1 && cxl_rr->nr_targets > 1) {
> u32 address_bit = max(peig + peiw, eiw + peig);
>
> eig = address_bit - eiw + 1;
>
next prev parent reply other threads:[~2022-08-05 21:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 20:27 [PATCH v2 0/3] CXL Region Provisioning Fixes Dan Williams
2022-08-05 20:27 ` [PATCH v2 1/3] cxl/region: Move HPA setup to cxl_region_attach() Dan Williams
2022-08-05 22:48 ` Ira Weiny
2022-08-08 11:04 ` Jonathan Cameron
2022-08-05 20:27 ` [PATCH v2 2/3] cxl/region: Fix x1 interleave to greater than x1 interleave routing Dan Williams
2022-08-05 21:54 ` Verma, Vishal L [this message]
2022-08-05 22:50 ` Ira Weiny
2022-08-08 11:03 ` Jonathan Cameron
2022-08-08 19:28 ` Dan Williams
2022-08-09 10:18 ` Jonathan Cameron
2022-08-05 20:27 ` [PATCH v2 3/3] cxl/region: Disallow region granularity != window granularity Dan Williams
2022-08-05 22:54 ` Ira Weiny
2022-08-08 11: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=b149b97b20dcfd4e3c0c59174926b749c2c474f8.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
/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