public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] nvdimm: Add an IOCTL pass thru for DSM calls
@ 2015-11-16 18:38 Jerry Hoemann
  2015-11-16 18:38 ` [PATCH v2 1/3] nvdimm: Clean-up access mode check Jerry Hoemann
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jerry Hoemann @ 2015-11-16 18:38 UTC (permalink / raw)
  To: ross.zwisler, rjw, lenb, dan.j.williams, elliott, jmoyer,
	krivenok.dmitry, linda.knippers
  Cc: linux-nvdimm, linux-acpi, linux-kernel, Jerry Hoemann


The NVDIMM code in the kernel supports an IOCTL interface to user
space based upon the Intel Example DSM:

	http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf

This interface cannot be used by other NVDIMM DSMs that support
incompatible functions.

This patch set adds a generic "passthru" IOCTL interface which
is not tied to a particular DSM.

A new _IOC_NR ND_CMD_PASSTHRU == "100" is added for the pass thru call.

The new data structure nd_passthru_pkg serves as a wrapper for the passthru
calls.  This wrapper supplies the data that the kernel needs to
make the _DSM call.

Unlike the definitions of the _DSM functions themselves, the nd_passthru_pkg
provides the calling information (input/output sizes) in an uniform
manner making the kernel marshaling of the arguments straight
forward.

This shifts the marshaling burden from the kernel to the user
space application while still permitting the kernel to internally
call _DSM functions.

To make the resultant kernel code easier to understand the existing
functions acpi_nfit_ctl and __nd_ioctl were renamed to .*_intel to
denote calling mechanism as in 4.3 tailored to the Intel Example DSM.
New functions acpi_nfit_ctl_passthru and __nd_ioctl_passthru were
created to supply the pass thru interface.


These changes are based upon the 4.3 kernel.


Changes in version 2:
---------------------
1. Cleanup access mode check in nd_ioctl and nvdimm_ioctl.
2. Change name of ndn_pkg to nd_passthru_pkg
3. Adjust sizes in nd_passthru_pkg. DSM intergers are 64 bit.
4. No new ioctl type, instead tunnel into the existing number space.
5. Push down one function level where determine ioctl cmd type.
6. re-work diagnostic print/dump message in pass-thru functions.



Jerry Hoemann (3):
  nvdimm: Clean-up access mode check.
  nvdimm: Add wrapper for IOCTL pass thru
  nvdimm: Add IOCTL pass thru functions

 drivers/acpi/nfit.c        |  93 ++++++++++++++++++++++++++++++++++++++++-
 drivers/nvdimm/bus.c       | 101 +++++++++++++++++++++++++++++++++++++++++----
 include/uapi/linux/ndctl.h |  16 +++++++
 3 files changed, 202 insertions(+), 8 deletions(-)

-- 
1.7.11.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-11-18  7:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 18:38 [PATCH v2 0/3] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann
2015-11-16 18:38 ` [PATCH v2 1/3] nvdimm: Clean-up access mode check Jerry Hoemann
2015-11-16 18:38 ` [PATCH v2 2/3] nvdimm: Add wrapper for IOCTL pass thru Jerry Hoemann
2015-11-16 18:38 ` [PATCH v2 3/3] nvdimm: Add IOCTL pass thru functions Jerry Hoemann
2015-11-16 19:00 ` [PATCH v2 0/3] nvdimm: Add an IOCTL pass thru for DSM calls Dan Williams
2015-11-16 21:10   ` Jerry Hoemann
2015-11-17  1:29     ` Dan Williams
2015-11-17 16:56       ` Jerry Hoemann
2015-11-17 17:05         ` Dan Williams
2015-11-18  7:01           ` Jerry Hoemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox