[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4iDrc05rHaMr9pfaYOGj=c7Jx3O5pUo+s=OEjjvr=3Khw@mail.gmail.com>
Date: Wed, 25 Mar 2015 13:35:03 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Christoph Hellwig <hch@....de>
Cc: linux-nvdimm <linux-nvdimm@...1.01.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
X86 ML <x86@...nel.org>, Jens Axboe <axboe@...nel.dk>
Subject: Re: [Linux-nvdimm] [PATCH 3/3] x86: add support for the non-standard
protected e820 type
On Wed, Mar 25, 2015 at 9:04 AM, Christoph Hellwig <hch@....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@...el.com>
> Signed-off-by: Christoph Hellwig <hch@....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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists