Lines Matching refs:man
74 int ttm_mem_io_lock(struct ttm_mem_type_manager *man, bool interruptible) in ttm_mem_io_lock() argument
76 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_lock()
80 if (sx_xlock_sig(&man->io_reserve_mutex)) in ttm_mem_io_lock()
86 sx_xlock(&man->io_reserve_mutex); in ttm_mem_io_lock()
90 void ttm_mem_io_unlock(struct ttm_mem_type_manager *man) in ttm_mem_io_unlock() argument
92 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_unlock()
95 sx_xunlock(&man->io_reserve_mutex); in ttm_mem_io_unlock()
98 static int ttm_mem_io_evict(struct ttm_mem_type_manager *man) in ttm_mem_io_evict() argument
102 if (!man->use_io_reserve_lru || list_empty(&man->io_reserve_lru)) in ttm_mem_io_evict()
105 bo = list_first_entry(&man->io_reserve_lru, in ttm_mem_io_evict()
117 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_reserve() local
122 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_reserve()
130 ret = ttm_mem_io_evict(man); in ttm_mem_io_reserve()
141 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_free() local
143 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_free()
159 struct ttm_mem_type_manager *man = in ttm_mem_io_reserve_vm() local
160 &bo->bdev->man[mem->mem_type]; in ttm_mem_io_reserve_vm()
166 if (man->use_io_reserve_lru) in ttm_mem_io_reserve_vm()
168 &man->io_reserve_lru); in ttm_mem_io_reserve_vm()
188 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_reg_ioremap() local
193 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_ioremap()
195 ttm_mem_io_unlock(man); in ttm_mem_reg_ioremap()
206 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_ioremap()
208 ttm_mem_io_unlock(man); in ttm_mem_reg_ioremap()
220 struct ttm_mem_type_manager *man; in ttm_mem_reg_iounmap() local
222 man = &bdev->man[mem->mem_type]; in ttm_mem_reg_iounmap()
226 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_iounmap()
228 ttm_mem_io_unlock(man); in ttm_mem_reg_iounmap()
296 struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; in ttm_bo_move_memcpy() local
363 if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && (ttm != NULL)) { in ttm_bo_move_memcpy()
531 struct ttm_mem_type_manager *man = in ttm_bo_kmap() local
532 &bo->bdev->man[bo->mem.mem_type]; in ttm_bo_kmap()
547 (void) ttm_mem_io_lock(man, false); in ttm_bo_kmap()
549 ttm_mem_io_unlock(man); in ttm_bo_kmap()
564 struct ttm_mem_type_manager *man = in ttm_bo_kunmap() local
565 &bo->bdev->man[bo->mem.mem_type]; in ttm_bo_kunmap()
586 (void) ttm_mem_io_lock(man, false); in ttm_bo_kunmap()
588 ttm_mem_io_unlock(man); in ttm_bo_kunmap()
602 struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; in ttm_bo_move_accel_cleanup() local
622 if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && in ttm_bo_move_accel_cleanup()
653 if (!(man->flags & TTM_MEMTYPE_FLAG_FIXED)) in ttm_bo_move_accel_cleanup()