All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-nvdimm <linux-nvdimm@ml01.01.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	X86 ML <x86@kernel.org>, Jens Axboe <axboe@kernel.dk>
Subject: Re: [Linux-nvdimm] [PATCH 3/3] x86: add support for the non-standard protected e820 type
Date: Wed, 25 Mar 2015 13:35:03 -0700	[thread overview]
Message-ID: <CAPcyv4iDrc05rHaMr9pfaYOGj=c7Jx3O5pUo+s=OEjjvr=3Khw@mail.gmail.com> (raw)
In-Reply-To: <1427299449-26722-4-git-send-email-hch@lst.de>

On Wed, Mar 25, 2015 at 9:04 AM, Christoph Hellwig <hch@lst.de> wrote:
> Various recent bioses support NVDIMMs or ADR using a non-standard
> e820 memory type, and Intel supplied reference Linux code using this
> type to various vendors.
>
> Wire this e820 table type up to export platform devices for the pmem
> driver so that we can use it in Linux, and also provide a memmap=
> argument to manually tag memory as protected, which can be used
> if the bios doesn't use the standard nonstandard interface, or
> we just want to test the pmem driver with regular memory.
>
> Based on an earlier patch from Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
[..]
> +static __init int register_pmem_devices(void)
> +{
> +       int i;
> +
> +       for (i = 0; i < e820.nr_map; i++) {
> +               struct e820entry *ei = &e820.map[i];
> +
> +               if (ei->type == E820_PROTECTED_KERN) {
> +                       struct resource res = {
> +                               .flags  = IORESOURCE_MEM,
> +                               .start  = ei->addr,
> +                               .end    = ei->addr + ei->size - 1,
> +                       };
> +                       register_pmem_device(&res);
> +               }
> +       }
> +
> +       return 0;
> +}

Aside from the s/E820_PROTECTED_KERN/E820_PMEM/ suggestion this looks
ok to me.  The "vaporware" new way can be a superset of this
mechanism.

  parent reply	other threads:[~2015-03-25 20:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 16:04 another pmem variant Christoph Hellwig
2015-03-25 16:04 ` [PATCH 1/3] pmem: Initial version of persistent memory driver Christoph Hellwig
2015-03-25 20:19   ` Paul Bolle
2015-03-25 20:26     ` Ross Zwisler
2015-03-26  8:04       ` Christoph Hellwig
2015-03-25 20:21   ` Ross Zwisler
2015-03-26  8:06     ` Christoph Hellwig
2015-05-04 16:43       ` Ross Zwisler
2015-05-04 16:43         ` Ross Zwisler
2015-05-07  7:26         ` Christoph Hellwig
2015-05-07  8:35           ` Boaz Harrosh
2015-03-25 16:04 ` [PATCH 2/3] x86: add a is_e820_ram() helper Christoph Hellwig
2015-03-26  2:15   ` [Linux-nvdimm] " Dan Williams
2015-03-26  8:01     ` Christoph Hellwig
2015-03-26 13:57       ` Dan Williams
2015-03-26 14:32         ` Christoph Hellwig
2015-03-25 16:04 ` [PATCH 3/3] x86: add support for the non-standard protected e820 type Christoph Hellwig
2015-03-25 19:47   ` Elliott, Robert (Server Storage)
2015-03-26  8:02     ` Christoph Hellwig
2015-03-25 20:23   ` Ross Zwisler
2015-03-25 20:29     ` [Linux-nvdimm] " Dan Williams
2015-03-25 20:25   ` Ross Zwisler
2015-03-26  8:03     ` Christoph Hellwig
2015-03-25 20:35   ` Dan Williams [this message]
2015-03-25 16:33 ` [Linux-nvdimm] another pmem variant Dan Williams
2015-03-25 16:44   ` Christoph Hellwig
2015-03-25 17:00     ` Dan Williams
2015-03-25 17:04       ` Christoph Hellwig
2015-03-25 17:18         ` Dan Williams
2015-04-13  9:01       ` Greg KH
2015-04-13 16:02         ` Dan Williams
2015-03-25 18:09 ` Brooks, Adam J
2015-03-25 18:09   ` Brooks, Adam J
2015-03-25 18:46   ` Christoph Hellwig
2015-03-25 21:02 ` Ross Zwisler

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='CAPcyv4iDrc05rHaMr9pfaYOGj=c7Jx3O5pUo+s=OEjjvr=3Khw@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=x86@kernel.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 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.