diff options
Diffstat (limited to 'include/linux/swapops.h')
-rw-r--r-- | include/linux/swapops.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 9c5a2628d6ce..1d3877c39a00 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -124,6 +124,11 @@ static inline bool is_write_device_private_entry(swp_entry_t entry) | |||
124 | return unlikely(swp_type(entry) == SWP_DEVICE_WRITE); | 124 | return unlikely(swp_type(entry) == SWP_DEVICE_WRITE); |
125 | } | 125 | } |
126 | 126 | ||
127 | static inline unsigned long device_private_entry_to_pfn(swp_entry_t entry) | ||
128 | { | ||
129 | return swp_offset(entry); | ||
130 | } | ||
131 | |||
127 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) | 132 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) |
128 | { | 133 | { |
129 | return pfn_to_page(swp_offset(entry)); | 134 | return pfn_to_page(swp_offset(entry)); |
@@ -154,6 +159,11 @@ static inline bool is_write_device_private_entry(swp_entry_t entry) | |||
154 | return false; | 159 | return false; |
155 | } | 160 | } |
156 | 161 | ||
162 | static inline unsigned long device_private_entry_to_pfn(swp_entry_t entry) | ||
163 | { | ||
164 | return 0; | ||
165 | } | ||
166 | |||
157 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) | 167 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) |
158 | { | 168 | { |
159 | return NULL; | 169 | return NULL; |
@@ -189,6 +199,11 @@ static inline int is_write_migration_entry(swp_entry_t entry) | |||
189 | return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE); | 199 | return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE); |
190 | } | 200 | } |
191 | 201 | ||
202 | static inline unsigned long migration_entry_to_pfn(swp_entry_t entry) | ||
203 | { | ||
204 | return swp_offset(entry); | ||
205 | } | ||
206 | |||
192 | static inline struct page *migration_entry_to_page(swp_entry_t entry) | 207 | static inline struct page *migration_entry_to_page(swp_entry_t entry) |
193 | { | 208 | { |
194 | struct page *p = pfn_to_page(swp_offset(entry)); | 209 | struct page *p = pfn_to_page(swp_offset(entry)); |
@@ -218,6 +233,12 @@ static inline int is_migration_entry(swp_entry_t swp) | |||
218 | { | 233 | { |
219 | return 0; | 234 | return 0; |
220 | } | 235 | } |
236 | |||
237 | static inline unsigned long migration_entry_to_pfn(swp_entry_t entry) | ||
238 | { | ||
239 | return 0; | ||
240 | } | ||
241 | |||
221 | static inline struct page *migration_entry_to_page(swp_entry_t entry) | 242 | static inline struct page *migration_entry_to_page(swp_entry_t entry) |
222 | { | 243 | { |
223 | return NULL; | 244 | return NULL; |