1
0
Fork 0
remarkable-linux/drivers/nvdimm
Dan Williams 807e336589 libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment
commit 41fce90f26 upstream.

The following namespace configuration attempt:

    # ndctl create-namespace -e namespace0.0 -m devdax -a 1G -f
    libndctl: ndctl_dax_enable: dax0.1: failed to enable
      Error: namespace0.0: failed to enable

    failed to reconfigure namespace: No such device or address

...fails when the backing memory range is not physically aligned to 1G:

    # cat /proc/iomem | grep Persistent
    210000000-30fffffff : Persistent Memory (legacy)

In the above example the 4G persistent memory range starts and ends on a
256MB boundary.

We handle this case correctly when needing to handle cases that violate
section alignment (128MB) collisions against "System RAM", and we simply
need to extend that padding/truncation for the 1GB alignment use case.

Cc: <stable@vger.kernel.org>
Fixes: 315c562536 ("libnvdimm, pfn: add 'align' attribute...")
Reported-and-tested-by: Jane Chu <jane.chu@oracle.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-28 10:18:34 +01:00
..
Kconfig nvdimm: make CONFIG_NVDIMM_DAX 'bool' 2016-10-27 16:16:21 -07:00
Makefile libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
blk.c libnvdimm for 4.8 2016-07-28 17:38:16 -07:00
btt.c libnvdimm, btt: Fix an incompatibility in the log layout 2018-01-23 19:57:03 +01:00
btt.h libnvdimm, btt: Fix an incompatibility in the log layout 2018-01-23 19:57:03 +01:00
btt_devs.c nvdimm, btt: add a size attribute for BTTs 2016-08-08 09:26:14 -07:00
bus.c libnvdimm: fix integer overflow static analysis warning 2018-02-28 10:18:33 +01:00
claim.c libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes 2016-07-12 15:13:48 -07:00
core.c libnvdimm: fix badblock range handling of ARS range 2017-07-27 15:08:02 -07:00
dax_devs.c libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
dimm.c libnvdimm: Fix nvdimm_probe error on NVDIMM-N 2016-09-01 18:20:39 -07:00
dimm_devs.c libnvdimm: fix blk free space accounting 2017-04-21 09:31:21 +02:00
e820.c libnvdimm: move ->module to struct nvdimm_bus_descriptor 2016-07-21 20:03:19 -07:00
label.c libnvdimm, namespace: fix label initialization to use valid seq numbers 2017-11-30 08:39:07 +00:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
namespace_devs.c libnvdimm, namespace: make 'resource' attribute only readable by root 2017-11-30 08:39:07 +00:00
nd-core.h libnvdimm, namespace: allow creation of multiple pmem-namespaces per region 2016-10-07 09:22:53 -07:00
nd.h nfit, libnvdimm: fix interleave set cookie calculation 2017-03-15 10:02:47 +08:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment 2018-02-28 10:18:34 +01:00
pmem.c pmem: return EIO on read_pmem() failure 2017-07-05 14:40:25 +02:00
pmem.h pmem: kill __pmem address space 2016-07-12 19:25:38 -07:00
region.c libnvdimm: keep region data alive over namespace removal 2016-07-11 16:13:41 -07:00
region_devs.c libnvdimm, region: fix flush hint detection crash 2017-05-20 14:28:42 +02:00