Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fixes from Dan Williams:

- a fix for the persistent memory 'struct page' driver. The
implementation overlooked the fact that pages are allocated in 2MB
units leading to -ENOMEM when establishing some configurations.

It's tagged for -stable as the problem was introduced with the
initial implementation in 4.5.

- The new "error status translation" routine, introduced with the 4.6
updates to the nfit driver, missed a necessary path in
acpi_nfit_ctl().

The end result is that we are falsely assuming commands complete
successfully when the embedded status says otherwise.

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
nfit: fix translation of command status results
libnvdimm, pfn: fix memmap reservation sizing

+14 -4
+4 -1
drivers/acpi/nfit.c
··· 287 287 offset); 288 288 rc = -ENXIO; 289 289 } 290 - } else 290 + } else { 291 291 rc = 0; 292 + if (cmd_rc) 293 + *cmd_rc = xlat_status(buf, cmd); 294 + } 292 295 293 296 out: 294 297 ACPI_FREE(out_obj);
+10 -3
drivers/nvdimm/pmem.c
··· 397 397 */ 398 398 start += start_pad; 399 399 npfns = (pmem->size - start_pad - end_trunc - SZ_8K) / SZ_4K; 400 - if (nd_pfn->mode == PFN_MODE_PMEM) 401 - offset = ALIGN(start + SZ_8K + 64 * npfns, nd_pfn->align) 400 + if (nd_pfn->mode == PFN_MODE_PMEM) { 401 + unsigned long memmap_size; 402 + 403 + /* 404 + * vmemmap_populate_hugepages() allocates the memmap array in 405 + * HPAGE_SIZE chunks. 406 + */ 407 + memmap_size = ALIGN(64 * npfns, HPAGE_SIZE); 408 + offset = ALIGN(start + SZ_8K + memmap_size, nd_pfn->align) 402 409 - start; 403 - else if (nd_pfn->mode == PFN_MODE_RAM) 410 + } else if (nd_pfn->mode == PFN_MODE_RAM) 404 411 offset = ALIGN(start + SZ_8K, nd_pfn->align) - start; 405 412 else 406 413 goto err;