From: Jehoon Park <jehoon.park@samsung.com>
To: linux-cxl@vger.kernel.org
Cc: nvdimm@lists.linux.dev,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Kyungsan Kim <ks0204.kim@samsung.com>,
Junhyeok Im <junhyeok.im@samsung.com>,
Jehoon Park <jehoon.park@samsung.com>
Subject: [ndctl PATCH 0/2] add support for Set Alert Configuration mailbox command
Date: Tue, 11 Jul 2023 16:10:17 +0900 [thread overview]
Message-ID: <20230711071019.7151-1-jehoon.park@samsung.com> (raw)
In-Reply-To: CGME20230711070758epcas2p4111d4413d669a8ef6dc8862a0f4835b9@epcas2p4.samsung.com
CXL 3.0 Spec 8.2.9.8.3.3 defines Set Alert Configuration mailbox command.
This patchset adds support for the command to configure warning alert.
Example:
# ./cxl set-alert-config mem0 -L 30 --life-used-alert=on
{
"memdev":"mem0",
"ram_size":"1024.00 MiB (1073.74 MB)",
"alert_config":{
"life_used_prog_warn_threshold_valid":true,
"dev_over_temperature_prog_warn_threshold_valid":false,
"dev_under_temperature_prog_warn_threshold_valid":false,
"corrected_volatile_mem_err_prog_warn_threshold_valid":false,
"corrected_pmem_err_prog_warn_threshold_valid":false,
"life_used_prog_warn_threshold_writable":true,
"dev_over_temperature_prog_warn_threshold_writable":true,
"dev_under_temperature_prog_warn_threshold_writable":true,
"corrected_volatile_mem_err_prog_warn_threshold_writable":true,
"corrected_pmem_err_prog_warn_threshold_writable":true,
"life_used_crit_alert_threshold":75,
"life_used_prog_warn_threshold":30,
"dev_over_temperature_crit_alert_threshold":0,
"dev_under_temperature_crit_alert_threshold":0,
"dev_over_temperature_prog_warn_threshold":0,
"dev_under_temperature_prog_warn_threshold":0,
"corrected_volatile_mem_err_prog_warn_threshold":0,
"corrected_pmem_err_prog_warn_threshold":0
},
"serial":"0",
"host":"0000:0d:00.0"
}
cxl memdev: cmd_set_alert_config: set alert configuration 1 mem
The implementation is based on the 'ndctl-inject-smart'. Variable and function
names are aligned with the implementation of 'Get Alert Configuration'.
Jehoon Park (2):
libcxl: add support for Set Alert Configuration mailbox command
cxl: add 'set-alert-config' command to cxl tool
Documentation/cxl/cxl-set-alert-config.txt | 96 +++++++++
Documentation/cxl/lib/libcxl.txt | 1 +
Documentation/cxl/meson.build | 1 +
cxl/builtin.h | 1 +
cxl/cxl.c | 1 +
cxl/lib/libcxl.c | 21 ++
cxl/lib/libcxl.sym | 12 ++
cxl/lib/private.h | 12 ++
cxl/libcxl.h | 16 ++
cxl/memdev.c | 219 ++++++++++++++++++++-
10 files changed, 379 insertions(+), 1 deletion(-)
create mode 100644 Documentation/cxl/cxl-set-alert-config.txt
base-commit: 7f75ce36ce3a0d41ed74d4e2dfcfd41a6fd7fe40
--
2.17.1
next parent reply other threads:[~2023-07-11 7:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230711070758epcas2p4111d4413d669a8ef6dc8862a0f4835b9@epcas2p4.samsung.com>
2023-07-11 7:10 ` Jehoon Park [this message]
2023-07-11 7:10 ` [ndctl PATCH 1/2] libcxl: add support for Set Alert Configuration mailbox command Jehoon Park
2023-07-11 7:10 ` [ndctl PATCH 2/2] cxl: add 'set-alert-config' command to cxl tool Jehoon Park
2023-07-24 22:07 ` Verma, Vishal L
2023-07-31 3:23 ` Jehoon Park
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=20230711071019.7151-1-jehoon.park@samsung.com \
--to=jehoon.park@samsung.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=junhyeok.im@samsung.com \
--cc=ks0204.kim@samsung.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