Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1266672

Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru.

From Jeff Moyer <jmoyer@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru.
Date 2015-11-10 19:00 +0100
Message-ID <qtln3-8aF-1@gated-at.bofh.it> (permalink)
References <qrXG9-29C-5@gated-at.bofh.it> <qrXG9-29C-5@gated-at.bofh.it> <qrXGa-29C-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Jerry Hoemann <jerry.hoemann@hpe.com> writes:

> Add IOCTL type 'P' to denote NVDIMM_TYPE_PASSTHRU.

Can't you just make passthrough a separate command?  If you actually add
the ioctl definition for passthrough (which you didn't do for some
reason?), it looks odd:

#define ND_IOCTL_PASSTHRU        _IOWR(NVDIMM_TYPE_PASSTHRU,, ND_CMD_PASSTHRU, \
                                 struct ndn_package)

Care to comment on why you chose a different type instead of specifying
a new command?

> +struct ndn_pkg {
> +	struct {
> +		__u8	dsm_uuid[16];
> +		__u32	dsm_in;			/* size of _DSM input    */
> +		__u32	dsm_out;		/* size of user buffer   */
> +		__u32	dsm_rev;		/* revision of dsm call  */
> +		__u32	res[8];			/* reserved must be zero */
> +		__u32	dsm_size;		/* size _DSM would write */
> +	} h;
> +	unsigned char buf[];

Please change that to:
	__u8 *buf;
since acpi_object.buffer.pointer is a u8 *.

Note that the size of this structure will be different for 32 vs. 64
bit, but I don't think it matters since offsets won't change (the
pointer is at the end of the structure).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-11-06 23:30 +0100
  [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-11-06 23:30 +0100
    Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jeff Moyer <jmoyer@redhat.com> - 2015-11-10 19:00 +0100
      Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Dan Williams <dan.j.williams@intel.com> - 2015-11-10 19:10 +0100
      Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-11-10 20:50 +0100
        Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jeff Moyer <jmoyer@redhat.com> - 2015-11-10 21:30 +0100
          Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-11-11 01:50 +0100
            Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Dan Williams <dan.j.williams@intel.com> - 2015-11-11 01:50 +0100
            Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jeff Moyer <jmoyer@redhat.com> - 2015-11-11 16:50 +0100
        Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Dan Williams <dan.j.williams@intel.com> - 2015-11-10 21:30 +0100
          Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Linda Knippers <linda.knippers@hpe.com> - 2015-11-10 22:00 +0100
            Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Dan Williams <dan.j.williams@intel.com> - 2015-11-10 23:30 +0100
    RE: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. "Elliott, Robert (Persistent Memory)" <elliott@hpe.com> - 2015-11-10 20:10 +0100
      Re: [PATCH 1/4] nvdimm: Add wrapper for IOCTL pass thru. Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-11-10 22:40 +0100
  Re: [PATCH 0/4] nvdimm: Add an IOCTL pass thru for DSM calls Jeff Moyer <jmoyer@redhat.com> - 2015-11-10 16:40 +0100
    Re: [PATCH 0/4] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-11-10 22:40 +0100

csiph-web