diff mbox series

[ndctl,V2,1/2] libcxl: add accessors for Get Alert Configuration CCI output

Message ID 20221025204320.290354-2-jonzhang@meta.com
State Superseded
Headers show
Series add support for CCI Get Alert Configuration | expand

Commit Message

Jonathan Zhang Oct. 25, 2022, 8:43 p.m. UTC
From: Jonathan Zhang <jonzhang@fb.com>

CXL 3.0 spec section 8.2.9.8.3.2 "Get Alert Configuration
(Opcode 4201h) defines the get-alert-config command to
retrieve the devices's critical alert and programmable
warning configurations.

Add the methods to issue the command and get the fields
defined.

Signed-off-by: Jonathan Zhang <jonzhang@meta.com>
---
 Documentation/cxl/lib/libcxl.txt |   1 +
 cxl/lib/libcxl.c                 | 163 +++++++++++++++++++++++++++++++
 cxl/lib/libcxl.sym               |  23 +++++
 cxl/lib/private.h                |  38 +++++++
 cxl/libcxl.h                     |  35 +++++++
 5 files changed, 260 insertions(+)

Comments

Alison Schofield Oct. 31, 2022, 6:57 p.m. UTC | #1
On Tue, Oct 25, 2022 at 01:43:19PM -0700, Jonathan Zhang wrote:
> From: Jonathan Zhang <jonzhang@fb.com>
> 
> CXL 3.0 spec section 8.2.9.8.3.2 "Get Alert Configuration
> (Opcode 4201h) defines the get-alert-config command to
> retrieve the devices's critical alert and programmable
> warning configurations.
> 
> Add the methods to issue the command and get the fields
> defined.
> 
> Signed-off-by: Jonathan Zhang <jonzhang@meta.com>

Consistency in typos are trickier to detect ;)

> +CXL_EXPORT int
> +cxl_cmd_alert_config_life_used_prog_warn_threshold_writable(struct cxl_cmd *cmd)
> +{
> +	cmd_alert_get_prog_alerts_field(
> +		cmd,
> +		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK);
> +}
> +

--snip--

> +#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK    \
> +	BIT(0)

--snip--
>
Jonathan Zhang Oct. 31, 2022, 11:46 p.m. UTC | #2
> On Oct 31, 2022, at 11:57 AM, Alison Schofield <alison.schofield@intel.com> wrote:
> 
> > 
> On Tue, Oct 25, 2022 at 01:43:19PM -0700, Jonathan Zhang wrote:
>> From: Jonathan Zhang <jonzhang@fb.com>
>> 
>> CXL 3.0 spec section 8.2.9.8.3.2 "Get Alert Configuration
>> (Opcode 4201h) defines the get-alert-config command to
>> retrieve the devices's critical alert and programmable
>> warning configurations.
>> 
>> Add the methods to issue the command and get the fields
>> defined.
>> 
>> Signed-off-by: Jonathan Zhang <jonzhang@meta.com>
> 
> Consistency in typos are trickier to detect ;)
> 
>> +CXL_EXPORT int
>> +cxl_cmd_alert_config_life_used_prog_warn_threshold_writable(struct cxl_cmd *cmd)
>> +{
>> +	cmd_alert_get_prog_alerts_field(
>> +		cmd,
>> +		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK);
>> +}
>> +
> 
> --snip--
> 
>> +#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK    \
>> +	BIT(0)
> 
> --snip--
>> 
Thanks for the review. For the above snippets, I do not see any consistency issue though.
To save space, I have been using following abbreviations: 
* prog, short for programmable
* err, short for error
* warn, short for warning
* crit, short for critical
* dev, short for device
* config, short for configuration
Alison Schofield Nov. 1, 2022, 12:57 a.m. UTC | #3
On Mon, Oct 31, 2022 at 11:46:56PM +0000, Jonathan Zhang (Infra) wrote:
> 
> 
> > On Oct 31, 2022, at 11:57 AM, Alison Schofield <alison.schofield@intel.com> wrote:
> > 
> > > 
> > On Tue, Oct 25, 2022 at 01:43:19PM -0700, Jonathan Zhang wrote:
> >> From: Jonathan Zhang <jonzhang@fb.com>
> >> 
> >> CXL 3.0 spec section 8.2.9.8.3.2 "Get Alert Configuration
> >> (Opcode 4201h) defines the get-alert-config command to
> >> retrieve the devices's critical alert and programmable
> >> warning configurations.
> >> 
> >> Add the methods to issue the command and get the fields
> >> defined.
> >> 
> >> Signed-off-by: Jonathan Zhang <jonzhang@meta.com>
> > 
> > Consistency in typos are trickier to detect ;)
> > 
> >> +CXL_EXPORT int
> >> +cxl_cmd_alert_config_life_used_prog_warn_threshold_writable(struct cxl_cmd *cmd)
> >> +{
> >> +	cmd_alert_get_prog_alerts_field(
> >> +		cmd,
> >> +		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK);
                                                 ^^ LIFE ?

> >> +}
> >> +
> > 
> > --snip--
> > 
> >> +#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK    \
> >> +	BIT(0)

                                               ^^ LIFE ?

