/linux/drivers/dma-buf/ |
H A D | st-dma-resv.c | 40 struct dma_resv resv; in sanitycheck() local 53 dma_resv_init(&resv); in sanitycheck() 54 r = dma_resv_lock(&resv, NULL); in sanitycheck() 58 dma_resv_unlock(&resv); in sanitycheck() 59 dma_resv_fini(&resv); in sanitycheck() 66 struct dma_resv resv; in test_signaling() local 76 dma_resv_init(&resv); in test_signaling() 77 r = dma_resv_lock(&resv, NULL); in test_signaling() 83 r = dma_resv_reserve_fences(&resv, 1); in test_signaling() 89 dma_resv_add_fence(&resv, f, usage); in test_signaling() [all …]
|
H A D | dma-buf.c | 104 if (dmabuf->resv == (struct dma_resv *)&dmabuf[1]) in dma_buf_release() 105 dma_resv_fini(dmabuf->resv); in dma_buf_release() 235 static bool dma_buf_poll_add_cb(struct dma_resv *resv, bool write, in dma_buf_poll_add_cb() argument 242 dma_resv_for_each_fence(&cursor, resv, dma_resv_usage_rw(write), in dma_buf_poll_add_cb() 257 struct dma_resv *resv; in dma_buf_poll() local 261 if (!dmabuf || !dmabuf->resv) in dma_buf_poll() 264 resv = dmabuf->resv; in dma_buf_poll() 272 dma_resv_lock(resv, NULL); in dma_buf_poll() 289 if (!dma_buf_poll_add_cb(resv, true, dcb)) in dma_buf_poll() 312 if (!dma_buf_poll_add_cb(resv, false, dcb)) in dma_buf_poll() [all …]
|
/linux/fs/xfs/scrub/ |
H A D | newbt.c | 91 enum xfs_ag_resv_type resv) in xrep_newbt_init_ag() argument 97 xnr->resv = resv; in xrep_newbt_init_ag() 186 struct xrep_newbt_resv *resv; in xrep_newbt_add_blocks() local 189 resv = kmalloc(sizeof(struct xrep_newbt_resv), XCHK_GFP_FLAGS); in xrep_newbt_add_blocks() 190 if (!resv) in xrep_newbt_add_blocks() 193 INIT_LIST_HEAD(&resv->list); in xrep_newbt_add_blocks() 194 resv->agbno = XFS_FSB_TO_AGBNO(mp, args->fsbno); in xrep_newbt_add_blocks() 195 resv->len = args->len; in xrep_newbt_add_blocks() 196 resv->used = 0; in xrep_newbt_add_blocks() 197 resv->pag = xfs_perag_hold(pag); in xrep_newbt_add_blocks() [all …]
|
H A D | alloc_repair.c | 533 struct xrep_newbt_resv *resv) in xrep_abt_dispose_one() argument 537 xfs_agblock_t free_agbno = resv->agbno + resv->used; in xrep_abt_dispose_one() 538 xfs_extlen_t free_aglen = resv->len - resv->used; in xrep_abt_dispose_one() 541 ASSERT(pag == resv->pag); in xrep_abt_dispose_one() 544 if (resv->used > 0) in xrep_abt_dispose_one() 546 xfs_agbno_to_fsb(pag, resv->agbno), resv->used, in xrep_abt_dispose_one() 557 trace_xrep_newbt_free_blocks(resv->pag, free_agbno, free_aglen, in xrep_abt_dispose_one() 560 error = __xfs_free_extent(sc->tp, resv->pag, free_agbno, free_aglen, in xrep_abt_dispose_one() 579 struct xrep_newbt_resv *resv, *n; in xrep_abt_dispose_reservations() local 584 list_for_each_entry_safe(resv, n, &ra->new_bnobt.resv_list, list) { in xrep_abt_dispose_reservations() [all …]
|
/linux/fs/xfs/libxfs/ |
H A D | xfs_ag_resv.c | 136 struct xfs_ag_resv *resv; in __xfs_ag_resv_free() local 141 resv = xfs_perag_resv(pag, type); in __xfs_ag_resv_free() 143 pag_mount(pag)->m_ag_max_usable += resv->ar_asked; in __xfs_ag_resv_free() 150 oldresv = resv->ar_orig_reserved; in __xfs_ag_resv_free() 152 oldresv = resv->ar_reserved; in __xfs_ag_resv_free() 154 resv->ar_reserved = 0; in __xfs_ag_resv_free() 155 resv->ar_asked = 0; in __xfs_ag_resv_free() 156 resv->ar_orig_reserved = 0; in __xfs_ag_resv_free() 176 struct xfs_ag_resv *resv; in __xfs_ag_resv_init() local 227 resv = xfs_perag_resv(pag, type); in __xfs_ag_resv_init() [all …]
|
/linux/drivers/gpu/drm/ttm/tests/ |
H A D | ttm_bo_test.c | 70 dma_resv_unlock(bo->base.resv); in ttm_bo_reserve_optimistic_no_ticket() 83 dma_resv_lock(bo->base.resv, NULL); in ttm_bo_reserve_locked_no_sleep() 86 dma_resv_unlock(bo->base.resv); in ttm_bo_reserve_locked_no_sleep() 126 dma_resv_unlock(bo->base.resv); in ttm_bo_reserve_double_resv() 151 ww_mutex_base_lock(&bo2->base.resv->lock.base); in ttm_bo_reserve_deadlock() 154 lock_release(&bo2->base.resv->lock.base.dep_map, 1); in ttm_bo_reserve_deadlock() 156 bo2->base.resv->lock.ctx = &ctx2; in ttm_bo_reserve_deadlock() 166 dma_resv_unlock(bo1->base.resv); in ttm_bo_reserve_deadlock() 225 mutex_lock(&bo->base.resv->lock.base); in ttm_bo_reserve_interrupted() 231 mutex_unlock(&bo->base.resv->lock.base); in ttm_bo_reserve_interrupted() [all …]
|
H A D | ttm_bo_validate_test.c | 66 struct dma_resv *resv, in dma_resv_kunit_active_fence_init() argument 74 dma_resv_lock(resv, NULL); in dma_resv_kunit_active_fence_init() 75 dma_resv_reserve_fences(resv, 1); in dma_resv_kunit_active_fence_init() 76 dma_resv_add_fence(resv, fence, usage); in dma_resv_kunit_active_fence_init() 77 dma_resv_unlock(resv); in dma_resv_kunit_active_fence_init() 127 dma_resv_unlock(bo->base.resv); in ttm_bo_init_reserved_sys_man() 139 KUNIT_EXPECT_NOT_NULL(test, (void *)bo->base.resv->fences); in ttm_bo_init_reserved_sys_man() 176 dma_resv_unlock(bo->base.resv); in ttm_bo_init_reserved_mock_man() 202 struct dma_resv resv; in ttm_bo_init_reserved_resv() local 212 dma_resv_init(&resv); in ttm_bo_init_reserved_resv() [all …]
|
/linux/drivers/gpu/drm/ttm/ |
H A D | ttm_bo.c | 77 dma_resv_assert_held(bo->base.resv); in ttm_bo_move_to_lru_tail() 101 dma_resv_assert_held(bo->base.resv); in ttm_bo_set_bulk_move() 149 ret = dma_resv_reserve_fences(bo->base.resv, 1); in ttm_bo_handle_move_mem() 191 if (bo->base.resv == &bo->base._resv) in ttm_bo_individualize_resv() 196 r = dma_resv_copy_fences(&bo->base._resv, bo->base.resv); in ttm_bo_individualize_resv() 207 bo->base.resv = &bo->base._resv; in ttm_bo_individualize_resv() 216 struct dma_resv *resv = &bo->base._resv; in ttm_bo_flush_all_fences() local 220 dma_resv_iter_begin(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP); in ttm_bo_flush_all_fences() 238 dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, false, in ttm_bo_delayed_delete() 240 dma_resv_lock(bo->base.resv, NULL); in ttm_bo_delayed_delete() [all …]
|
H A D | ttm_execbuf_util.c | 38 dma_resv_unlock(bo->base.resv); in ttm_eu_backoff_reservation_reverse() 54 dma_resv_unlock(bo->base.resv); in ttm_eu_backoff_reservation() 102 ret = dma_resv_reserve_fences(bo->base.resv, in ttm_eu_reserve_buffers() 119 ret = dma_resv_reserve_fences(bo->base.resv, in ttm_eu_reserve_buffers() 153 dma_resv_add_fence(bo->base.resv, fence, entry->num_shared ? in ttm_eu_fence_buffer_objects() 156 dma_resv_unlock(bo->base.resv); in ttm_eu_fence_buffer_objects()
|
H A D | ttm_bo_util.c | 250 fbo->base.base.resv = &fbo->base.base._resv; in ttm_buffer_object_transfer() 474 dma_resv_assert_held(bo->base.resv); in ttm_bo_vmap() 542 dma_resv_assert_held(bo->base.resv); in ttm_bo_vunmap() 562 ret = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, in ttm_bo_wait_free_node() 662 dma_resv_add_fence(bo->base.resv, fence, DMA_RESV_USAGE_KERNEL); in ttm_bo_move_accel_cleanup() 721 if (dma_resv_test_signaled(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP)) { in ttm_bo_pipeline_gutting() 755 ret = dma_resv_copy_fences(&ghost->base._resv, bo->base.resv); in ttm_bo_pipeline_gutting() 758 dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, in ttm_bo_pipeline_gutting() 780 if (dma_resv_trylock(bo->base.resv)) { in ttm_lru_walk_trylock() 785 if (bo->base.resv == ctx->resv && ctx->allow_res_evict) { in ttm_lru_walk_trylock() [all …]
|
H A D | ttm_bo_vm.c | 49 if (dma_resv_test_signaled(bo->base.resv, DMA_RESV_USAGE_KERNEL)) in ttm_bo_vm_fault_idle() 63 (void)dma_resv_wait_timeout(bo->base.resv, in ttm_bo_vm_fault_idle() 66 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_fault_idle() 74 err = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_KERNEL, true, in ttm_bo_vm_fault_idle() 125 if (unlikely(!dma_resv_trylock(bo->base.resv))) { in ttm_bo_vm_reserve() 135 if (!dma_resv_lock_interruptible(bo->base.resv, in ttm_bo_vm_reserve() 137 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_reserve() 144 if (dma_resv_lock_interruptible(bo->base.resv, NULL)) in ttm_bo_vm_reserve() 154 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_reserve() 344 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_fault()
|
/linux/drivers/gpu/drm/ |
H A D | drm_gem_shmem_helper.c | 166 dma_resv_lock(shmem->base.resv, NULL); in drm_gem_shmem_free() 181 dma_resv_unlock(shmem->base.resv); in drm_gem_shmem_free() 194 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_get_pages() 232 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_put_pages() 256 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_pin_locked() 268 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_unpin_locked() 291 ret = dma_resv_lock_interruptible(shmem->base.resv, NULL); in drm_gem_shmem_pin() 295 dma_resv_unlock(shmem->base.resv); in drm_gem_shmem_pin() 314 dma_resv_lock(shmem->base.resv, NULL); in drm_gem_shmem_unpin() 316 dma_resv_unlock(shmem->base.resv); in drm_gem_shmem_unpin() [all …]
|
H A D | drm_exec.c | 60 dma_resv_unlock(obj->resv); in drm_exec_unlock_all() 173 ret = dma_resv_lock_slow_interruptible(obj->resv, in drm_exec_lock_contended() 178 dma_resv_lock_slow(obj->resv, &exec->ticket); in drm_exec_lock_contended() 189 dma_resv_unlock(obj->resv); in drm_exec_lock_contended() 222 ret = dma_resv_lock_interruptible(obj->resv, &exec->ticket); in drm_exec_lock_obj() 224 ret = dma_resv_lock(obj->resv, &exec->ticket); in drm_exec_lock_obj() 246 dma_resv_unlock(obj->resv); in drm_exec_lock_obj() 266 dma_resv_unlock(obj->resv); in drm_exec_unlock_obj() 298 ret = dma_resv_reserve_fences(obj->resv, num_fences); in drm_exec_prepare_obj()
|
H A D | drm_gem.c | 190 if (!obj->resv) in drm_gem_private_object_init() 191 obj->resv = &obj->_resv; in drm_gem_private_object_init() 805 ret = dma_resv_wait_timeout(obj->resv, dma_resv_usage_rw(wait_all), in drm_gem_dma_resv_wait() 1205 dma_resv_lock(obj->resv, NULL); in drm_gem_pin() 1207 dma_resv_unlock(obj->resv); in drm_gem_pin() 1214 dma_resv_lock(obj->resv, NULL); in drm_gem_unpin() 1216 dma_resv_unlock(obj->resv); in drm_gem_unpin() 1223 dma_resv_assert_held(obj->resv); in drm_gem_vmap() 1240 dma_resv_assert_held(obj->resv); in drm_gem_vunmap() 1255 dma_resv_lock(obj->resv, NULL); in drm_gem_lock() [all …]
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_dma_buf.c | 292 struct dma_resv *resv = dma_buf->resv; in amdgpu_dma_buf_create_obj() local 299 dma_resv_lock(resv, NULL); in amdgpu_dma_buf_create_obj() 312 ttm_bo_type_sg, resv, &gobj, 0); in amdgpu_dma_buf_create_obj() 320 dma_resv_unlock(resv); in amdgpu_dma_buf_create_obj() 324 dma_resv_unlock(resv); in amdgpu_dma_buf_create_obj() 340 struct ww_acquire_ctx *ticket = dma_resv_locking_ctx(obj->resv); in amdgpu_dma_buf_move_notify() 363 struct dma_resv *resv = vm->root.bo->tbo.base.resv; in amdgpu_dma_buf_move_notify() local 370 r = dma_resv_lock(resv, ticket); in amdgpu_dma_buf_move_notify() 379 if (!dma_resv_trylock(resv)) in amdgpu_dma_buf_move_notify() 384 r = dma_resv_reserve_fences(resv, 2); in amdgpu_dma_buf_move_notify() [all …]
|
/linux/fs/ocfs2/ |
H A D | reservations.h | 54 void ocfs2_resv_init_once(struct ocfs2_alloc_reservation *resv); 57 void ocfs2_resv_set_type(struct ocfs2_alloc_reservation *resv, 65 * @resv: the reservation to truncate. 71 struct ocfs2_alloc_reservation *resv); 107 * @resv: reservation to base search from 111 * Using the reservation data from resv, this function will compare 113 * the reservation window is still clear to use. If resv is empty, 122 struct ocfs2_alloc_reservation *resv, 128 * @resv: optional reservation to recalculate based on new bitmap 136 * reservations bitmap. If resv i [all...] |
/linux/drivers/gpu/drm/vgem/ |
H A D | vgem_fence.c | 131 struct dma_resv *resv; in vgem_fence_attach_ioctl() local 154 resv = obj->resv; in vgem_fence_attach_ioctl() 156 if (!dma_resv_test_signaled(resv, usage)) { in vgem_fence_attach_ioctl() 162 dma_resv_lock(resv, NULL); in vgem_fence_attach_ioctl() 163 ret = dma_resv_reserve_fences(resv, 1); in vgem_fence_attach_ioctl() 165 dma_resv_add_fence(resv, fence, arg->flags & VGEM_FENCE_WRITE ? in vgem_fence_attach_ioctl() 167 dma_resv_unlock(resv); in vgem_fence_attach_ioctl()
|
/linux/drivers/gpu/drm/virtio/ |
H A D | virtgpu_prime.c | 135 exp_info.resv = obj->resv; in virtgpu_gem_prime_export() 156 dma_resv_assert_held(attach->dmabuf->resv); in virtgpu_dma_buf_import_sgt() 158 ret = dma_resv_wait_timeout(attach->dmabuf->resv, in virtgpu_dma_buf_import_sgt() 196 dma_resv_lock(dmabuf->resv, NULL); in virtgpu_dma_buf_free_obj() 204 dma_resv_unlock(dmabuf->resv); in virtgpu_dma_buf_free_obj() 224 struct dma_resv *resv = attach->dmabuf->resv; in virtgpu_dma_buf_init_obj() local 235 dma_resv_lock(resv, NULL); in virtgpu_dma_buf_init_obj() 256 dma_resv_unlock(resv); in virtgpu_dma_buf_init_obj() 263 dma_resv_unlock(resv); in virtgpu_dma_buf_init_obj()
|
/linux/tools/include/uapi/linux/ |
H A D | io_uring.h | 493 __u32 resv[3]; member 577 __u32 resv; member 597 __u32 resv; member 603 __u32 resv; member 617 __u8 resv; member 625 __u16 resv; member 637 __u8 resv; member 645 __u16 resv; member 684 __u64 resv[3]; member 733 __u64 resv; member
|
/linux/include/uapi/linux/ |
H A D | io_uring.h | 556 __u32 resv[3]; member 665 __u32 resv; member 710 __u32 resv; member 716 __u32 resv; member 730 __u8 resv; member 738 __u16 resv; member 750 __u8 resv; member 777 __u16 resv; member 824 __u64 resv[3]; member 831 __u32 resv[8]; member [all …]
|
/linux/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_wait.c | 36 i915_gem_object_boost(struct dma_resv *resv, unsigned int flags) in i915_gem_object_boost() argument 57 dma_resv_iter_begin(&cursor, resv, in i915_gem_object_boost() 67 i915_gem_object_wait_reservation(struct dma_resv *resv, in i915_gem_object_wait_reservation() argument 75 i915_gem_object_boost(resv, flags); in i915_gem_object_wait_reservation() 77 dma_resv_iter_begin(&cursor, resv, in i915_gem_object_wait_reservation() 155 dma_resv_iter_begin(&cursor, obj->base.resv, in i915_gem_object_wait_priority() 177 timeout = i915_gem_object_wait_reservation(obj->base.resv, in i915_gem_object_wait()
|
/linux/include/drm/ttm/ |
H A D | ttm_bo.h | 189 struct dma_resv *resv; member 290 success = dma_resv_trylock(bo->base.resv); in ttm_bo_reserve() 295 ret = dma_resv_lock_interruptible(bo->base.resv, ticket); in ttm_bo_reserve() 297 ret = dma_resv_lock(bo->base.resv, ticket); in ttm_bo_reserve() 318 int ret = dma_resv_lock_slow_interruptible(bo->base.resv, in ttm_bo_reserve_slowpath() 324 dma_resv_lock_slow(bo->base.resv, ticket); in ttm_bo_reserve_slowpath() 369 dma_resv_unlock(bo->base.resv); in ttm_bo_unreserve() 403 struct sg_table *sg, struct dma_resv *resv, 408 struct sg_table *sg, struct dma_resv *resv,
|
/linux/drivers/gpu/drm/radeon/ |
H A D | radeon_prime.c | 49 struct dma_resv *resv = attach->dmabuf->resv; in radeon_gem_prime_import_sg_table() local 54 dma_resv_lock(resv, NULL); in radeon_gem_prime_import_sg_table() 56 RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); in radeon_gem_prime_import_sg_table() 57 dma_resv_unlock(resv); in radeon_gem_prime_import_sg_table()
|
/linux/drivers/gpu/drm/loongson/ |
H A D | lsdc_gem.c | 22 dma_resv_assert_held(obj->resv); in lsdc_gem_prime_pin() 35 dma_resv_assert_held(obj->resv); in lsdc_gem_prime_unpin() 145 struct dma_resv *resv) in lsdc_gem_object_create() argument 152 lbo = lsdc_bo_create(ddev, domain, size, kerenl, sg, resv); in lsdc_gem_object_create() 179 struct dma_resv *resv = attach->dmabuf->resv; in lsdc_prime_import_sg_table() local 184 dma_resv_lock(resv, NULL); in lsdc_prime_import_sg_table() 186 sg, resv); in lsdc_prime_import_sg_table() 187 dma_resv_unlock(resv); in lsdc_prime_import_sg_table()
|
/linux/kernel/irq/ |
H A D | affinity.c | 113 unsigned int resv = affd->pre_vectors + affd->post_vectors; in irq_calc_affinity_vectors() local 116 if (resv > minvec) in irq_calc_affinity_vectors() 120 set_vecs = maxvec - resv; in irq_calc_affinity_vectors() 127 return resv + min(set_vecs, maxvec - resv); in irq_calc_affinity_vectors()
|