Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <vishal.l.verma@intel.com>,
	<alison.schofield@intel.com>, <ira.weiny@intel.com>,
	<dave.jiang@intel.com>
Subject: Re: [PATCH 1/4] cxl/region: Fix decoder interleave programming
Date: Wed, 3 Aug 2022 16:24:00 +0100	[thread overview]
Message-ID: <20220803162400.000078a0@huawei.com> (raw)
In-Reply-To: <165951146336.967013.11160153960900111443.stgit@dwillia2-xfh.jf.intel.com>

On Wed, 03 Aug 2022 00:24:23 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> Jonathan notes:
> 
> "Curiously interleave ways = 1 for the EPs which is obviously wrong"
> 
> ...while testing the latest CXL development branch on QEMU.
> 
> It turns out the region creation process failed to program the endpoint
> decoders. This was missed because the default settings of x1 at 4K
> intereleave still results in the region appearing to function. Jonathan
> caught the bug by reverse mapping the translations that need to happen
> for the QEMU support.
> 
> Link: https://lore.kernel.org/r/62e95fdf9f6e2_30440294e4@dwillia2-xfh.jf.intel.com.notmuch
> Fixes: 384e624bb211 ("cxl/region: Attach endpoint decoders")
> Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Looks good to me.  Minimal testing done so far.
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/cxl/core/region.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index cf5d5811fe4c..8e6ff3f39755 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -1294,6 +1294,9 @@ static int cxl_region_attach(struct cxl_region *cxlr,
>  		p->state = CXL_CONFIG_ACTIVE;
>  	}
>  
> +	cxled->cxld.interleave_ways = p->interleave_ways;
> +	cxled->cxld.interleave_granularity = p->interleave_granularity;
> +
>  	return 0;
>  
>  err_decrement:
> 


  reply	other threads:[~2022-08-03 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03  7:24 [PATCH 0/4] cxl/region: Endpoint decoder fixes Dan Williams
2022-08-03  7:24 ` [PATCH 1/4] cxl/region: Fix decoder interleave programming Dan Williams
2022-08-03 15:24   ` Jonathan Cameron [this message]
2022-08-03  7:24 ` [PATCH 2/4] cxl/region: Move HPA setup to cxl_region_attach() Dan Williams
2022-08-03 15:25   ` Jonathan Cameron
2022-08-03  7:24 ` [PATCH 3/4] cxl/region: Fix port setup uninitialized variable warnings Dan Williams
2022-08-03 15:28   ` Jonathan Cameron
2022-08-03 21:22   ` Ira Weiny
2022-08-04 20:26     ` Dan Williams
2022-08-03  7:24 ` [PATCH 4/4] cxl/region: Fix region commit uninitialized variable warning Dan Williams
2022-08-03 15:41   ` Jonathan Cameron
2022-08-03 21:49   ` Ira Weiny
2022-08-03 22:07     ` Ira Weiny
2022-08-04 20:33       ` Dan Williams
2022-08-04 20:30     ` Dan Williams

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=20220803162400.000078a0@huawei.com \
    --to=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 \
    --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