History

Merge branch 'for-4.7/dsm' into libnvdimm-for-next

Dan Williams committed 10 years ago

Commit 1f716d02 parents 2159669 a94e3fb11 files · +283 −58Browse files

Showing the changes to include/uapi (1 of 11 files). Show all

Unified · Split

include/uapi/linux/ndctl.h+42−0
@@ -159,6 +159,7 @@ enum { · 158 unmodified lines
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
164enum {165enum {
@@ -192,6 +193,7 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) · 27 unmodified lines
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 { · 62 unmodified lines
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
287struct 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__ */