Home
last modified time | relevance | path

Searched refs:swp_entry_t (Results 1 – 25 of 64) sorted by relevance

123

/linux/include/linux/
H A Dswapops.h21 * high-order bits of the swp_entry_t and `offset' is right-aligned in the
25 * swp_entry_t's are *never* stored anywhere in their arch-dependent format.
69 static inline bool is_pfn_swap_entry(swp_entry_t entry);
71 /* Clear all flags but only keep swp_entry_t related information */
84 * Store a type+offset into a swp_entry_t in an arch-independent format
86 static inline swp_entry_t swp_entry(unsigned long type, pgoff_t offset) in swp_entry()
88 swp_entry_t ret; in swp_entry()
95 * Extract the `type' field from a swp_entry_t. The swp_entry_t is in
98 static inline unsigned swp_type(swp_entry_t entr
[all...]
H A Dswap.h352 static inline swp_entry_t page_swap_entry(struct page *page) in page_swap_entry()
355 swp_entry_t entry = folio->swap; in page_swap_entry()
480 swp_entry_t folio_alloc_swap(struct folio *folio);
482 void put_swap_folio(struct folio *folio, swp_entry_t entry);
483 extern swp_entry_t get_swap_page_of_type(int);
484 extern int get_swap_pages(int n, swp_entry_t swp_entries[], int order);
485 extern int add_swap_count_continuation(swp_entry_t, gfp_t);
486 extern void swap_shmem_alloc(swp_entry_t, int);
487 extern int swap_duplicate(swp_entry_t);
488 extern int swapcache_prepare(swp_entry_t entry, int nr);
[all …]
H A Dswap_cgroup.h9 extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
11 extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id,
13 extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
20 unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id, in swap_cgroup_record()
27 unsigned short lookup_swap_cgroup_id(swp_entry_t ent) in lookup_swap_cgroup_id()
H A Dswap_slots.h16 swp_entry_t *slots;
20 swp_entry_t *slots_ret;
27 void free_swap_slot(swp_entry_t entry);
H A Dzswap.h30 void zswap_invalidate(swp_entry_t swp);
52 static inline void zswap_invalidate(swp_entry_t swp) {} in zswap_invalidate()
/linux/mm/
H A Dswap.h38 static inline loff_t swap_dev_pos(swp_entry_t entry) in swap_dev_pos()
46 static inline pgoff_t swap_cache_index(swp_entry_t entry) in swap_cache_index()
54 void *get_shadow_from_swap_cache(swp_entry_t entry);
55 int add_to_swap_cache(struct folio *folio, swp_entry_t entry,
58 swp_entry_t entry, void *shadow);
62 void swapcache_clear(struct swap_info_struct *si, swp_entry_t entry, int nr);
63 struct folio *swap_cache_get_folio(swp_entry_t entry,
68 struct folio *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
71 struct folio *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_flags,
74 struct folio *swap_cluster_readahead(swp_entry_t entry, gfp_t flag,
[all …]
H A Dswap_slots.c116 swp_entry_t *slots, *slots_ret; in alloc_swap_slot_cache()
123 slots = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t), in alloc_swap_slot_cache()
128 slots_ret = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t), in alloc_swap_slot_cache()
172 swp_entry_t *slots = NULL; in drain_slots_cache_cpu()
272 void free_swap_slot(swp_entry_t entry) in free_swap_slot()
305 swp_entry_t folio_alloc_swap(struct folio *folio) in folio_alloc_swap()
307 swp_entry_t entry; in folio_alloc_swap()
H A Dswap_state.c74 void *get_shadow_from_swap_cache(swp_entry_t entry) in get_shadow_from_swap_cache()
90 int add_to_swap_cache(struct folio *folio, swp_entry_t entry, in add_to_swap_cache()
144 swp_entry_t entry, void *shadow) in __delete_from_swap_cache()
182 swp_entry_t entry; in add_to_swap()
239 swp_entry_t entry = folio->swap; in delete_from_swap_cache()
257 swp_entry_t entry = swp_entry(type, curr); in clear_shadow_from_swap_cache()
351 struct folio *swap_cache_get_folio(swp_entry_t entry, in swap_cache_get_folio()
407 swp_entry_t swp; in filemap_get_incore_folio()
432 struct folio *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, in __read_swap_cache_async()
558 struct folio *read_swap_cache_async(swp_entry_t entr
[all...]
H A Dswap_cgroup.c76 static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t ent, in lookup_swap_cgroup()
97 unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, in swap_cgroup_cmpxchg()
126 unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id, in swap_cgroup_record()
162 unsigned short lookup_swap_cgroup_id(swp_entry_t ent) in lookup_swap_cgroup_id()
H A Dpage_vma_mapped.c48 swp_entry_t entry; in map_pte()
109 swp_entry_t entry; in check_pte()
120 swp_entry_t entry; in check_pte()
250 swp_entry_t entry; in page_vma_mapped_walk()
H A Dswapfile.c56 static void swap_entry_range_free(struct swap_info_struct *si, swp_entry_t entry,
186 swp_entry_t entry = swp_entry(si->type, offset); in __try_to_reclaim_swap()
1050 swp_entry_t slots[], int order) in cluster_alloc_swap()
1073 swp_entry_t slots[], int order) in scan_swap_map_slots()
1267 int get_swap_pages(int n_goal, swp_entry_t swp_entries[], int entry_order) in get_swap_pages()
1345 static struct swap_info_struct *_swap_info_get(swp_entry_t entry) in _swap_info_get()
1379 static struct swap_info_struct *swap_info_get_cont(swp_entry_t entry, in swap_info_get_cont()
1474 struct swap_info_struct *get_swap_device(swp_entry_t entry) in get_swap_device()
1510 swp_entry_t entry) in __swap_entry_free()
1526 swp_entry_t entry, int nr) in __swap_entries_free()
[all …]
H A Dzswap.c197 swp_entry_t swpentry;
234 static inline struct xarray *swap_zswap_tree(swp_entry_t swp) in swap_zswap_tree()
1047 swp_entry_t swpentry) in zswap_writeback_entry()
1145 swp_entry_t swpentry; in shrink_memcg_cb()
1452 swp_entry_t page_swpentry = page_swap_entry(page); in zswap_store_page()
1525 swp_entry_t swp = folio->swap; in zswap_store()
1617 swp_entry_t swp = folio->swap; in zswap_load()
1674 void zswap_invalidate(swp_entry_t swp) in zswap_invalidate()
/linux/arch/sparc/include/asm/
H A Dpgtable_32.h336 static inline unsigned long __swp_type(swp_entry_t entry) in __swp_type()
341 static inline unsigned long __swp_offset(swp_entry_t entry) in __swp_offset()
346 static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset) in __swp_entry()
348 return (swp_entry_t) { in __swp_entry()
353 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
/linux/arch/x86/include/asm/
H A Dpgtable_64.h235 #define __swp_entry(type, offset) ((swp_entry_t) { \
239 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val((pte)) })
240 #define __pmd_to_swp_entry(pmd) ((swp_entry_t) { pmd_val((pmd)) })
H A Dpgtable-2level.h105 #define __swp_entry(type, offset) ((swp_entry_t) { \
108 #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low })
/linux/arch/powerpc/include/asm/nohash/32/
H A Dpgtable.h195 #define __swp_entry(type, offset) ((swp_entry_t) { ((type) & 0x1f) | ((offset) << 5) })
196 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 3 })
/linux/arch/arc/include/asm/
H A Dpgtable-bits-arcv2.h123 #define __swp_entry(type, off) ((swp_entry_t) \
130 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
/linux/arch/sh/include/asm/
H A Dpgtable_32.h456 #define __swp_entry(type, offset) ((swp_entry_t){ ((type) & 0x1f) | (offset) << 5})
457 #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high })
472 #define __swp_entry(type, offset) ((swp_entry_t){((type) & 0x1f) | (offset) << 10})
474 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 1 })
/linux/arch/powerpc/include/asm/nohash/64/
H A Dpgtable.h191 #define __swp_entry(type, offset) ((swp_entry_t) { \
195 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val((pte)) })
/linux/arch/m68k/include/asm/
H A Dsun3_pgtable.h173 #define __swp_entry(type, offset) ((swp_entry_t) { (((type) & 0x3f) | \
175 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
H A Dmcf_pgtable.h272 #define __swp_entry(typ, off) ((swp_entry_t) { ((typ) & 0x7f) | \
274 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
H A Dmotorola_pgtable.h190 #define __swp_entry(type, offset) ((swp_entry_t) { (((type) & 0x7f) << 4) | ((offset) << 12) })
191 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
/linux/arch/hexagon/include/asm/
H A Dpgtable.h336 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
389 ((swp_entry_t) { \
/linux/arch/csky/abiv2/inc/abi/
H A Dpgtable-bits.h48 #define __swp_entry(type, offset) ((swp_entry_t) { \
/linux/arch/csky/abiv1/inc/abi/
H A Dpgtable-bits.h48 #define __swp_entry(type, offset) ((swp_entry_t) { \

123