> > 
> > --snip--
> >> 
> Thanks for the review. For the above snippets, I do not see any consistency issue though.

I'm sorry for being cryptic in my review comment.
Alison

> To save space, I have been using following abbreviations: 
> * prog, short for programmable
> * err, short for error
> * warn, short for warning
> * crit, short for critical
> * dev, short for device
> * config, short for configuration
Jonathan Zhang Nov. 1, 2022, 1:24 a.m. UTC | #4
> On Oct 31, 2022, at 5:57 PM, Alison Schofield <alison.schofield@intel.com> wrote:
> 
> > 
> On Mon, Oct 31, 2022 at 11:46:56PM +0000, Jonathan Zhang (Infra) wrote:
>> 
>> 
>>> On Oct 31, 2022, at 11:57 AM, Alison Schofield <alison.schofield@intel.com> wrote:
>>> 
>>>> 
>>> On Tue, Oct 25, 2022 at 01:43:19PM -0700, Jonathan Zhang wrote:
>>>> From: Jonathan Zhang <jonzhang@fb.com>
>>>> 
>>>> CXL 3.0 spec section 8.2.9.8.3.2 "Get Alert Configuration
>>>> (Opcode 4201h) defines the get-alert-config command to
>>>> retrieve the devices's critical alert and programmable
>>>> warning configurations.
>>>> 
>>>> Add the methods to issue the command and get the fields
>>>> defined.
>>>> 
>>>> Signed-off-by: Jonathan Zhang <jonzhang@meta.com>
>>> 
>>> Consistency in typos are trickier to detect ;)
>>> 
>>>> +CXL_EXPORT int
>>>> +cxl_cmd_alert_config_life_used_prog_warn_threshold_writable(struct cxl_cmd *cmd)
>>>> +{
>>>> +	cmd_alert_get_prog_alerts_field(
>>>> +		cmd,
>>>> +		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK);
>                                                 ^^ LIFE ?
> 
>>>> +}
>>>> +
>>> 
>>> --snip--
>>> 
>>>> +#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK    \
>>>> +	BIT(0)
> 
>                                               ^^ LIFE ?
> 
>>> 
>>> --snip--
>>>> 
>> Thanks for the review. For the above snippets, I do not see any consistency issue though.
> 
> I'm sorry for being cryptic in my review comment.
> Alison
Hi Alison, no worries. I do appreciate your help!

> 
>> To save space, I have been using following abbreviations: 
>> * prog, short for programmable
>> * err, short for error
>> * warn, short for warning
>> * crit, short for critical
>> * dev, short for device
>> * config, short for configuration
diff mbox series

Patch

diff --git a/Documentation/cxl/lib/libcxl.txt b/Documentation/cxl/lib/libcxl.txt
index fd2962a..dec3641 100644
--- a/Documentation/cxl/lib/libcxl.txt
+++ b/Documentation/cxl/lib/libcxl.txt
@@ -121,6 +121,7 @@  information this call requires root / CAP_SYS_ADMIN.
 struct cxl_cmd *cxl_cmd_new_raw(struct cxl_memdev *memdev, int opcode);
 struct cxl_cmd *cxl_cmd_new_identify(struct cxl_memdev *memdev);
 struct cxl_cmd *cxl_cmd_new_get_health_info(struct cxl_memdev *memdev);
