From: Dave Jiang <dave.jiang@intel.com>
To: Dan Williams <dan.j.williams@intel.com>, vishal.l.verma@intel.com
Cc: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
Subject: Re: [PATCH 2/4] cxl/list: Filter root decoders by region
Date: Fri, 28 Apr 2023 09:03:20 -0700 [thread overview]
Message-ID: <2c24fc6b-383f-73aa-6ae5-4faade5d1269@intel.com> (raw)
In-Reply-To: <168236638318.1027628.17234728660914767074.stgit@dwillia2-xfh.jf.intel.com>
On 4/24/23 12:59 PM, Dan Williams wrote:
> Arrange for util_cxl_decoder_filter_by_region() to consider that root
> decoders host multiple regions, unlike switch and endpoint decoders that
> have a 1:1 relationship.
>
> Before: (list the root decoders hosting region4 and region9)
> # cxl list -Du -d root -r 4,9
> Warning: no matching devices found
>
> [
> ]
>
> After:
> # cxl list -Du -d root -r 4,9
> [
> {
> "decoder":"decoder3.0",
> "resource":"0xf010000000",
> "size":"1024.00 MiB (1073.74 MB)",
> "interleave_ways":1,
> "max_available_extent":"512.00 MiB (536.87 MB)",
> "volatile_capable":true,
> "nr_targets":1
> },
> {
> "decoder":"decoder3.5",
> "resource":"0xf1d0000000",
> "size":"256.00 MiB (268.44 MB)",
> "interleave_ways":1,
> "accelmem_capable":true,
> "nr_targets":1
> }
> ]
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> cxl/filter.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/cxl/filter.c b/cxl/filter.c
> index 90b13be79d9c..6e8d42165205 100644
> --- a/cxl/filter.c
> +++ b/cxl/filter.c
> @@ -661,6 +661,12 @@ util_cxl_decoder_filter_by_region(struct cxl_decoder *decoder,
> if (!__ident)
> return decoder;
>
> + /* root decoders filter by children */
> + cxl_region_foreach(decoder, region)
> + if (util_cxl_region_filter(region, __ident))
> + return decoder;
> +
> + /* switch and endpoint decoders have a 1:1 association with a region */
> region = cxl_decoder_get_region(decoder);
> if (!region)
> return NULL;
>
>
next prev parent reply other threads:[~2023-04-28 16:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 19:59 [ndctl PATCH 0/4] cxl list and test fixes Dan Williams
2023-04-24 19:59 ` [PATCH 1/4] cxl/list: Fix filtering RCDs Dan Williams
2023-04-28 15:54 ` Dave Jiang
2023-04-24 19:59 ` [PATCH 2/4] cxl/list: Filter root decoders by region Dan Williams
2023-04-28 16:03 ` Dave Jiang [this message]
2023-04-24 19:59 ` [PATCH 3/4] test: Support test modules located in 'updates' instead of 'extra' Dan Williams
2023-04-28 16:05 ` Dave Jiang
2023-04-24 19:59 ` [PATCH 4/4] test: Fix dangling pointer warning Dan Williams
2023-04-28 16:06 ` Dave Jiang
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=2c24fc6b-383f-73aa-6ae5-4faade5d1269@intel.com \
--to=dave.jiang@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--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