1 #ifndef __NVDIMM_PMEM_H__
2 #define __NVDIMM_PMEM_H__
3 #include <linux/badblocks.h>
4 #include <linux/types.h>
5 #include <linux/pfn_t.h>
8 #ifdef CONFIG_ARCH_HAS_PMEM_API
9 void arch_wb_cache_pmem(void *addr, size_t size);
10 void arch_invalidate_pmem(void *addr, size_t size);
12 static inline void arch_wb_cache_pmem(void *addr, size_t size)
15 static inline void arch_invalidate_pmem(void *addr, size_t size)
20 /* this definition is in it's own header for tools/testing/nvdimm to consume */
22 /* One contiguous memory region per device */
23 phys_addr_t phys_addr;
24 /* when non-zero this device is hosting a 'pfn' instance */
25 phys_addr_t data_offset;
28 /* immutable base size of the namespace */
30 /* trim size when namespace capacity has been section aligned */
33 struct dax_device *dax_dev;
37 long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff,
38 long nr_pages, void **kaddr, pfn_t *pfn);
39 #endif /* __NVDIMM_PMEM_H__ */