diff options
Diffstat (limited to 'include/linux/pmem.h')
-rw-r--r-- | include/linux/pmem.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/include/linux/pmem.h b/include/linux/pmem.h index 85f810b33917..acfea8ce4a07 100644 --- a/include/linux/pmem.h +++ b/include/linux/pmem.h | |||
@@ -65,11 +65,6 @@ static inline void memcpy_from_pmem(void *dst, void __pmem const *src, size_t si | |||
65 | memcpy(dst, (void __force const *) src, size); | 65 | memcpy(dst, (void __force const *) src, size); |
66 | } | 66 | } |
67 | 67 | ||
68 | static inline void memunmap_pmem(struct device *dev, void __pmem *addr) | ||
69 | { | ||
70 | devm_memunmap(dev, (void __force *) addr); | ||
71 | } | ||
72 | |||
73 | static inline bool arch_has_pmem_api(void) | 68 | static inline bool arch_has_pmem_api(void) |
74 | { | 69 | { |
75 | return IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API); | 70 | return IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API); |
@@ -93,7 +88,7 @@ static inline bool arch_has_wmb_pmem(void) | |||
93 | * These defaults seek to offer decent performance and minimize the | 88 | * These defaults seek to offer decent performance and minimize the |
94 | * window between i/o completion and writes being durable on media. | 89 | * window between i/o completion and writes being durable on media. |
95 | * However, it is undefined / architecture specific whether | 90 | * However, it is undefined / architecture specific whether |
96 | * default_memremap_pmem + default_memcpy_to_pmem is sufficient for | 91 | * ARCH_MEMREMAP_PMEM + default_memcpy_to_pmem is sufficient for |
97 | * making data durable relative to i/o completion. | 92 | * making data durable relative to i/o completion. |
98 | */ | 93 | */ |
99 | static inline void default_memcpy_to_pmem(void __pmem *dst, const void *src, | 94 | static inline void default_memcpy_to_pmem(void __pmem *dst, const void *src, |
@@ -117,25 +112,6 @@ static inline void default_clear_pmem(void __pmem *addr, size_t size) | |||
117 | } | 112 | } |
118 | 113 | ||
119 | /** | 114 | /** |
120 | * memremap_pmem - map physical persistent memory for pmem api | ||
121 | * @offset: physical address of persistent memory | ||
122 | * @size: size of the mapping | ||
123 | * | ||
124 | * Establish a mapping of the architecture specific memory type expected | ||
125 | * by memcpy_to_pmem() and wmb_pmem(). For example, it may be | ||
126 | * the case that an uncacheable or writethrough mapping is sufficient, | ||
127 | * or a writeback mapping provided memcpy_to_pmem() and | ||
128 | * wmb_pmem() arrange for the data to be written through the | ||
129 | * cache to persistent media. | ||
130 | */ | ||
131 | static inline void __pmem *memremap_pmem(struct device *dev, | ||
132 | resource_size_t offset, unsigned long size) | ||
133 | { | ||
134 | return (void __pmem *) devm_memremap(dev, offset, size, | ||
135 | ARCH_MEMREMAP_PMEM); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * memcpy_to_pmem - copy data to persistent memory | 115 | * memcpy_to_pmem - copy data to persistent memory |
140 | * @dst: destination buffer for the copy | 116 | * @dst: destination buffer for the copy |
141 | * @src: source buffer for the copy | 117 | * @src: source buffer for the copy |