diff options
Diffstat (limited to 'include/linux/libnvdimm.h')
-rw-r--r-- | include/linux/libnvdimm.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h index 9b8d81a7b80e..3eaad2fbf284 100644 --- a/include/linux/libnvdimm.h +++ b/include/linux/libnvdimm.h | |||
@@ -174,4 +174,19 @@ u64 nd_fletcher64(void *addr, size_t len, bool le); | |||
174 | void nvdimm_flush(struct nd_region *nd_region); | 174 | void nvdimm_flush(struct nd_region *nd_region); |
175 | int nvdimm_has_flush(struct nd_region *nd_region); | 175 | int nvdimm_has_flush(struct nd_region *nd_region); |
176 | int nvdimm_has_cache(struct nd_region *nd_region); | 176 | int nvdimm_has_cache(struct nd_region *nd_region); |
177 | |||
178 | #ifdef CONFIG_ARCH_HAS_PMEM_API | ||
179 | #define ARCH_MEMREMAP_PMEM MEMREMAP_WB | ||
180 | void arch_wb_cache_pmem(void *addr, size_t size); | ||
181 | void arch_invalidate_pmem(void *addr, size_t size); | ||
182 | #else | ||
183 | #define ARCH_MEMREMAP_PMEM MEMREMAP_WT | ||
184 | static inline void arch_wb_cache_pmem(void *addr, size_t size) | ||
185 | { | ||
186 | } | ||
187 | static inline void arch_invalidate_pmem(void *addr, size_t size) | ||
188 | { | ||
189 | } | ||
190 | #endif | ||
191 | |||
177 | #endif /* __LIBNVDIMM_H__ */ | 192 | #endif /* __LIBNVDIMM_H__ */ |