From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
"Elliott, Robert (Persistent Memory)" <elliott@hpe.com>,
jmoyer <jmoyer@redhat.com>,
Dmitry Krivenok <krivenok.dmitry@gmail.com>,
Linda Knippers <linda.knippers@hpe.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] nvdimm: Add IOCTL pass thru functions
Date: Fri, 11 Dec 2015 11:09:50 -0700 [thread overview]
Message-ID: <20151211180950.GA57513@tevye.fc.hp.com> (raw)
In-Reply-To: <CAPcyv4guEsT0KKivDkKP3YiW=8Ps8cDkjzY0seQuec3mkg0wMg@mail.gmail.com>
On Wed, Dec 09, 2015 at 04:48:55PM -0800, Dan Williams wrote:
>
> Yes, still very much interested in this path. But the code will need
> to be around for quite awhile now that it has appeared in a released
> kernel and a released version of ndctl. So anything that makes the
> code more maintainable in the interim is beneficial.
>
> > If yes, the work we need to do to integrate these two different approaches
> > will just need to be undone. Further if we deprecate the current IOCTLs,
> > then the nd_cmd_desc tables and related nd_cmd_in_size and nd_cmd_out_size
> > could then be removed.
>
> I'm not seeing this as a large amount of work. Do you want to hand
> off this task to me?
I have implemented this and will send as part of next version.
>
> > ACPI defines arguments to a _DSM as 64 bit quantities. We want the interface
> > exported to the user to follow the ACPI spec. The variables above collect
> > the value of rev or func from the two different sources (wrapper or legacy)
> > and then passes to acpi_evaluate_dsm which defines the parameters as simple
> > ints.
> >
> > So, going from user interface to call of acpi_evaluate_dsm there will be
> > a truncation somewhere.
> >
> > Looking at acpi_evaluate_dsm(), it uses union acpi_object and fills in
> > .integer.value for both rev and func. These are defined as u64.
> >
> > So patching acpi_evaluate_dsm to make the rev and func parameters u64 might
> > be do'able, but we'd still have potential sign issues with other callers
> > to acpi_evaluate_dsm which look to be using simple ints in the call.
> >
> > Do you want me to look at patching acpi_evaluate_dsm (and possibly
> > its callers) as part of this patch set?
>
> Yes, updating the acpi_evaluate_dsm() definition seems the best choice.
>
I have a patch for this. While not big (6 files), these files are
outside of nvdimm and will have a two line of over a dozen reviewers/lists
not previously reviewing this series.
Do you want me to send this patch as one of this series (w/ the
extra reviewers?)
Or as separate stand alone to just those reviewers (and yourself.)
(and if this option, before or after this series.)
-----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
-----------------------------------------------------------------------------
WARNING: multiple messages have this Message-ID (diff)
From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
"Elliott, Robert (Persistent Memory)" <elliott@hpe.com>,
jmoyer <jmoyer@redhat.com>,
Dmitry Krivenok <krivenok.dmitry@gmail.com>,
Linda Knippers <linda.knippers@hpe.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] nvdimm: Add IOCTL pass thru functions
Date: Fri, 11 Dec 2015 11:09:50 -0700 [thread overview]
Message-ID: <20151211180950.GA57513@tevye.fc.hp.com> (raw)
In-Reply-To: <CAPcyv4guEsT0KKivDkKP3YiW=8Ps8cDkjzY0seQuec3mkg0wMg@mail.gmail.com>
On Wed, Dec 09, 2015 at 04:48:55PM -0800, Dan Williams wrote:
>
> Yes, still very much interested in this path. But the code will need
> to be around for quite awhile now that it has appeared in a released
> kernel and a released version of ndctl. So anything that makes the
> code more maintainable in the interim is beneficial.
>
> > If yes, the work we need to do to integrate these two different approaches
> > will just need to be undone. Further if we deprecate the current IOCTLs,
> > then the nd_cmd_desc tables and related nd_cmd_in_size and nd_cmd_out_size
> > could then be removed.
>
> I'm not seeing this as a large amount of work. Do you want to hand
> off this task to me?
I have implemented this and will send as part of next version.
>
> > ACPI defines arguments to a _DSM as 64 bit quantities. We want the interface
> > exported to the user to follow the ACPI spec. The variables above collect
> > the value of rev or func from the two different sources (wrapper or legacy)
> > and then passes to acpi_evaluate_dsm which defines the parameters as simple
> > ints.
> >
> > So, going from user interface to call of acpi_evaluate_dsm there will be
> > a truncation somewhere.
> >
> > Looking at acpi_evaluate_dsm(), it uses union acpi_object and fills in
> > .integer.value for both rev and func. These are defined as u64.
> >
> > So patching acpi_evaluate_dsm to make the rev and func parameters u64 might
> > be do'able, but we'd still have potential sign issues with other callers
> > to acpi_evaluate_dsm which look to be using simple ints in the call.
> >
> > Do you want me to look at patching acpi_evaluate_dsm (and possibly
> > its callers) as part of this patch set?
>
> Yes, updating the acpi_evaluate_dsm() definition seems the best choice.
>
I have a patch for this. While not big (6 files), these files are
outside of nvdimm and will have a two line of over a dozen reviewers/lists
not previously reviewing this series.
Do you want me to send this patch as one of this series (w/ the
extra reviewers?)
Or as separate stand alone to just those reviewers (and yourself.)
(and if this option, before or after this series.)
-----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
-----------------------------------------------------------------------------
next prev parent reply other threads:[~2015-12-11 18:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 21:05 [PATCH v3 0/3] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann
2015-12-02 21:05 ` Jerry Hoemann
2015-12-02 21:05 ` [PATCH v3 1/3] nvdimm: Clean-up access mode check Jerry Hoemann
2015-12-02 21:05 ` Jerry Hoemann
2015-12-02 21:05 ` [PATCH v3 2/3] nvdimm: Add wrapper for IOCTL pass thru Jerry Hoemann
2015-12-02 21:05 ` Jerry Hoemann
2015-12-02 21:05 ` [PATCH v3 3/3] nvdimm: Add IOCTL pass thru functions Jerry Hoemann
2015-12-02 21:05 ` Jerry Hoemann
2015-12-09 2:10 ` Dan Williams
2015-12-09 2:10 ` Dan Williams
2015-12-10 0:24 ` Jerry Hoemann
2015-12-10 0:24 ` Jerry Hoemann
2015-12-10 0:48 ` Dan Williams
2015-12-10 0:48 ` Dan Williams
2015-12-11 18:09 ` Jerry Hoemann [this message]
2015-12-11 18:09 ` Jerry Hoemann
2015-12-11 18:18 ` Dan Williams
2015-12-11 18:18 ` Dan Williams
2015-12-11 19:00 ` Jerry Hoemann
2015-12-11 19:00 ` Jerry Hoemann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151211180950.GA57513@tevye.fc.hp.com \
--to=jerry.hoemann@hpe.com \
--cc=dan.j.williams@intel.com \
--cc=elliott@hpe.com \
--cc=jmoyer@redhat.com \
--cc=krivenok.dmitry@gmail.com \
--cc=lenb@kernel.org \
--cc=linda.knippers@hpe.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rjw@rjwysocki.net \
--cc=ross.zwisler@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.