• Home
  • Raw
  • Download

Lines Matching refs:handle

76 	int (*evict)(struct z3fold_pool *pool, unsigned long handle);
233 static inline struct z3fold_buddy_slots *handle_to_slots(unsigned long handle) in handle_to_slots() argument
235 return (struct z3fold_buddy_slots *)(handle & ~(SLOTS_ALIGN - 1)); in handle_to_slots()
257 static inline struct z3fold_header *__get_z3fold_header(unsigned long handle, in __get_z3fold_header() argument
264 if (!(handle & (1 << PAGE_HEADLESS))) { in __get_z3fold_header()
265 slots = handle_to_slots(handle); in __get_z3fold_header()
270 addr = *(unsigned long *)handle; in __get_z3fold_header()
280 zhdr = (struct z3fold_header *)(handle & PAGE_MASK); in __get_z3fold_header()
306 static inline void free_handle(unsigned long handle, struct z3fold_header *zhdr) in free_handle() argument
312 if (handle & (1 << PAGE_HEADLESS)) in free_handle()
315 if (WARN_ON(*(unsigned long *)handle == 0)) in free_handle()
318 slots = handle_to_slots(handle); in free_handle()
320 *(unsigned long *)handle = 0; in free_handle()
487 static unsigned short handle_to_chunks(unsigned long handle) in handle_to_chunks() argument
489 struct z3fold_buddy_slots *slots = handle_to_slots(handle); in handle_to_chunks()
493 addr = *(unsigned long *)handle; in handle_to_chunks()
503 static enum buddy handle_to_buddy(unsigned long handle) in handle_to_buddy() argument
506 struct z3fold_buddy_slots *slots = handle_to_slots(handle); in handle_to_buddy()
510 WARN_ON(handle & (1 << PAGE_HEADLESS)); in handle_to_buddy()
511 addr = *(unsigned long *)handle; in handle_to_buddy()
1090 unsigned long *handle) in z3fold_alloc() argument
1194 *handle = encode_handle(zhdr, bud); in z3fold_alloc()
1212 static void z3fold_free(struct z3fold_pool *pool, unsigned long handle) in z3fold_free() argument
1219 zhdr = get_z3fold_header(handle); in z3fold_free()
1241 bud = handle_to_buddy(handle); in z3fold_free()
1261 free_handle(handle, zhdr); in z3fold_free()
1502 static void *z3fold_map(struct z3fold_pool *pool, unsigned long handle) in z3fold_map() argument
1509 zhdr = get_z3fold_header(handle); in z3fold_map()
1516 buddy = handle_to_buddy(handle); in z3fold_map()
1526 addr += PAGE_SIZE - (handle_to_chunks(handle) << CHUNK_SHIFT); in z3fold_map()
1547 static void z3fold_unmap(struct z3fold_pool *pool, unsigned long handle) in z3fold_unmap() argument
1553 zhdr = get_z3fold_header(handle); in z3fold_unmap()
1559 buddy = handle_to_buddy(handle); in z3fold_unmap()
1715 static int z3fold_zpool_evict(struct z3fold_pool *pool, unsigned long handle) in z3fold_zpool_evict() argument
1718 return pool->zpool_ops->evict(pool->zpool, handle); in z3fold_zpool_evict()
1748 unsigned long *handle) in z3fold_zpool_malloc() argument
1750 return z3fold_alloc(pool, size, gfp, handle); in z3fold_zpool_malloc()
1752 static void z3fold_zpool_free(void *pool, unsigned long handle) in z3fold_zpool_free() argument
1754 z3fold_free(pool, handle); in z3fold_zpool_free()
1776 static void *z3fold_zpool_map(void *pool, unsigned long handle, in z3fold_zpool_map() argument
1779 return z3fold_map(pool, handle); in z3fold_zpool_map()
1781 static void z3fold_zpool_unmap(void *pool, unsigned long handle) in z3fold_zpool_unmap() argument
1783 z3fold_unmap(pool, handle); in z3fold_zpool_unmap()