Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1660027

[PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions

From Jerry Hoemann <jerry.hoemann@hpe.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions
Date 2017-06-07 19:10 +0200
Message-ID <tPMD1-11z-29@gated-at.bofh.it> (permalink)
References <tPMD0-11z-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


ACPI 6.2 added new NVDIMM root DSM functions.  Define their
data structures.

Update the definition of nd_cmd_ars_cap to match the 6.2 spec.

Add the new 6.2 functions names to nvdimm_bus_cmd_name.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 include/uapi/linux/ndctl.h | 44 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index e23c37f..bcaf79e 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -105,7 +105,8 @@ struct nd_cmd_ars_cap {
 	__u32 status;
 	__u32 max_ars_out;
 	__u32 clear_err_unit;
-	__u32 reserved;
+	__u16 flags;
+	__u16 reserved;
 } __packed;
 
 struct nd_cmd_ars_start {
@@ -144,6 +145,43 @@ struct nd_cmd_clear_error {
 	__u64 cleared;
 } __packed;
 
+struct nd_cmd_trans_spa {
+	__u64 spa;
+	__u32 status;
+	__u8  flags;
+	__u8  _reserved[3];
+	__u64 trans_length;
+	__u32 num_nvdimms;
+	struct nd_nvdimm_device {
+		__u32 nfit_device_handle;
+		__u32 _reserved;
+		__u64 dpa;
+	} __packed devices[0];
+
+} __packed;
+
+struct nd_cmd_ars_err_inj {
+	__u64 err_inj_spa_range_base;
+	__u64 err_inj_spa_range_length;
+	__u8  err_inj_options;
+	__u32 status;
+} __packed;
+
+struct nd_cmd_ars_err_inj_clr {
+	__u64 err_inj_clr_spa_range_base;
+	__u64 err_inj_clr_spa_range_length;
+	__u32 status;
+} __packed;
+
+struct nd_cmd_ars_err_inj_stat {
+	__u32 status;
+	__u32 inj_err_rec_count;
+	struct nd_error_stat_query_record {
+		__u64 err_inj_stat_spa_range_base;
+		__u64 err_inj_stat_spa_range_length;
+	} __packed record[0];
+} __packed;
+
 enum {
 	ND_CMD_IMPLEMENTED = 0,
 
@@ -179,6 +217,10 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd)
 		[ND_CMD_ARS_START] = "ars_start",
 		[ND_CMD_ARS_STATUS] = "ars_status",
 		[ND_CMD_CLEAR_ERROR] = "clear_error",
+		[5] = "trans_spa",
+		[7] = "ars_err_inj",
+		[8] = "ars_err_inj_clr",
+		[9] = "ars_err_inj_stat",
 		[ND_CMD_CALL] = "cmd_call",
 	};
 
-- 
1.8.5.6

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] Enable DSM pass thru for root functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-07 19:10 +0200
  [PATCH 1/3] libnvdimm: passthru functions clear to send Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-07 19:10 +0200
  [PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-07 19:10 +0200
    Re: [PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-08 10:10 +0200
      Re: [PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions Dan Williams <dan.j.williams@intel.com> - 2017-06-09 07:30 +0200
        Re: [PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-09 19:00 +0200
          Re: [PATCH 3/3] libnvdimm: New ACPI 6.2 DSM functions Dan Williams <dan.j.williams@intel.com> - 2017-06-09 19:20 +0200

csiph-web