]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
nfit_test Make private definitions to command emulation
authorYasunori Goto <y-goto@jp.fujitsu.com>
Fri, 22 Sep 2017 07:46:26 +0000 (16:46 +0900)
committerDan Williams <dan.j.williams@intel.com>
Thu, 28 Sep 2017 16:22:07 +0000 (09:22 -0700)
Move private definitions to command emulation.
These definitions were originally defined at include/uapi/linux/ndctl.h,
but they are used at only nfit_test emulation now.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/nvdimm/test/nfit_test.h

index d3d63dd5ed38e4d93d5d1edb4db6cc04fde9719f..52c83be9dcfade2cb7e5a4f5d24220402c798199 100644 (file)
@@ -32,6 +32,53 @@ struct nfit_test_resource {
        void *buf;
 };
 
+#define ND_TRANSLATE_SPA_STATUS_INVALID_SPA  2
+
+/* nfit commands */
+enum nfit_cmd_num {
+       NFIT_CMD_TRANSLATE_SPA = 5,
+       NFIT_CMD_ARS_INJECT_SET = 7,
+       NFIT_CMD_ARS_INJECT_CLEAR = 8,
+       NFIT_CMD_ARS_INJECT_GET = 9,
+};
+
+struct nd_cmd_translate_spa {
+       __u64 spa;
+       __u32 status;
+       __u8  flags;
+       __u8  _reserved[3];
+       __u64 translate_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;
+
 union acpi_object;
 typedef void *acpi_handle;