summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/pmem.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-07-04 01:54:58 +0200
committerDan Williams <dan.j.williams@intel.com>2017-07-04 01:54:58 +0200
commit9d92573fff3ec70785ef1815cc80573f70e7a921 (patch)
treebce6e6bbad56f805d1adcebddabf9dd9e8072ce4 /drivers/nvdimm/pmem.h
parentlibnvdimm, namespace: record 'lbasize' for pmem namespaces (diff)
parentlibnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region (diff)
downloadlinux-9d92573fff3ec70785ef1815cc80573f70e7a921.tar.xz
linux-9d92573fff3ec70785ef1815cc80573f70e7a921.zip
Merge branch 'for-4.13/dax' into libnvdimm-for-next
Diffstat (limited to 'drivers/nvdimm/pmem.h')
-rw-r--r--drivers/nvdimm/pmem.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/nvdimm/pmem.h b/drivers/nvdimm/pmem.h
index c5917f040fa7..5434321cad67 100644
--- a/drivers/nvdimm/pmem.h
+++ b/drivers/nvdimm/pmem.h
@@ -5,6 +5,20 @@
#include <linux/pfn_t.h>
#include <linux/fs.h>
+#ifdef CONFIG_ARCH_HAS_PMEM_API
+#define ARCH_MEMREMAP_PMEM MEMREMAP_WB
+void arch_wb_cache_pmem(void *addr, size_t size);
+void arch_invalidate_pmem(void *addr, size_t size);
+#else
+#define ARCH_MEMREMAP_PMEM MEMREMAP_WT
+static inline void arch_wb_cache_pmem(void *addr, size_t size)
+{
+}
+static inline void arch_invalidate_pmem(void *addr, size_t size)
+{
+}
+#endif
+
/* this definition is in it's own header for tools/testing/nvdimm to consume */
struct pmem_device {
/* One contiguous memory region per device */