diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 13:06:59 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 13:06:59 -0400 |
| commit | 1f716d05f8daee4f393dc568ea7a53c7ecfd0bfc (patch) | |
| tree | 3ba46ef65cd2fb1766934769c1d4a7fc16c3fe61 /include/uapi/linux | |
| parent | 2159669f581917c4d197d3ea183d3d85b47faf66 (diff) | |
| parent | a94e3fbe4d53d4e512c4ea88a475e605b8d8dccb (diff) | |
Merge branch 'for-4.7/dsm' into libnvdimm-for-next
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/ndctl.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 1eac426aead5..309915f74492 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h | |||
| @@ -159,6 +159,7 @@ enum { | |||
| 159 | ND_CMD_VENDOR_EFFECT_LOG_SIZE = 7, | 159 | ND_CMD_VENDOR_EFFECT_LOG_SIZE = 7, |
| 160 | ND_CMD_VENDOR_EFFECT_LOG = 8, | 160 | ND_CMD_VENDOR_EFFECT_LOG = 8, |
| 161 | ND_CMD_VENDOR = 9, | 161 | ND_CMD_VENDOR = 9, |
| 162 | ND_CMD_CALL = 10, | ||
| 162 | }; | 163 | }; |
| 163 | 164 | ||
| 164 | enum { | 165 | enum { |
| @@ -192,6 +193,7 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) | |||
| 192 | [ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size", | 193 | [ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size", |
| 193 | [ND_CMD_VENDOR_EFFECT_LOG] = "effect_log", | 194 | [ND_CMD_VENDOR_EFFECT_LOG] = "effect_log", |
| 194 | [ND_CMD_VENDOR] = "vendor", | 195 | [ND_CMD_VENDOR] = "vendor", |
| 196 | [ND_CMD_CALL] = "cmd_call", | ||
| 195 | }; | 197 | }; |
| 196 | 198 | ||
| 197 | if (cmd < ARRAY_SIZE(names) && names[cmd]) | 199 | if (cmd < ARRAY_SIZE(names) && names[cmd]) |
| @@ -260,4 +262,44 @@ enum ars_masks { | |||
| 260 | ARS_STATUS_MASK = 0x0000FFFF, | 262 | ARS_STATUS_MASK = 0x0000FFFF, |
| 261 | ARS_EXT_STATUS_SHIFT = 16, | 263 | ARS_EXT_STATUS_SHIFT = 16, |
| 262 | }; | 264 | }; |
| 265 | |||
| 266 | /* | ||
| 267 | * struct nd_cmd_pkg | ||
| 268 | * | ||
| 269 | * is a wrapper to a quasi pass thru interface for invoking firmware | ||
| 270 | * associated with nvdimms. | ||
| 271 | * | ||
| 272 | * INPUT PARAMETERS | ||
| 273 | * | ||
| 274 | * nd_family corresponds to the firmware (e.g. DSM) interface. | ||
| 275 | * | ||
| 276 | * nd_command are the function index advertised by the firmware. | ||
| 277 | * | ||
| 278 | * nd_size_in is the size of the input parameters being passed to firmware | ||
| 279 | * | ||
| 280 | * OUTPUT PARAMETERS | ||
| 281 | * | ||
| 282 | * nd_fw_size is the size of the data firmware wants to return for | ||
| 283 | * the call. If nd_fw_size is greater than size of nd_size_out, only | ||
| 284 | * the first nd_size_out bytes are returned. | ||
| 285 | */ | ||
| 286 | |||
| 287 | struct nd_cmd_pkg { | ||
| 288 | __u64 nd_family; /* family of commands */ | ||
| 289 | __u64 nd_command; | ||
| 290 | __u32 nd_size_in; /* INPUT: size of input args */ | ||
| 291 | __u32 nd_size_out; /* INPUT: size of payload */ | ||
| 292 | __u32 nd_reserved2[9]; /* reserved must be zero */ | ||
| 293 | __u32 nd_fw_size; /* OUTPUT: size fw wants to return */ | ||
| 294 | unsigned char nd_payload[]; /* Contents of call */ | ||
| 295 | }; | ||
| 296 | |||
| 297 | /* These NVDIMM families represent pre-standardization command sets */ | ||
| 298 | #define NVDIMM_FAMILY_INTEL 0 | ||
| 299 | #define NVDIMM_FAMILY_HPE1 1 | ||
| 300 | #define NVDIMM_FAMILY_HPE2 2 | ||
| 301 | |||
| 302 | #define ND_IOCTL_CALL _IOWR(ND_IOCTL, ND_CMD_CALL,\ | ||
| 303 | struct nd_cmd_pkg) | ||
| 304 | |||
| 263 | #endif /* __NDCTL_H__ */ | 305 | #endif /* __NDCTL_H__ */ |
