Linux CXL
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Alison Schofield <alison.schofield@intel.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: Yao Xingtao <yaoxt.fnst@fujitsu.com>, <dave@stgolabs.net>,
	<jonathan.cameron@huawei.com>, <dave.jiang@intel.com>,
	<vishal.l.verma@intel.com>, <ira.weiny@intel.com>,
	<jim.harris@samsung.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v7] cxl/region: check interleave capability
Date: Wed, 12 Jun 2024 20:27:57 -0700	[thread overview]
Message-ID: <666a673d8e0fa_c79a3294aa@dwillia2-mobl3.amr.corp.intel.com.notmuch> (raw)
In-Reply-To: <ZmoZfZPcGNYCqQGL@aschofie-mobl2>

Alison Schofield wrote:
[..]
> > > diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> > > index 36cee9c30ceb..7fe617122d33 100644
> > > --- a/drivers/cxl/cxlmem.h
> > > +++ b/drivers/cxl/cxlmem.h
> > > @@ -848,11 +848,21 @@ static inline void cxl_mem_active_dec(void)
> > >  
> > >  int cxl_mem_sanitize(struct cxl_memdev *cxlmd, u16 cmd);
> > >  
> > > +/*
> > 
> > Minor detail that can come in a follow-on patch is that this needs to
> > be:
> > 
> > /**
> > 
> > ...in order for the kernel-doc system to autoformat it like it does
> > other 'struct' documentation:
> > 
> > https://docs.kernel.org/driver-api/cxl/memory-devices.html
> > 
> > However, the reason it needs to be a follow-on patch is that this file
> > is not currently included for parsing and needs something like this:
> 
> We'll need another revision of this patch to address the cxl-test module

Thanks for running that by the way!

Now, I tend to not want to leave people hanging figuring out how
cxl_test works, so in this case I think the incremental fix on top of
the crash fix is this:

diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 908e0d083936..4b2416d9f66f 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -635,6 +635,9 @@ static struct cxl_hdm *mock_cxl_setup_hdm(struct cxl_port *port,
                return ERR_PTR(-ENOMEM);
 
        cxlhdm->port = port;
+       cxlhdm->interleave_mask = ~0U;
+       cxlhdm->iw_cap_mask = ~0UL;
+
        return cxlhdm;
 }
 
I.e. allow everything for now.

The good news is the patch does work to reject decoders without the
proper capabilities.

> dependencies so how about adding the "/**" in the next revision.
> 
> I'm suggesting this because cxl_mem.h contains other kernel doc
> comments that are not being picked up because cxl_mem.h is missing
> in Documentation/driver-api/cxl/memory-devices.rst. There also seem
> to be other ommissions when compared with the kernel doc notations
> in drivers/cxl/ :  core/cdat.c, core/hdm.c. I say 'seems' because
> I guess it could be intentional.
> 
> Can Yao add the kernel doc notation in the next rev of this patch
> and then come back soon and sync memory-devices.rst for all of
> drivers/cxl/ ?

Sure, but any review issues on the second patch should not hold up
merging the first since they're unrelated changes.

  parent reply	other threads:[~2024-06-13  3:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  3:25 [PATCH v7] cxl/region: check interleave capability Yao Xingtao
2024-06-12  4:07 ` Dan Williams
2024-06-12 21:56   ` Alison Schofield
2024-06-13  0:34     ` Xingtao Yao (Fujitsu)
2024-06-13  3:27     ` Dan Williams [this message]
2024-06-12 17:04 ` Alison Schofield
2024-06-12 17:45   ` Alison Schofield
2024-06-13  0:31   ` Xingtao Yao (Fujitsu)

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=666a673d8e0fa_c79a3294aa@dwillia2-mobl3.amr.corp.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jim.harris@samsung.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    --cc=yaoxt.fnst@fujitsu.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