Lines Matching refs:man

80 int ttm_mem_io_lock(struct ttm_mem_type_manager *man, bool interruptible)  in ttm_mem_io_lock()  argument
82 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_lock()
86 return mutex_lock_interruptible(&man->io_reserve_mutex); in ttm_mem_io_lock()
88 mutex_lock(&man->io_reserve_mutex); in ttm_mem_io_lock()
93 void ttm_mem_io_unlock(struct ttm_mem_type_manager *man) in ttm_mem_io_unlock() argument
95 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_unlock()
98 mutex_unlock(&man->io_reserve_mutex); in ttm_mem_io_unlock()
102 static int ttm_mem_io_evict(struct ttm_mem_type_manager *man) in ttm_mem_io_evict() argument
106 if (!man->use_io_reserve_lru || list_empty(&man->io_reserve_lru)) in ttm_mem_io_evict()
109 bo = list_first_entry(&man->io_reserve_lru, in ttm_mem_io_evict()
122 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_reserve() local
127 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_reserve()
135 ret = ttm_mem_io_evict(man); in ttm_mem_io_reserve()
147 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_free() local
149 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_free()
166 struct ttm_mem_type_manager *man = in ttm_mem_io_reserve_vm() local
167 &bo->bdev->man[mem->mem_type]; in ttm_mem_io_reserve_vm()
173 if (man->use_io_reserve_lru) in ttm_mem_io_reserve_vm()
175 &man->io_reserve_lru); in ttm_mem_io_reserve_vm()
194 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_reg_ioremap() local
199 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_ioremap()
201 ttm_mem_io_unlock(man); in ttm_mem_reg_ioremap()
213 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_ioremap()
215 ttm_mem_io_unlock(man); in ttm_mem_reg_ioremap()
226 struct ttm_mem_type_manager *man; in ttm_mem_reg_iounmap() local
228 man = &bdev->man[mem->mem_type]; in ttm_mem_reg_iounmap()
232 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_iounmap()
234 ttm_mem_io_unlock(man); in ttm_mem_reg_iounmap()
328 struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; in ttm_bo_move_memcpy() local
404 if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && (ttm != NULL)) { in ttm_bo_move_memcpy()
571 struct ttm_mem_type_manager *man = in ttm_bo_kmap() local
572 &bo->bdev->man[bo->mem.mem_type]; in ttm_bo_kmap()
587 (void) ttm_mem_io_lock(man, false); in ttm_bo_kmap()
589 ttm_mem_io_unlock(man); in ttm_bo_kmap()
605 struct ttm_mem_type_manager *man = in ttm_bo_kunmap() local
606 &bo->bdev->man[bo->mem.mem_type]; in ttm_bo_kunmap()
625 (void) ttm_mem_io_lock(man, false); in ttm_bo_kunmap()
627 ttm_mem_io_unlock(man); in ttm_bo_kunmap()
640 struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; in ttm_bo_move_accel_cleanup() local
651 if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && in ttm_bo_move_accel_cleanup()
681 if (!(man->flags & TTM_MEMTYPE_FLAG_FIXED)) in ttm_bo_move_accel_cleanup()