[PATCH v8 4/5] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

Aneesh Kumar K.V aneesh.kumar at linux.ibm.com
Wed May 27 19:55:21 AEST 2020


Vaibhav Jain <vaibhav at 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.kumar at linux.ibm.com>

> Cc: "Aneesh Kumar K . V" <aneesh.kumar at linux.ibm.com>
> Cc: Dan Williams <dan.j.williams at intel.com>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: Ira Weiny <ira.weiny at intel.com>
> Signed-off-by: Vaibhav Jain <vaibhav at linux.ibm.com>
> ---

-aneesh


More information about the Linuxppc-dev mailing list