linux/drivers/nvdimm
Ross Zwisler 546eb0317c libnvdimm, pmem: Do not flush power-fail protected CPU caches
This commit:

5fdf8e5ba5 ("libnvdimm: re-enable deep flush for pmem devices via fsync()")

intended to make sure that deep flush was always available even on
platforms which support a power-fail protected CPU cache.  An unintended
side effect of this change was that we also lost the ability to skip
flushing CPU caches on those power-fail protected CPU cache.

Fix this by skipping the low level cache flushing in dax_flush() if we have
CPU caches which are power-fail protected.  The user can still override this
behavior by manually setting the write_cache state of a namespace.  See
libndctl's ndctl_namespace_write_cache_is_enabled(),
ndctl_namespace_enable_write_cache() and
ndctl_namespace_disable_write_cache() functions.

Cc: <stable@vger.kernel.org>
Fixes: 5fdf8e5ba5 ("libnvdimm: re-enable deep flush for pmem devices via fsync()")
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2018-06-06 11:02:32 -07:00
..
badrange.c libnvdimm, badrange: remove a WARN for list_empty 2017-11-02 10:42:30 -07:00
blk.c for-4.17/block-20180402 2018-04-05 14:27:02 -07:00
btt.c for-4.17/block-20180402 2018-04-05 14:27:02 -07:00
btt.h libnvdimm, btt: Fix an incompatibility in the log layout 2017-12-21 14:59:27 -08:00
btt_devs.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
bus.c libnvdimm: Debug probe times 2018-06-02 17:05:43 -07:00
claim.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
core.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
dax_devs.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
dimm.c libnvdimm, dimm: fix dpa reservation vs uninitialized label area 2018-04-06 22:59:32 -07:00
dimm_devs.c libnvdimm, dimm: handle EACCES failures from label reads 2018-04-16 08:18:51 -07:00
e820.c libnvdimm, e820: Register all pmem resources 2018-06-02 17:05:43 -07:00
Kconfig Revert "libnvdimm, of_pmem: workaround OF_NUMA=n build error" 2018-04-19 15:10:56 -07:00
label.c libnvdimm, label: change nvdimm_num_label_slots per UEFI 2.7 2018-03-15 13:59:57 -07:00
label.h libnvdimm, label: change min label storage size per UEFI 2.7 2018-03-15 10:44:32 -07:00
Makefile libnvdimm: Add device-tree based driver 2018-04-07 07:53:23 -07:00
namespace_devs.c libnvdimm, namespace: use a safe lookup for dimm device name 2018-04-06 22:59:39 -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 for 4.17 2018-04-10 10:25:57 -07:00
of_pmem.c libnvdimm, of_pmem: use dev_to_node() instead of of_node_to_nid() 2018-04-19 15:07:10 -07:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c Merge branch 'for-4.17/libnvdimm' into libnvdimm-for-next 2018-04-09 10:50:08 -07:00
pmem.c libnvdimm, pmem: Unconditionally deep flush on *sync 2018-06-06 10:55:53 -07:00
pmem.h memremap: change devm_memremap_pages interface to use struct dev_pagemap 2018-01-08 11:46:23 -08:00
region.c libnvdimm, region: quiet region probe 2018-04-07 07:47:10 -07:00
region_devs.c libnvdimm, pmem: Do not flush power-fail protected CPU caches 2018-06-06 11:02:32 -07:00