[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150428124624.GA20681@infradead.org>
Date: Tue, 28 Apr 2015 05:46:24 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-nvdimm@...1.01.org, Ingo Molnar <mingo@...nel.org>,
linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...capital.net>,
Jens Axboe <axboe@...com>, "H. Peter Anvin" <hpa@...or.com>,
Christoph Hellwig <hch@....de>
Subject: Re: [Linux-nvdimm] [PATCH 01/21] e820, efi: add ACPI 6.0 persistent
memory types
On Fri, Apr 17, 2015 at 09:35:19PM -0400, Dan Williams wrote:
> diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
> index c52d7540dc05..cd8b7485e396 100644
> --- a/arch/ia64/kernel/efi.c
> +++ b/arch/ia64/kernel/efi.c
> @@ -1227,6 +1227,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
> case EFI_RUNTIME_SERVICES_CODE:
> case EFI_RUNTIME_SERVICES_DATA:
> case EFI_ACPI_RECLAIM_MEMORY:
> + case EFI_PERSISTENT_MEMORY:
> default:
> name = "reserved";
You probably want pmem as name here..
> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> index 11cc7d54ec3f..410af501a941 100644
> --- a/arch/x86/kernel/e820.c
> +++ b/arch/x86/kernel/e820.c
> @@ -137,6 +137,8 @@ static void __init e820_print_type(u32 type)
> case E820_RESERVED_KERN:
> printk(KERN_CONT "usable");
> break;
> + case E820_PMEM:
> + case E820_PRAM:
> case E820_RESERVED:
> printk(KERN_CONT "reserved");
> break;
> @@ -149,9 +151,6 @@ static void __init e820_print_type(u32 type)
> case E820_UNUSABLE:
> printk(KERN_CONT "unusable");
> break;
> - case E820_PRAM:
> - printk(KERN_CONT "persistent (type %u)", type);
> - break;
Please keep this printk, and add the new E820_PMEM case to it as well.
> +static bool do_mark_busy(u32 type, struct resource *res)
> +{
> + if (res->start < (1ULL<<20))
> + return true;
> +
> + switch (type) {
> + case E820_RESERVED:
> + case E820_PRAM:
> + case E820_PMEM:
> + return false;
> + default:
> + return true;
> + }
> +}
Please add a comment explaining the choices once you start refactoring
this. Especially the address check is black magic..
--
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