diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvdimm/pmem.c | 2 | ||||
-rw-r--r-- | drivers/nvdimm/pmem.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 823b07774244..3b87702d46bb 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c | |||
@@ -245,7 +245,7 @@ static size_t pmem_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, | |||
245 | static void pmem_dax_flush(struct dax_device *dax_dev, pgoff_t pgoff, | 245 | static void pmem_dax_flush(struct dax_device *dax_dev, pgoff_t pgoff, |
246 | void *addr, size_t size) | 246 | void *addr, size_t size) |
247 | { | 247 | { |
248 | wb_cache_pmem(addr, size); | 248 | arch_wb_cache_pmem(addr, size); |
249 | } | 249 | } |
250 | 250 | ||
251 | static const struct dax_operations pmem_dax_ops = { | 251 | static const struct dax_operations pmem_dax_ops = { |
diff --git a/drivers/nvdimm/pmem.h b/drivers/nvdimm/pmem.h index 7f4dbd72a90a..c4b3371c7f88 100644 --- a/drivers/nvdimm/pmem.h +++ b/drivers/nvdimm/pmem.h | |||
@@ -5,6 +5,14 @@ | |||
5 | #include <linux/pfn_t.h> | 5 | #include <linux/pfn_t.h> |
6 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
7 | 7 | ||
8 | #ifdef CONFIG_ARCH_HAS_PMEM_API | ||
9 | void arch_wb_cache_pmem(void *addr, size_t size); | ||
10 | #else | ||
11 | static inline void arch_wb_cache_pmem(void *addr, size_t size) | ||
12 | { | ||
13 | } | ||
14 | #endif | ||
15 | |||
8 | /* this definition is in it's own header for tools/testing/nvdimm to consume */ | 16 | /* this definition is in it's own header for tools/testing/nvdimm to consume */ |
9 | struct pmem_device { | 17 | struct pmem_device { |
10 | /* One contiguous memory region per device */ | 18 | /* One contiguous memory region per device */ |