diff options
| author | Vishal Verma <vishal.l.verma@intel.com> | 2015-07-09 15:25:36 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2015-07-27 22:53:19 -0400 |
| commit | 39c686b862cdb2049b90e095b6c6c727b2a7ab60 (patch) | |
| tree | 4858a38b3c4441bad3e9599ff8cf0de01be13817 /include/uapi/linux | |
| parent | ec92777f2ba93c00387b8fe53780c25adc57c744 (diff) | |
libnvdimm: Add DSM support for Address Range Scrub commands
Add support for the three ARS DSM commands:
- Query ARS Capabilities - Queries the firmware to check if a given
range supports scrub, and if so, which type (persistent vs. volatile)
- Start ARS - Starts a scrub for a given range/type
- Query ARS Status - Checks status of a previously started scrub, and
provides the error logs if any.
The commands are described by the example DSM spec at:
http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
Also add these commands to the nfit_test test framework, and return
canned data.
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/ndctl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index e94bc20016b2..5b4a4be06e2b 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h | |||
| @@ -111,6 +111,11 @@ enum { | |||
| 111 | ND_CMD_VENDOR = 9, | 111 | ND_CMD_VENDOR = 9, |
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | enum { | ||
| 115 | ND_ARS_VOLATILE = 1, | ||
| 116 | ND_ARS_PERSISTENT = 2, | ||
| 117 | }; | ||
| 118 | |||
| 114 | static inline const char *nvdimm_bus_cmd_name(unsigned cmd) | 119 | static inline const char *nvdimm_bus_cmd_name(unsigned cmd) |
| 115 | { | 120 | { |
| 116 | static const char * const names[] = { | 121 | static const char * const names[] = { |
| @@ -194,4 +199,9 @@ enum nd_driver_flags { | |||
| 194 | enum { | 199 | enum { |
| 195 | ND_MIN_NAMESPACE_SIZE = 0x00400000, | 200 | ND_MIN_NAMESPACE_SIZE = 0x00400000, |
| 196 | }; | 201 | }; |
| 202 | |||
| 203 | enum ars_masks { | ||
| 204 | ARS_STATUS_MASK = 0x0000FFFF, | ||
| 205 | ARS_EXT_STATUS_SHIFT = 16, | ||
| 206 | }; | ||
| 197 | #endif /* __NDCTL_H__ */ | 207 | #endif /* __NDCTL_H__ */ |
