linux/drivers/nvdimm
Dan Williams 658922e57b libnvdimm, pfn: fix memmap reservation sizing
When configuring a pfn-device instance to allocate the memmap array it
needs to account for the fact that vmemmap_populate_hugepages()
allocates struct page blocks in HPAGE_SIZE chunks.  We need to align the
reserved area size to 2MB otherwise arch_add_memory() runs out of memory
while establishing the memmap:

 WARNING: CPU: 0 PID: 496 at arch/x86/mm/init_64.c:704 arch_add_memory+0xe7/0xf0
 [..]
 Call Trace:
  [<ffffffff8148bdb3>] dump_stack+0x85/0xc2
  [<ffffffff810a749b>] __warn+0xcb/0xf0
  [<ffffffff810a75cd>] warn_slowpath_null+0x1d/0x20
  [<ffffffff8106a497>] arch_add_memory+0xe7/0xf0
  [<ffffffff811d2097>] devm_memremap_pages+0x287/0x450
  [<ffffffff811d1ffa>] ? devm_memremap_pages+0x1ea/0x450
  [<ffffffffa0000298>] __wrap_devm_memremap_pages+0x58/0x70 [nfit_test_iomap]
  [<ffffffffa0047a58>] pmem_attach_disk+0x318/0x420 [nd_pmem]
  [<ffffffffa0047bcf>] nd_pmem_probe+0x6f/0x90 [nd_pmem]
  [<ffffffffa0009469>] nvdimm_bus_probe+0x69/0x110 [libnvdimm]
 [..]
  ndbus0: nd_pmem.probe(pfn3.0) = -12
 nd_pmem: probe of pfn3.0 failed with error -12
libndctl: ndctl_pfn_enable: pfn3.0: failed to enable

Reported-by: Namratha Kothapalli <namratha.n.kothapalli@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2016-04-30 13:07:06 -07:00
..
Kconfig libnvdimm, pmem: 'struct page' for pmem 2015-08-28 23:40:04 -04:00
Makefile libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
blk.c nvdimm/blk: don't allocate unused major device number 2016-03-09 14:59:41 -08:00
btt.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
btt_devs.c libnvdimm: btt_devs: Fix locking in namespace_store 2015-09-17 11:37:16 -04:00
bus.c libnvdimm: fix smart data retrieval 2016-04-07 19:58:44 -07:00
claim.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
core.c libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment 2016-04-07 20:02:06 -07:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
dimm_devs.c libnvdimm, nfit: centralize command status translation 2016-03-05 12:24:06 -08:00
e820.c x86, kexec, nvdimm: Use walk_iomem_res_desc() for iomem search 2016-01-30 09:49:59 +01: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
namespace_devs.c libnvdimm, pmem: adjust for section collisions with 'System RAM' 2016-03-05 12:25:45 -08:00
nd-core.h Merge branch 'for-4.5/block-dax' into for-4.5/libnvdimm 2016-01-10 07:53:55 -08:00
nd.h libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment 2016-04-07 20:02:06 -07:00
pfn.h libnvdimm, pmem: adjust for section collisions with 'System RAM' 2016-03-05 12:25:45 -08:00
pfn_devs.c libnvdimm, pfn: fix uuid validation 2016-04-07 19:59:27 -07:00
pmem.c libnvdimm, pfn: fix memmap reservation sizing 2016-04-30 13:07:06 -07:00
region.c libnvdimm: async notification support 2016-03-05 12:24:06 -08:00
region_devs.c libnvdimm: fix namespace object confusion in is_uuid_busy() 2016-01-05 18:37:23 -08:00