libnvdimm, pfn: add 'align' attribute, default to HPAGE_SIZE
authorDan Williams <dan.j.williams@intel.com>
Thu, 10 Dec 2015 22:45:23 +0000 (14:45 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 12 Dec 2015 23:04:26 +0000 (15:04 -0800)
commit315c562536c42aa4da9b6c5a2135dd6715a5e0b5
tree9fe06cfb4ec311ee22abb62fdc6ec6ebf24d2e21
parentf7c6ab80fa5fee3daccb83a3c1b3a9f39d7b931c
libnvdimm, pfn: add 'align' attribute, default to HPAGE_SIZE

When setting aside capacity for struct page it must be aligned to the
largest mapping size that is to be made available via DAX.  Make the
alignment configurable to enable support for 1GiB page-size mappings.

The offset for PFN_MODE_RAM may now be larger than SZ_8K, so fixup the
offset check in nvdimm_namespace_attach_pfn().

Reported-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/nd.h
drivers/nvdimm/pfn_devs.c
drivers/nvdimm/pmem.c