Vaibhav Jain <vaib...@linux.ibm.com> writes: > Introduce support for PAPR NVDIMM Specific Methods (PDSM) in papr_scm > module and add the command family to the white list of NVDIMM command > sets. Also advertise support for ND_CMD_CALL for the nvdimm > command mask and implement necessary scaffolding in the module to > handle ND_CMD_CALL ioctl and PDSM requests that we receive. > > The layout of the PDSM request as we expect from libnvdimm/libndctl is > described in newly introduced uapi header 'papr_scm_pdsm.h' which > defines a new 'struct nd_pdsm_cmd_pkg' header. This header is used > to communicate the PDSM request via member > 'nd_pkg_papr_scm->nd_command' and size of payload that need to be > sent/received for servicing the PDSM. > > A new function is_cmd_valid() is implemented that reads the args to > papr_scm_ndctl() and performs sanity tests on them. A new function > papr_scm_service_pdsm() is introduced and is called from > papr_scm_ndctl() in case of a PDSM request is received via ND_CMD_CALL > command from libnvdimm. >
Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.ibm.com> > Cc: "Aneesh Kumar K . V" <aneesh.ku...@linux.ibm.com> > Cc: Dan Williams <dan.j.willi...@intel.com> > Cc: Michael Ellerman <m...@ellerman.id.au> > Cc: Ira Weiny <ira.we...@intel.com> > Signed-off-by: Vaibhav Jain <vaib...@linux.ibm.com> > --- -aneesh