linux-stable/drivers/nvdimm
Dan Williams 41fce90f26 libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment
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>
2017-12-19 15:37:34 -08:00
..
badrange.c libnvdimm, badrange: remove a WARN for list_empty 2017-11-02 10:42:30 -07:00
blk.c block: guard bvec iteration logic 2017-07-03 16:56:26 -06:00
btt.c bdi: introduce BDI_CAP_SYNCHRONOUS_IO 2017-11-15 18:21:02 -08:00
btt.h libnvdimm, btt: rework error clearing 2017-08-31 15:05:10 -07:00
btt_devs.c libnvdimm: rename nd_sector_size_{show,store} to nd_size_select_{show,store} 2017-08-11 17:36:54 -07:00
bus.c libnvdimm: move poison list functions to a new 'badrange' file 2017-11-02 10:42:30 -07:00
claim.c libnvdimm, btt: rework error clearing 2017-08-31 15:05:10 -07:00
core.c libnvdimm: move poison list functions to a new 'badrange' file 2017-11-02 10:42:30 -07:00
dax_devs.c Merge branch 'for-4.13/dax' into libnvdimm-for-next 2017-07-03 16:54:58 -07:00
dimm.c acpi, nfit: add support for the _LSI, _LSR, and _LSW label methods 2017-10-07 10:03:40 -07:00
dimm_devs.c libnvdimm: introduce 'flags' attribute for DIMM 'lock' and 'alias' status 2017-10-07 10:04:06 -07:00
e820.c libnvdimm, e820: use module_platform_driver 2016-12-05 08:52:21 -08:00
Kconfig treewide: Fix typos in Kconfig 2017-10-12 15:42:00 +02:00
label.c libnvdimm, namespace: fix label initialization to use valid seq numbers 2017-09-28 09:13:06 -07:00
label.h libnvdimm, btt: BTT updates for UEFI 2.7 format 2017-06-29 13:50:38 -07:00
Makefile libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
namespace_devs.c libnvdimm, namespace: make a couple of functions static 2017-10-07 10:04:06 -07:00
nd-core.h libnvdimm: move poison list functions to a new 'badrange' file 2017-11-02 10:42:30 -07:00
nd.h libnvdimm: move poison list functions to a new 'badrange' file 2017-11-02 10:42:30 -07: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 2017-12-19 15:37:34 -08:00
pmem.c bdi: introduce BDI_CAP_SYNCHRONOUS_IO 2017-11-15 18:21:02 -08:00
pmem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
region.c libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime 2017-06-30 18:56:03 -07:00
region_devs.c libnvdimm, region : make 'resource' attribute only readable by root 2017-09-28 09:13:06 -07:00