diff options
author | Yasunori Goto <y-goto@jp.fujitsu.com> | 2017-09-22 03:46:26 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-09-28 12:22:07 -0400 |
commit | a586cb4937fa328a857c8d7fbefb986d347bd4a7 (patch) | |
tree | 841ba39e791b3061011963e70428672c4ad68161 /tools | |
parent | b18d4b8a25af6fe83d7692191d6ff962ea611c4f (diff) |
nfit_test Make private definitions to command emulation
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/nvdimm/test/nfit_test.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tools/testing/nvdimm/test/nfit_test.h b/tools/testing/nvdimm/test/nfit_test.h index d3d63dd5ed38..52c83be9dcfa 100644 --- a/tools/testing/nvdimm/test/nfit_test.h +++ b/tools/testing/nvdimm/test/nfit_test.h | |||
@@ -32,6 +32,53 @@ struct nfit_test_resource { | |||
32 | void *buf; | 32 | void *buf; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | #define ND_TRANSLATE_SPA_STATUS_INVALID_SPA 2 | ||
36 | |||
37 | /* nfit commands */ | ||
38 | enum nfit_cmd_num { | ||
39 | NFIT_CMD_TRANSLATE_SPA = 5, | ||
40 | NFIT_CMD_ARS_INJECT_SET = 7, | ||
41 | NFIT_CMD_ARS_INJECT_CLEAR = 8, | ||
42 | NFIT_CMD_ARS_INJECT_GET = 9, | ||
43 | }; | ||
44 | |||
45 | struct nd_cmd_translate_spa { | ||
46 | __u64 spa; | ||
47 | __u32 status; | ||
48 | __u8 flags; | ||
49 | __u8 _reserved[3]; | ||
50 | __u64 translate_length; | ||
51 | __u32 num_nvdimms; | ||
52 | struct nd_nvdimm_device { | ||
53 | __u32 nfit_device_handle; | ||
54 | __u32 _reserved; | ||
55 | __u64 dpa; | ||
56 | } __packed devices[0]; | ||
57 | |||
58 | } __packed; | ||
59 | |||
60 | struct nd_cmd_ars_err_inj { | ||
61 | __u64 err_inj_spa_range_base; | ||
62 | __u64 err_inj_spa_range_length; | ||
63 | __u8 err_inj_options; | ||
64 | __u32 status; | ||
65 | } __packed; | ||
66 | |||
67 | struct nd_cmd_ars_err_inj_clr { | ||
68 | __u64 err_inj_clr_spa_range_base; | ||
69 | __u64 err_inj_clr_spa_range_length; | ||
70 | __u32 status; | ||
71 | } __packed; | ||
72 | |||
73 | struct nd_cmd_ars_err_inj_stat { | ||
74 | __u32 status; | ||
75 | __u32 inj_err_rec_count; | ||
76 | struct nd_error_stat_query_record { | ||
77 | __u64 err_inj_stat_spa_range_base; | ||
78 | __u64 err_inj_stat_spa_range_length; | ||
79 | } __packed record[0]; | ||
80 | } __packed; | ||
81 | |||
35 | union acpi_object; | 82 | union acpi_object; |
36 | typedef void *acpi_handle; | 83 | typedef void *acpi_handle; |
37 | 84 | ||