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()
363 static inline int is_writable_migration_entry(swp_entry_t entry) in is_writable_migration_entry() argument
367 static inline int is_readable_migration_entry(swp_entry_t entry) in is_readable_migration_entry() argument
372 static inline swp_entry_t make_migration_entry_young(swp_entry_t entry) in make_migration_entry_young() argument
374 return entry; in make_migration_entry_young()
377 static inline bool is_migration_entry_young(swp_entry_t entry) in is_migration_entry_young() argument
382 static inline swp_entry_t make_migration_entry_dirty(swp_entry_t entry) in make_migration_entry_dirty() argument
384 return entry; in make_migration_entry_dirty()
387 static inline bool is_migration_entry_dirty(swp_entry_t entry) in is_migration_entry_dirty() argument
404 static inline int is_hwpoison_entry(swp_entry_t entry) in is_hwpoison_entry() argument
406 return swp_type(entry) == SWP_HWPOISON; in is_hwpoison_entry()
438 static inline bool is_pte_marker_entry(swp_entry_t entry) in is_pte_marker_entry() argument
440 return swp_type(entry) == SWP_PTE_MARKER; in is_pte_marker_entry()
443 static inline pte_marker pte_marker_get(swp_entry_t entry) in pte_marker_get() argument
445 return swp_offset(entry) & PTE_MARKER_MASK; in pte_marker_get()
463 static inline int is_poisoned_swp_entry(swp_entry_t entry) in is_poisoned_swp_entry() argument
465 return is_pte_marker_entry(entry) && in is_poisoned_swp_entry()
466 (pte_marker_get(entry) & PTE_MARKER_POISONED); in is_poisoned_swp_entry()
487 static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) in pfn_swap_entry_to_page() argument
489 struct page *p = pfn_to_page(swp_offset_pfn(entry)); in pfn_swap_entry_to_page()
495 BUG_ON(is_migration_entry(entry) && !PageLocked(p)); in pfn_swap_entry_to_page()
506 static inline bool is_pfn_swap_entry(swp_entry_t entry) in is_pfn_swap_entry() argument
511 return is_migration_entry(entry) || is_device_private_entry(entry) || in is_pfn_swap_entry()
512 is_device_exclusive_entry(entry) || is_hwpoison_entry(entry); in is_pfn_swap_entry()
538 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry) in swp_entry_to_pmd() argument
542 arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); in swp_entry_to_pmd()
570 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry) in swp_entry_to_pmd() argument
581 static inline int non_swap_entry(swp_entry_t entry) in non_swap_entry() argument
583 return swp_type(entry) >= MAX_SWAPFILES; in non_swap_entry()