libnvdimm, pfn, dax: show supported dax/pfn region alignments in sysfs
authorOliver O'Halloran <oohall@gmail.com>
Tue, 27 Jun 2017 09:56:12 +0000 (19:56 +1000)
committerDan Williams <dan.j.williams@intel.com>
Sat, 12 Aug 2017 01:06:16 +0000 (18:06 -0700)
commit1fdadbebc4f617c1ee4a1465ad173cc9e524089d
tree384190e78eece0bc5b079a4fda6389c0450f56c6
parentb2c48f9f95cba395e16020bef1fdfc248f53030c
libnvdimm, pfn, dax: show supported dax/pfn region alignments in sysfs

The alignment of a DAX and PFN regions dictates the page sizes that can
be used to map the region. Even if the hardware page sizes are known the
actual range of supported page sizes that can be used with DAX depends
on the kernel configuration. As a result it's best that the kernel
advertises the alignments that should be used with these region types.

This patch adds the 'supported_alignments' region attribute to expose
this information to userspace.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[djbw: integrate with nd_size_select_show() rename and other fixups]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pfn_devs.c