Lines Matching refs:entry

69 static inline bool is_pfn_swap_entry(swp_entry_t entry);
98 static inline unsigned swp_type(swp_entry_t entry) in swp_type() argument
100 return (entry.val >> SWP_TYPE_SHIFT); in swp_type()
107 static inline pgoff_t swp_offset(swp_entry_t entry) in swp_offset() argument
109 return entry.val & SWP_OFFSET_MASK; in swp_offset()
117 static inline unsigned long swp_offset_pfn(swp_entry_t entry) in swp_offset_pfn() argument
119 VM_BUG_ON(!is_pfn_swap_entry(entry)); in swp_offset_pfn()
120 return swp_offset(entry) & SWP_PFN_MASK; in swp_offset_pfn()
146 static inline pte_t swp_entry_to_pte(swp_entry_t entry) in swp_entry_to_pte() argument
150 arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); in swp_entry_to_pte()
156 swp_entry_t entry; in radix_to_swp_entry() local
158 entry.val = xa_to_value(arg); in radix_to_swp_entry()
159 return entry; in radix_to_swp_entry()
162 static inline void *swp_to_radix_entry(swp_entry_t entry) in swp_to_radix_entry() argument
164 return xa_mk_value(entry.val); in swp_to_radix_entry()
178 static inline bool is_device_private_entry(swp_entry_t entry) in is_device_private_entry() argument
180 int type = swp_type(entry); in is_device_private_entry()
184 static inline bool is_writable_device_private_entry(swp_entry_t entry) in is_writable_device_private_entry() argument
186 return unlikely(swp_type(entry) == SWP_DEVICE_WRITE); in is_writable_device_private_entry()
199 static inline bool is_device_exclusive_entry(swp_entry_t entry) in is_device_exclusive_entry() argument
201 return swp_type(entry) == SWP_DEVICE_EXCLUSIVE_READ || in is_device_exclusive_entry()
202 swp_type(entry) == SWP_DEVICE_EXCLUSIVE_WRITE; in is_device_exclusive_entry()
205 static inline bool is_writable_device_exclusive_entry(swp_entry_t entry) in is_writable_device_exclusive_entry() argument
207 return unlikely(swp_type(entry) == SWP_DEVICE_EXCLUSIVE_WRITE); in is_writable_device_exclusive_entry()
220 static inline bool is_device_private_entry(swp_entry_t entry) in is_device_private_entry() argument
225 static inline bool is_writable_device_private_entry(swp_entry_t entry) in is_writable_device_private_entry() argument
240 static inline bool is_device_exclusive_entry(swp_entry_t entry) in is_device_exclusive_entry() argument
245 static inline bool is_writable_device_exclusive_entry(swp_entry_t entry) in is_writable_device_exclusive_entry() argument
252 static inline int is_migration_entry(swp_entry_t entry) in is_migration_entry() argument
254 return unlikely(swp_type(entry) == SWP_MIGRATION_READ || in is_migration_entry()
255 swp_type(entry) == SWP_MIGRATION_READ_EXCLUSIVE || in is_migration_entry()
256 swp_type(entry) == SWP_MIGRATION_WRITE); in is_migration_entry()
259 static inline int is_writable_migration_entry(swp_entry_t entry) in is_writable_migration_entry() argument
261 return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE); in is_writable_migration_entry()
264 static inline int is_readable_migration_entry(swp_entry_t entry) in is_readable_migration_entry() argument
266 return unlikely(swp_type(entry) == SWP_MIGRATION_READ); in is_readable_migration_entry()
269 static inline int is_readable_exclusive_migration_entry(swp_entry_t entry) in is_readable_exclusive_migration_entry() argument
271 return unlikely(swp_type(entry) == SWP_MIGRATION_READ_EXCLUSIVE); in is_readable_exclusive_migration_entry()
303 static inline swp_entry_t make_migration_entry_young(swp_entry_t entry) in make_migration_entry_young() argument
306 return swp_entry(swp_type(entry), in make_migration_entry_young()
307 swp_offset(entry) | SWP_MIG_YOUNG); in make_migration_entry_young()
308 return entry; in make_migration_entry_young()
311 static inline bool is_migration_entry_young(swp_entry_t entry) in is_migration_entry_young() argument
314 return swp_offset(entry) & SWP_MIG_YOUNG; in is_migration_entry_young()
319 static inline swp_entry_t make_migration_entry_dirty(swp_entry_t entry) in make_migration_entry_dirty() argument
322 return swp_entry(swp_type(entry), in make_migration_entry_dirty()
323 swp_offset(entry) | SWP_MIG_DIRTY); in make_migration_entry_dirty()
324 return entry; in make_migration_entry_dirty()
327 static inline bool is_migration_entry_dirty(swp_entry_t entry) in is_migration_entry_dirty() argument
330 return swp_offset(entry) & SWP_MIG_DIRTY; in is_migration_entry_dirty()
374 static inline int is_writable_migration_entry(swp_entry_t entry) in is_writable_migration_entry() argument
378 static inline int is_readable_migration_entry(swp_entry_t entry) in is_readable_migration_entry() argument
383 static inline swp_entry_t make_migration_entry_young(swp_entry_t entry) in make_migration_entry_young() argument
385 return entry; in make_migration_entry_young()
388 static inline bool is_migration_entry_young(swp_entry_t entry) in is_migration_entry_young() argument
393 static inline swp_entry_t make_migration_entry_dirty(swp_entry_t entry) in make_migration_entry_dirty() argument
395 return entry; in make_migration_entry_dirty()
398 static inline bool is_migration_entry_dirty(swp_entry_t entry) in is_migration_entry_dirty() argument
415 static inline bool is_pte_marker_entry(swp_entry_t entry) in is_pte_marker_entry() argument
417 return swp_type(entry) == SWP_PTE_MARKER; in is_pte_marker_entry()
420 static inline pte_marker pte_marker_get(swp_entry_t entry) in pte_marker_get() argument
422 return swp_offset(entry) & PTE_MARKER_MASK; in pte_marker_get()
440 static inline int is_swapin_error_entry(swp_entry_t entry) in is_swapin_error_entry() argument
442 return is_pte_marker_entry(entry) && in is_swapin_error_entry()
443 (pte_marker_get(entry) & PTE_MARKER_SWAPIN_ERROR); in is_swapin_error_entry()
464 static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) in pfn_swap_entry_to_page() argument
466 struct page *p = pfn_to_page(swp_offset_pfn(entry)); in pfn_swap_entry_to_page()
472 BUG_ON(is_migration_entry(entry) && !PageLocked(p)); in pfn_swap_entry_to_page()
482 static inline bool is_pfn_swap_entry(swp_entry_t entry) in is_pfn_swap_entry() argument
487 return is_migration_entry(entry) || is_device_private_entry(entry) || in is_pfn_swap_entry()
488 is_device_exclusive_entry(entry); in is_pfn_swap_entry()
514 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry) in swp_entry_to_pmd() argument
518 arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); in swp_entry_to_pmd()
546 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry) in swp_entry_to_pmd() argument
568 static inline int is_hwpoison_entry(swp_entry_t entry) in is_hwpoison_entry() argument
570 return swp_type(entry) == SWP_HWPOISON; in is_hwpoison_entry()
586 static inline int non_swap_entry(swp_entry_t entry) in non_swap_entry() argument
588 return swp_type(entry) >= MAX_SWAPFILES; in non_swap_entry()