From: Alison Schofield <alison.schofield@intel.com>
To: <nvdimm@lists.linux.dev>, Richard Cheng <icheng@nvidia.com>
Cc: <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH 1/2] cxl/list: emit decoder locked status
Date: Fri, 23 Oct 2026 19:56:02 -0700 [thread overview]
Message-ID: <atweQsgrQI8NWcC2@aschofie-mobl2.lan> (raw)
In-Reply-To: <e144468706798fc68df3be13d1e3321486aca901.1785462417.git.alison.schofield@intel.com>
On Thu, Jul 30, 2026 at 06:55:19PM -0700, Alison Schofield wrote:
> A committed zero-sized HDM decoder reports size 0, so 'cxl list'
> renders it identically to an ordinary unconfigured decoder ("state":
> "disabled"). The locked attribute that distinguishes firmware-committed
> decoders is not included in the JSON output.
>
> The library already reads the decoder's locked attribute and exports
> cxl_decoder_is_locked(); it was simply never emitted. Add a "locked"
> field to the decoder JSON, following the emit-only-when-true idiom used
> by the capability flags so existing output is unchanged for the common
> unlocked case.
Applied to pending for NDCTL v86
https://github.com/pmem/ndctl/commit/007acdd87f15
>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> ---
> cxl/json.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/cxl/json.c b/cxl/json.c
> index a92548828582..2214f7027d91 100644
> --- a/cxl/json.c
> +++ b/cxl/json.c
> @@ -870,6 +870,12 @@ struct json_object *util_cxl_decoder_to_json(struct cxl_decoder *decoder,
> json_object_object_add(jdecoder, "state", jobj);
> }
>
> + if (cxl_decoder_is_locked(decoder)) {
> + jobj = json_object_new_boolean(true);
> + if (jobj)
> + json_object_object_add(jdecoder, "locked", jobj);
> + }
> +
> if (cxl_port_is_endpoint(port)) {
> enum cxl_decoder_mode mode = cxl_decoder_get_mode(decoder);
>
> --
> 2.37.3
>
prev parent reply other threads:[~2026-10-24 2:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 1:55 [ndctl PATCH 1/2] cxl/list: emit decoder locked status Alison Schofield
2026-07-31 1:55 ` [ndctl PATCH 2/2] cxl/list: list locked zero-sized decoders Alison Schofield
2026-07-31 15:40 ` Dave Jiang
2026-08-07 5:10 ` Richard Cheng
2026-10-24 2:29 ` Alison Schofield
2026-10-24 2:55 ` Alison Schofield
2026-07-31 15:40 ` [ndctl PATCH 1/2] cxl/list: emit decoder locked status Dave Jiang
2026-08-07 5:07 ` Richard Cheng
2026-10-24 2:56 ` Alison Schofield [this message]
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=atweQsgrQI8NWcC2@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=icheng@nvidia.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/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