• Dan Williams's avatar
    libnvdimm, pmem: fix 'pfn' support for section-misaligned namespaces · d9cbe09d
    Dan Williams authored
    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>
    d9cbe09d
pfn.h 1.23 KB