alistair23-linux/drivers/nvdimm
Dan Williams 5e24c9fd36 libnvdimm, dax: fix alignment validation
Testing the dax-device autodetect support revealed a probe failure with
the following result:

    dax0.1: bad offset: 0x8200000 dax disabled

The original pfn-device implementation inferred the alignment from
ilog2(offset), now that the alignment is explicit the is_power_of_2()
needs replacing with a real sanity check against the recorded alignment.
Otherwise the alignment check is useless in the implicit case and only
the minimum size of the offset matters.

This self-consistency check is further validated by the probe path that
will re-check that the offset is large enough to contain all the
metadata required to enable the device.

Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2016-05-21 11:01:41 -07:00
..
blk.c libnvdimm, pmem, pfn: make pmem_rw_bytes generic and refactor pfn setup 2016-04-22 12:26:23 -07:00
btt.c libnvdimm, btt, convert nd_btt_probe() to devm 2016-04-22 10:59:54 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
btt_devs.c libnvdimm, pmem, pfn: make pmem_rw_bytes generic and refactor pfn setup 2016-04-22 12:26:23 -07:00
bus.c libnvdimm: stop requiring a driver ->remove() method 2016-05-18 09:13:13 -07:00
claim.c libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
core.c libnvdimm: release ida resources 2016-05-20 22:02:56 -07:00
dax_devs.c libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
dimm_devs.c libnvdimm: release ida resources 2016-05-20 22:02:56 -07:00
e820.c x86, kexec, nvdimm: Use walk_iomem_res_desc() for iomem search 2016-01-30 09:49:59 +01:00
Kconfig libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
namespace_devs.c libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
nd-core.h libnvdimm: release ida resources 2016-05-20 22:02:56 -07:00
nd.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c libnvdimm, dax: fix alignment validation 2016-05-21 11:01:41 -07:00
pmem.c libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
region.c libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
region_devs.c libnvdimm: release ida resources 2016-05-20 22:02:56 -07:00