OSDN Git Service

libnvdimm, pfn: Pad pfn namespaces relative to other regions
authorDan Williams <dan.j.williams@intel.com>
Sat, 24 Nov 2018 18:47:04 +0000 (10:47 -0800)
committerDan Williams <dan.j.williams@intel.com>
Wed, 5 Dec 2018 22:16:12 +0000 (14:16 -0800)
commitae86cbfef3818300f1972e52f67a93211acb0e24
treeb36ab8d85a1cbcb9344a0bb29e1d0f18eef23a6b
parente3f5df762d4a6ef6326c3c09bc9f89ea8a2eab2c
libnvdimm, pfn: Pad pfn namespaces relative to other regions

Commit cfe30b872058 "libnvdimm, pmem: adjust for section collisions with
'System RAM'" enabled Linux to workaround occasions where platform
firmware arranges for "System RAM" and "Persistent Memory" to collide
within a single section boundary. Unfortunately, as reported in this
issue [1], platform firmware can inflict the same collision between
persistent memory regions.

The approach of interrogating iomem_resource does not work in this
case because platform firmware may merge multiple regions into a single
iomem_resource range. Instead provide a method to interrogate regions
that share the same parent bus.

This is a stop-gap until the core-MM can grow support for hotplug on
sub-section boundaries.

[1]: https://github.com/pmem/ndctl/issues/76

Fixes: cfe30b872058 ("libnvdimm, pmem: adjust for section collisions with...")
Cc: <stable@vger.kernel.org>
Reported-by: Patrick Geary <patrickg@supermicro.com>
Tested-by: Patrick Geary <patrickg@supermicro.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/nd-core.h
drivers/nvdimm/pfn_devs.c
drivers/nvdimm/region_devs.c