Lines Matching refs:entry
51 static inline unsigned swp_type(swp_entry_t entry)
53 return (entry.val >> SWP_TYPE_SHIFT);
60 static inline pgoff_t swp_offset(swp_entry_t entry)
62 return entry.val & SWP_OFFSET_MASK;
65 /* check whether a pte points to a swap entry */
88 static inline pte_t swp_entry_to_pte(swp_entry_t entry)
92 arch_entry = __swp_entry(swp_type(entry), swp_offset(entry));
98 swp_entry_t entry;
100 entry.val = xa_to_value(arg);
101 return entry;
104 static inline void *swp_to_radix_entry(swp_entry_t entry)
106 return xa_mk_value(entry.val);
116 static inline bool is_device_private_entry(swp_entry_t entry)
118 int type = swp_type(entry);
122 static inline void make_device_private_entry_read(swp_entry_t *entry)
124 *entry = swp_entry(SWP_DEVICE_READ, swp_offset(*entry));
127 static inline bool is_write_device_private_entry(swp_entry_t entry)
129 return unlikely(swp_type(entry) == SWP_DEVICE_WRITE);
132 static inline unsigned long device_private_entry_to_pfn(swp_entry_t entry)
134 return swp_offset(entry);
137 static inline struct page *device_private_entry_to_page(swp_entry_t entry)
139 return pfn_to_page(swp_offset(entry));
147 static inline void make_device_private_entry_read(swp_entry_t *entry)
151 static inline bool is_device_private_entry(swp_entry_t entry)
156 static inline bool is_write_device_private_entry(swp_entry_t entry)
161 static inline unsigned long device_private_entry_to_pfn(swp_entry_t entry)
166 static inline struct page *device_private_entry_to_page(swp_entry_t entry)
181 static inline int is_migration_entry(swp_entry_t entry)
183 return unlikely(swp_type(entry) == SWP_MIGRATION_READ ||
184 swp_type(entry) == SWP_MIGRATION_WRITE);
187 static inline int is_write_migration_entry(swp_entry_t entry)
189 return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE);
192 static inline unsigned long migration_entry_to_pfn(swp_entry_t entry)
194 return swp_offset(entry);
197 static inline struct page *migration_entry_to_page(swp_entry_t entry)
199 struct page *p = pfn_to_page(swp_offset(entry));
208 static inline void make_migration_entry_read(swp_entry_t *entry)
210 *entry = swp_entry(SWP_MIGRATION_READ, swp_offset(*entry));
227 static inline unsigned long migration_entry_to_pfn(swp_entry_t entry)
232 static inline struct page *migration_entry_to_page(swp_entry_t entry)
244 static inline int is_write_migration_entry(swp_entry_t entry)
274 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
278 arch_entry = __swp_entry(swp_type(entry), swp_offset(entry));
306 static inline pmd_t swp_entry_to_pmd(swp_entry_t entry)
330 static inline int is_hwpoison_entry(swp_entry_t entry)
332 return swp_type(entry) == SWP_HWPOISON;
364 static inline int non_swap_entry(swp_entry_t entry)
366 return swp_type(entry) >= MAX_SWAPFILES;
369 static inline int non_swap_entry(swp_entry_t entry)