From: Toshi Kani <toshi.kani@hpe.com>
To: Dan Williams <dan.j.williams@intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@suse.de>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2-UPDATE2 3/4] resource: Add device-managed insert/remove_resource()
Date: Tue, 08 Mar 2016 17:04:04 -0700 [thread overview]
Message-ID: <1457481844.15454.510.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4i2GwujqK=MDJpSKhvufJprmCV4vmQRpS_UP-n1kau+mg@mail.gmail.com>
On Tue, 2016-03-08 at 14:44 -0800, Dan Williams wrote:
> On Tue, Mar 8, 2016 at 2:23 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> > On Tue, Mar 8, 2016 at 12:59 PM, Dan Williams <dan.j.williams@intel.com
> > > wrote:
> > >
> > > Here's the usage patch from Toshi [1] (copied below). It is indeed a
> > > resource injected by nfit / nvdimm bus implementation. We just
> > > happen
> > > to support nfit and libnvdimm as modules.
> > >
> > > The goal of these patches is to use the ACPI NFIT data to create a
> > > "Persistent Memory" rather than "reserved" resource. This is for
> > > platform-firmware implementations that use E820-Type2 rather than
> > > E820-Type7 to describe pmem.
> >
> > So my worry is that there is likely exactly one or two of these kinds
> > of sites.
> >
> > Why couldn't they just use insert_resource() and then remove it
> > manually?
>
> You mean instead of introducing a devm_insert_resource() as a helpful
> first-class-citizen api, just arrange for the resource to be inserted
> locally? Sure.
>
> I assume Toshi was looking to keep the devm semantics like the rest of
> the nfit driver, but we can do that locally with devm_add_action() and
> skip the new general purpose api.
Yes, I prefer the devm semantics. insert_resource() and remove_resource()
are not exported interfaces. So, with devm_add_action(), we still need to
introduce built-in exported wrappers for insert/remove_resource(), unless
we change to export them directly. Since we need to export "something", I
think it is better to export their devm interfaces.
Thanks,
-Toshi
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-08 23:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 18:08 [PATCH v2-UPDATE2 3/4] resource: Add device-managed insert/remove_resource() Toshi Kani
2016-03-08 17:33 ` Ingo Molnar
2016-03-08 20:05 ` Linus Torvalds
2016-03-08 20:59 ` Dan Williams
2016-03-08 22:23 ` Linus Torvalds
2016-03-08 22:44 ` Dan Williams
2016-03-09 0:04 ` Toshi Kani [this message]
2016-03-08 23:31 ` Linus Torvalds
2016-03-09 1:00 ` Toshi Kani
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=1457481844.15454.510.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mingo@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).