Lines Matching refs:man
88 int ttm_mem_io_lock(struct ttm_mem_type_manager *man, bool interruptible) in ttm_mem_io_lock() argument
90 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_lock()
94 return mutex_lock_interruptible(&man->io_reserve_mutex); in ttm_mem_io_lock()
96 mutex_lock(&man->io_reserve_mutex); in ttm_mem_io_lock()
101 void ttm_mem_io_unlock(struct ttm_mem_type_manager *man) in ttm_mem_io_unlock() argument
103 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_unlock()
106 mutex_unlock(&man->io_reserve_mutex); in ttm_mem_io_unlock()
110 static int ttm_mem_io_evict(struct ttm_mem_type_manager *man) in ttm_mem_io_evict() argument
114 if (!man->use_io_reserve_lru || list_empty(&man->io_reserve_lru)) in ttm_mem_io_evict()
117 bo = list_first_entry(&man->io_reserve_lru, in ttm_mem_io_evict()
130 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_reserve() local
135 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_reserve()
143 ret = ttm_mem_io_evict(man); in ttm_mem_io_reserve()
155 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_free() local
157 if (likely(man->io_reserve_fastpath)) in ttm_mem_io_free()
174 struct ttm_mem_type_manager *man = in ttm_mem_io_reserve_vm() local
175 &bo->bdev->man[mem->mem_type]; in ttm_mem_io_reserve_vm()
181 if (man->use_io_reserve_lru) in ttm_mem_io_reserve_vm()
183 &man->io_reserve_lru); in ttm_mem_io_reserve_vm()
202 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_reg_ioremap() local
207 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_ioremap()
209 ttm_mem_io_unlock(man); in ttm_mem_reg_ioremap()
221 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_ioremap()
223 ttm_mem_io_unlock(man); in ttm_mem_reg_ioremap()
234 struct ttm_mem_type_manager *man; in ttm_mem_reg_iounmap() local
236 man = &bdev->man[mem->mem_type]; in ttm_mem_reg_iounmap()
240 (void) ttm_mem_io_lock(man, false); in ttm_mem_reg_iounmap()
242 ttm_mem_io_unlock(man); in ttm_mem_reg_iounmap()
336 struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; in ttm_bo_move_memcpy() local
416 if (man->flags & TTM_MEMTYPE_FLAG_FIXED) { in ttm_bo_move_memcpy()
586 struct ttm_mem_type_manager *man = in ttm_bo_kmap() local
587 &bo->bdev->man[bo->mem.mem_type]; in ttm_bo_kmap()
602 (void) ttm_mem_io_lock(man, false); in ttm_bo_kmap()
604 ttm_mem_io_unlock(man); in ttm_bo_kmap()
620 struct ttm_mem_type_manager *man = in ttm_bo_kunmap() local
621 &bo->bdev->man[bo->mem.mem_type]; in ttm_bo_kunmap()
640 (void) ttm_mem_io_lock(man, false); in ttm_bo_kunmap()
642 ttm_mem_io_unlock(man); in ttm_bo_kunmap()
654 struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; in ttm_bo_move_accel_cleanup() local
665 if (man->flags & TTM_MEMTYPE_FLAG_FIXED) { in ttm_bo_move_accel_cleanup()
694 if (!(man->flags & TTM_MEMTYPE_FLAG_FIXED)) in ttm_bo_move_accel_cleanup()
717 struct ttm_mem_type_manager *from = &bdev->man[old_mem->mem_type]; in ttm_bo_pipeline_move()
718 struct ttm_mem_type_manager *to = &bdev->man[new_mem->mem_type]; in ttm_bo_pipeline_move()