[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1475183722.21419.29.camel@intel.com>
Date: Thu, 29 Sep 2016 21:15:24 +0000
From: "Williams, Dan J" <dan.j.williams@...el.com>
To: "torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: [GIT PULL] libnvdimm fixes for 4.8
Hi Linus, please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
...to receive the following:
- (4) fixes for "flush hint" support. Flush hints are addresses
advertised by the ACPI 6+ NFIT (NVDIMM Firmware Interface Table) that
when written and fenced guarantee that writes pending in platform write
buffers (outside the cpu) have been flushed to media. They might also
be used by hypervisors as a trigger condition to flush guest-persistent
memory ranges to storage.
Fix a potential data corruption issue, a broken definition of the hint
array, a wrong allocation size for the unit test implementation of the
flush hint table, and missing NULL check in an error path. The unit
test, while it did not prevent these bugs from being merged, at least
triggered occasional crashes in advance of production usages.
- Fix handling of ACPI DSM error status results. The DSM mechanism
allows communication with platform and memory device firmware. We
correctly parse known errors, but were silently ignoring others. Fix
it to consistently fail any command with a non-zero status return that
we otherwise do not interpret / handle.
These changes have a build success notification from the 0day robot and
have appeared in a -next release over the past week.
The following changes since commit 3be7988674ab33565700a37b210f502563d932e6:
Linux 4.8-rc7 (2016-09-18 17:27:41 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
for you to fetch changes up to 595c73071e6641e59b83911fbb4026e767471000:
libnvdimm, region: fix flush hint table thinko (2016-09-24 11:45:38 -0700)
----------------------------------------------------------------
Dan Williams (4):
tools/testing/nvdimm: fix allocation range for mock flush hint tables
libnvdimm: fix devm_nvdimm_memremap() error path
nfit: fail DSMs that return non-zero status by default
libnvdimm, region: fix flush hint table thinko
Oliver O'Halloran (1):
nvdimm: fix PHYS_PFN/PFN_PHYS mixup
drivers/acpi/nfit/core.c | 48 +++++++++++++++++++++++-----------------
drivers/nvdimm/core.c | 8 ++++++-
drivers/nvdimm/nd.h | 22 ++++++++++++++++--
drivers/nvdimm/region_devs.c | 22 ++++++++++--------
tools/testing/nvdimm/test/nfit.c | 3 ++-
5 files changed, 70 insertions(+), 33 deletions(-)
commit 480b6837aa579991c6acc113bccf838e6a90843c
Author: Oliver O'Halloran <oohall@...il.com>
Date: Mon Sep 19 20:19:00 2016 +1000
nvdimm: fix PHYS_PFN/PFN_PHYS mixup
nd_activate_region() iomaps any hint addresses required when activating
a region. To prevent duplicate mappings it checks the PFN of the hint to
be mapped against the PFNs of the already mapped hints. Unfortunately it
doesn't convert the PFN back into a physical address before passing it
to devm_nvdimm_ioremap(). Instead it applies PHYS_PFN a second time
which ends about as well as you would imagine.
Signed-off-by: Oliver O'Halloran <oohall@...il.com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
commit 9d15ce9caaf9ecbec74e3be156a4a57451ed16c2
Author: Dan Williams <dan.j.williams@...el.com>
Date: Mon Sep 19 13:49:48 2016 -0700
tools/testing/nvdimm: fix allocation range for mock flush hint tables
Commit 480b6837aa57 "nvdimm: fix PHYS_PFN/PFN_PHYS mixup" identified
that we were passing an invalid address to devm_nvdimm_ioremap(). With
that fixed it exposed a bug in the memory reservation size for flush
hint tables. Since we map a full page we need to mock a full page of
memory to back the flush hint table entries.
Cc: Oliver O'Halloran <oohall@...il.com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
commit ecfb6d8a041cc2ca80bc69ffc20c00067d190df5
Author: Dan Williams <dan.j.williams@...el.com>
Date: Wed Sep 21 09:22:33 2016 -0700
libnvdimm: fix devm_nvdimm_memremap() error path
The internal alloc_nvdimm_map() helper might fail, particularly if the
memory region is already busy. Report request_mem_region() failures and
check for the failure.
Reported-by: Ryan Chen <ryan.chan105@...il.com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
commit 11294d63ac915230a36b0603c62134ef7b173d0a
Author: Dan Williams <dan.j.williams@...el.com>
Date: Wed Sep 21 09:21:26 2016 -0700
nfit: fail DSMs that return non-zero status by default
For the DSMs where the kernel knows the format of the output buffer and
originates those DSMs from within the kernel, return -EIO for any
non-zero status. If the BIOS is indicating a status that we do not know
how to handle, fail the DSM.
Cc: <stable@...r.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
commit 595c73071e6641e59b83911fbb4026e767471000
Author: Dan Williams <dan.j.williams@...el.com>
Date: Fri Sep 23 17:53:52 2016 -0700
libnvdimm, region: fix flush hint table thinko
The definition of the flush hint table as:
void __iomem *flush_wpq[0][0];
...passed the unit test, but is broken as flush_wpq[0][1] and
flush_wpq[1][0] refer to the same entry. Fix this to use a helper that
calculates a slot in the table based on the geometry of flush hints in
the region. This is important to get right since virtualization
solutions use this mechanism to trigger hypervisor flushes to platform
persistence.
Reported-by: Dave Jiang <dave.jiang@...el.com>
Tested-by: Dave Jiang <dave.jiang@...el.com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
Powered by blists - more mailing lists