Linux CXL
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <dave.jiang@intel.com>
Subject: Re: [PATCH 2/2] cxl/hdm: Skip emulation when driver manages mem_enable
Date: Wed, 22 Feb 2023 21:05:46 -0800	[thread overview]
Message-ID: <63f6f42aa6115_19f329412@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20230222132221.00002b42@huawei.com>

Jonathan Cameron wrote:
> On Tue, 21 Feb 2023 17:51:24 -0800
> Dan Williams <dan.j.williams@intel.com> wrote:
> 
> > If the driver is allowed to enable memory operation itself then it can
> > also turn on HDM decoder support at will.
> > 
> > With this the second call to cxl_setup_hdm_decoder_from_dvsec(), when
> > an HDM decoder is not committed, is not needed.
> > 
> > Fixes: b777e9bec960 ("cxl/hdm: Emulate HDM decoder from DVSEC range registers")
> > Link: http://lore.kernel.org/r/20230220113657.000042e1@huawei.com
> > Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> 
> For both
> Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> I could have sworn that mem_enabled was set when I was debugging this before
> (hence the odd dance in my proposal)
> 
> Meh, doesn't seem to be now so I clearly did something wrong!
> 
> Trivial comment below.
> 
> I still need to add more tests cases, but this solves the one that
> caused the original report.

Good to hear.

> 
> > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> > index d853a0238ad7..dd4b7a729419 100644
> > --- a/drivers/cxl/cxl.h
> > +++ b/drivers/cxl/cxl.h
> > @@ -695,13 +695,15 @@ int cxl_endpoint_autoremove(struct cxl_memdev *cxlmd, struct cxl_port *endpoint)
> >  
> >  /**
> >   * struct cxl_endpoint_dvsec_info - Cached DVSEC info
> > - * @mem_enabled: cached value of mem_enabled in the DVSEC, PCIE_DEVICE
> > + * @mem_enabled: cached value of mem_enabled in the DVSEC at init time
> 
> I guess could rename this to make the meaning more obvious, but would make for
> a messier fix.

Yeah, maybe a rename as a follow-on, but for now keep the fix smaller
seems prudent.

  reply	other threads:[~2023-02-23  5:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  1:51 [PATCH 0/2] cxl: DVSEC Range emulation fixups Dan Williams
2023-02-22  1:51 ` [PATCH 1/2] cxl/hdm: Fix double allocation of @cxlhdm Dan Williams
2023-02-22 12:53   ` Jonathan Cameron
2023-02-22 16:57   ` Dave Jiang
2023-02-22  1:51 ` [PATCH 2/2] cxl/hdm: Skip emulation when driver manages mem_enable Dan Williams
2023-02-22 13:22   ` Jonathan Cameron
2023-02-23  5:05     ` Dan Williams [this message]
2023-02-22 16:59   ` Dave Jiang
2023-03-31 16:33   ` Fan Ni
2023-02-24  1:14 ` [PATCH 0/2] cxl: DVSEC Range emulation fixups Gregory Price
2023-03-01 18:46   ` Dan Williams
2023-02-26  7:28     ` Gregory Price
2023-03-03 16:43     ` Gregory Price
2023-03-21 17:17     ` Gregory Price
2023-03-23 17:56       ` 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=63f6f42aa6115_19f329412@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=dave.jiang@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