Messages in this thread | | | Date | Tue, 28 Apr 2015 05:46:24 -0700 | From | Christoph Hellwig <> | 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..
| |