+struct cxl_cmd *cxl_cmd_new_get_alert_config(struct cxl_memdev *memdev);
 struct cxl_cmd *cxl_cmd_new_read_label(struct cxl_memdev *memdev,
 					unsigned int offset, unsigned int length);
 struct cxl_cmd *cxl_cmd_new_write_label(struct cxl_memdev *memdev, void *buf,
diff --git a/cxl/lib/libcxl.c b/cxl/lib/libcxl.c
index e8c5d44..c604331 100644
--- a/cxl/lib/libcxl.c
+++ b/cxl/lib/libcxl.c
@@ -3140,6 +3140,169 @@  do {									\
 	return !!(c->field & mask);					\
 } while(0)
 
+CXL_EXPORT struct cxl_cmd *
+cxl_cmd_new_get_alert_config(struct cxl_memdev *memdev)
+{
+	return cxl_cmd_new_generic(memdev, CXL_MEM_COMMAND_ID_GET_ALERT_CONFIG);
+}
+
+#define cmd_alert_get_valid_alerts_field(c, m)                                 \
+	cmd_get_field_u8_mask(c, get_alert_config, GET_ALERT_CONFIG,           \
+			      valid_alerts, m)
+
+CXL_EXPORT int
+cxl_cmd_alert_config_life_used_prog_warn_threshold_valid(struct cxl_cmd *cmd)
+{
+	cmd_alert_get_valid_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_VALID_ALERTS_LIFE_USED_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_dev_over_temperature_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_valid_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_VALID_ALERTS_DEV_OVER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_dev_under_temperature_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_valid_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_VALID_ALERTS_DEV_UNDER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_corrected_volatile_mem_err_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_valid_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_VALID_ALERTS_CORR_VOLATILE_MEM_ERR_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_corrected_pmem_err_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_valid_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_VALID_ALERTS_CORR_PMEM_ERR_PROG_WARN_THRESHOLD_MASK);
+}
+
+#define cmd_alert_get_prog_alerts_field(c, m)                                  \
+	cmd_get_field_u8_mask(c, get_alert_config, GET_ALERT_CONFIG,           \
+			      programmable_alerts, m)
+
+CXL_EXPORT int
+cxl_cmd_alert_config_life_used_prog_warn_threshold_writable(struct cxl_cmd *cmd)
+{
+	cmd_alert_get_prog_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_dev_over_temperature_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_prog_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_DEV_OVER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_dev_under_temperature_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_prog_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_DEV_UNDER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_corrected_volatile_mem_err_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_prog_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_CORR_VOLATILE_MEM_ERR_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_corrected_pmem_err_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd)
+{
+	cmd_alert_get_prog_alerts_field(
+		cmd,
+		CXL_CMD_ALERT_CONFIG_PROG_ALERTS_CORR_PMEM_ERR_PROG_WARN_THRESHOLD_MASK);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_life_used_crit_alert_threshold(struct cxl_cmd *cmd)
+{
+	cmd_get_field_u8(cmd, get_alert_config, GET_ALERT_CONFIG,
+			 life_used_crit_alert_threshold);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_life_used_prog_warn_threshold(struct cxl_cmd *cmd)
+{
+	cmd_get_field_u8(cmd, get_alert_config, GET_ALERT_CONFIG,
+			 life_used_prog_warn_threshold);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_dev_over_temperature_crit_alert_threshold(
+	struct cxl_cmd *cmd)
+{
+	cmd_get_field_u16(cmd, get_alert_config, GET_ALERT_CONFIG,
+			  dev_over_temperature_crit_alert_threshold);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_dev_under_temperature_crit_alert_threshold(
+	struct cxl_cmd *cmd)
+{
+	cmd_get_field_u16(cmd, get_alert_config, GET_ALERT_CONFIG,
+			  dev_under_temperature_crit_alert_threshold);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_dev_over_temperature_prog_warn_threshold(
+	struct cxl_cmd *cmd)
+{
+	cmd_get_field_u16(cmd, get_alert_config, GET_ALERT_CONFIG,
+			  dev_over_temperature_prog_warn_threshold);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_dev_under_temperature_prog_warn_threshold(
+	struct cxl_cmd *cmd)
+{
+	cmd_get_field_u16(cmd, get_alert_config, GET_ALERT_CONFIG,
+			  dev_under_temperature_prog_warn_threshold);
+}
+
+CXL_EXPORT int
+cxl_cmd_alert_config_get_corrected_volatile_mem_err_prog_warn_threshold(
+	struct cxl_cmd *cmd)
+{
+	cmd_get_field_u16(cmd, get_alert_config, GET_ALERT_CONFIG,
+			  corrected_volatile_mem_err_prog_warn_threshold);
+}
+
+CXL_EXPORT int cxl_cmd_alert_config_get_corrected_pmem_err_prog_warn_threshold(
+	struct cxl_cmd *cmd)
+{
+	cmd_get_field_u16(cmd, get_alert_config, GET_ALERT_CONFIG,
+			  corrected_pmem_err_prog_warn_threshold);
+}
+
 CXL_EXPORT struct cxl_cmd *cxl_cmd_new_get_health_info(
 		struct cxl_memdev *memdev)
 {
diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
index 8bb91e0..d63fde9 100644
--- a/cxl/lib/libcxl.sym
+++ b/cxl/lib/libcxl.sym
@@ -217,3 +217,26 @@  global:
 	cxl_decoder_get_max_available_extent;
 	cxl_decoder_get_region;
 } LIBCXL_2;
+
+LIBCXL_4 {
+global:
+	cxl_cmd_new_get_alert_config;
+	cxl_cmd_alert_config_life_used_prog_warn_threshold_valid;
+	cxl_cmd_alert_config_dev_over_temperature_prog_warn_threshold_valid;
+	cxl_cmd_alert_config_dev_under_temperature_prog_warn_threshold_valid;
+	cxl_cmd_alert_config_corrected_volatile_mem_err_prog_warn_threshold_valid;
+	cxl_cmd_alert_config_corrected_pmem_err_prog_warn_threshold_valid;
+	cxl_cmd_alert_config_life_used_prog_warn_threshold_writable;
+	cxl_cmd_alert_config_dev_over_temperature_prog_warn_threshold_writable;
+	cxl_cmd_alert_config_dev_under_temperature_prog_warn_threshold_writable;
+	cxl_cmd_alert_config_corrected_volatile_mem_err_prog_warn_threshold_writable;
+	cxl_cmd_alert_config_corrected_pmem_err_prog_warn_threshold_writable;
+	cxl_cmd_alert_config_get_life_used_crit_alert_threshold;
+	cxl_cmd_alert_config_get_life_used_prog_warn_threshold;
+	cxl_cmd_alert_config_get_dev_over_temperature_crit_alert_threshold;
+	cxl_cmd_alert_config_get_dev_under_temperature_crit_alert_threshold;
+	cxl_cmd_alert_config_get_dev_over_temperature_prog_warn_threshold;
+	cxl_cmd_alert_config_get_dev_under_temperature_prog_warn_threshold;
+	cxl_cmd_alert_config_get_corrected_volatile_mem_err_prog_warn_threshold;
+	cxl_cmd_alert_config_get_corrected_pmem_err_prog_warn_threshold;
+} LIBCXL_3;
diff --git a/cxl/lib/private.h b/cxl/lib/private.h
index 437eade..777c6f1 100644
--- a/cxl/lib/private.h
+++ b/cxl/lib/private.h
@@ -228,6 +228,44 @@  struct cxl_cmd_get_health_info {
 	le32 pmem_errors;
 } __attribute__((packed));
 
+/* CXL 3.0 8.2.9.8.3.2 Get Alert Configuration */
+struct cxl_cmd_get_alert_config {
+	u8 valid_alerts;
+	u8 programmable_alerts;
+	u8 life_used_crit_alert_threshold;
+	u8 life_used_prog_warn_threshold;
+	le16 dev_over_temperature_crit_alert_threshold;
+	le16 dev_under_temperature_crit_alert_threshold;
+	le16 dev_over_temperature_prog_warn_threshold;
+	le16 dev_under_temperature_prog_warn_threshold;
+	le16 corrected_volatile_mem_err_prog_warn_threshold;
+	le16 corrected_pmem_err_prog_warn_threshold;
+} __attribute__((packed));
+
+/* CXL 3.0 8.2.9.8.3.2 Get Alert Configuration Byte 0 Valid Alerts */
+#define CXL_CMD_ALERT_CONFIG_VALID_ALERTS_LIFE_USED_PROG_WARN_THRESHOLD_MASK   \
+	BIT(0)
+#define CXL_CMD_ALERT_CONFIG_VALID_ALERTS_DEV_OVER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK \
+	BIT(1)
+#define CXL_CMD_ALERT_CONFIG_VALID_ALERTS_DEV_UNDER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK \
+	BIT(2)
+#define CXL_CMD_ALERT_CONFIG_VALID_ALERTS_CORR_VOLATILE_MEM_ERR_PROG_WARN_THRESHOLD_MASK \
+	BIT(3)
+#define CXL_CMD_ALERT_CONFIG_VALID_ALERTS_CORR_PMEM_ERR_PROG_WARN_THRESHOLD_MASK \
+	BIT(4)
+
+/* CXL 3.0 8.2.9.8.3.2 Get Alert Configuration Byte 1 Programmable Alerts */
+#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_LIEF_USED_PROG_WARN_THRESHOLD_MASK    \
+	BIT(0)
+#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_DEV_OVER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK \
+	BIT(1)
+#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_DEV_UNDER_TEMPERATURE_PROG_WARN_THRESHOLD_MASK \
+	BIT(2)
+#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_CORR_VOLATILE_MEM_ERR_PROG_WARN_THRESHOLD_MASK \
+	BIT(3)
+#define CXL_CMD_ALERT_CONFIG_PROG_ALERTS_CORR_PMEM_ERR_PROG_WARN_THRESHOLD_MASK \
+	BIT(4)
+
 struct cxl_cmd_get_partition {
 	le64 active_volatile;
 	le64 active_persistent;
diff --git a/cxl/libcxl.h b/cxl/libcxl.h
index 9fe4e99..8b4b182 100644
--- a/cxl/libcxl.h
+++ b/cxl/libcxl.h
@@ -354,6 +354,41 @@  int cxl_cmd_health_info_get_temperature(struct cxl_cmd *cmd);
 int cxl_cmd_health_info_get_dirty_shutdowns(struct cxl_cmd *cmd);
 int cxl_cmd_health_info_get_volatile_errors(struct cxl_cmd *cmd);
 int cxl_cmd_health_info_get_pmem_errors(struct cxl_cmd *cmd);
+struct cxl_cmd *cxl_cmd_new_get_alert_config(struct cxl_memdev *memdev);
+int cxl_cmd_alert_config_life_used_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_dev_over_temperature_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_dev_under_temperature_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_corrected_volatile_mem_err_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_corrected_pmem_err_prog_warn_threshold_valid(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_life_used_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_dev_over_temperature_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_dev_under_temperature_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_corrected_volatile_mem_err_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_corrected_pmem_err_prog_warn_threshold_writable(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_life_used_crit_alert_threshold(struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_life_used_prog_warn_threshold(struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_dev_over_temperature_crit_alert_threshold(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_dev_under_temperature_crit_alert_threshold(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_dev_over_temperature_prog_warn_threshold(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_dev_under_temperature_prog_warn_threshold(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_corrected_volatile_mem_err_prog_warn_threshold(
+	struct cxl_cmd *cmd);
+int cxl_cmd_alert_config_get_corrected_pmem_err_prog_warn_threshold(
+	struct cxl_cmd *cmd);
 struct cxl_cmd *cxl_cmd_new_read_label(struct cxl_memdev *memdev,
 		unsigned int offset, unsigned int length);
 ssize_t cxl_cmd_read_label_get_payload(struct cxl_cmd *cmd, void *buf,