Skip to content
Commit d9cbe09d authored by Dan Williams's avatar Dan Williams
Browse files

libnvdimm, pmem: fix 'pfn' support for section-misaligned namespaces



The altmap for a section-misaligned namespace needs to arrange for the
base_pfn to be section-aligned.  As a result the 'reserve' region (pfns
from base that do not have a struct page) must be increased.  Otherwise
we trip the altmap validation check in __add_pages:

	if (altmap->base_pfn != phys_start_pfn
			|| vmem_altmap_offset(altmap) > nr_pages) {
		pr_warn_once("memory add fail, invalid altmap\n");
		return -EINVAL;
	}

Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent bc94b996
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment