[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQWUKiLLaRSZGCGDZYVuKRgXfCY=7zdx0gp8DM_kH-OBYg@mail.gmail.com>
Date: Thu, 2 Apr 2015 13:23:22 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: linux-nvdimm@...1.01.org, linux-fsdevel@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Jens Axboe <axboe@...nel.dk>, ross.zwisler@...ux.intel.com,
Boaz Harrosh <boaz@...xistor.com>
Subject: Re: [PATCH 1/2] x86: add support for the non-standard protected e820 type
On Wed, Apr 1, 2015 at 12:12 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.
>
> Based on arlier work from Dave Jiang <dave.jiang@...el.com> and
> Dan Williams <dan.j.williams@...el.com>.
>
...
> @@ -748,7 +758,7 @@ u64 __init early_reserve_e820(u64 size, u64 align)
> /*
> * Find the highest page frame number we have available
> */
> -static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type)
> +static unsigned long __init e820_end_pfn(unsigned long limit_pfn)
> {
> int i;
> unsigned long last_pfn = 0;
> @@ -759,7 +769,11 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type)
> unsigned long start_pfn;
> unsigned long end_pfn;
>
> - if (ei->type != type)
> + /*
> + * Persistent memory is accounted as ram for purposes of
> + * establishing max_pfn and mem_map.
> + */
> + if (ei->type != E820_RAM && ei->type != E820_PRAM)
> continue;
>
> start_pfn = ei->addr >> PAGE_SHIFT;
> @@ -784,12 +798,12 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type)
> }
> unsigned long __init e820_end_of_ram_pfn(void)
> {
> - return e820_end_pfn(MAX_ARCH_PFN, E820_RAM);
> + return e820_end_pfn(MAX_ARCH_PFN);
> }
>
> unsigned long __init e820_end_of_low_ram_pfn(void)
> {
> - return e820_end_pfn(1UL<<(32 - PAGE_SHIFT), E820_RAM);
> + return e820_end_pfn(1UL<<(32 - PAGE_SHIFT));
> }
You are using iomap_nocache to access pmem.
Do you still need to account E820_PRAM to get those end_of_ram ?
You should not need that to help to set kernel mapping.
So please drop those not needed changes.
Thanks
Yinghai
--
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