/openbmc/linux/fs/ocfs2/ |
H A D | reservations.c | 40 struct ocfs2_alloc_reservation *resv) in ocfs2_resv_window_bits() argument 45 if (!(resv->r_flags & OCFS2_RESV_FLAG_DIR)) { in ocfs2_resv_window_bits() 54 static inline unsigned int ocfs2_resv_end(struct ocfs2_alloc_reservation *resv) in ocfs2_resv_end() argument 56 if (resv->r_len) in ocfs2_resv_end() 57 return resv->r_start + resv->r_len - 1; in ocfs2_resv_end() 58 return resv->r_start; in ocfs2_resv_end() 61 static inline int ocfs2_resv_empty(struct ocfs2_alloc_reservation *resv) in ocfs2_resv_empty() argument 63 return !!(resv->r_len == 0); in ocfs2_resv_empty() 77 struct ocfs2_alloc_reservation *resv; in ocfs2_dump_resv() local 85 resv = rb_entry(node, struct ocfs2_alloc_reservation, r_node); in ocfs2_dump_resv() [all …]
|
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, 71 struct ocfs2_alloc_reservation *resv); 122 struct ocfs2_alloc_reservation *resv, 141 struct ocfs2_alloc_reservation *resv,
|
/openbmc/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 | 81 if (dmabuf->resv == (struct dma_resv *)&dmabuf[1]) in dma_buf_release() 82 dma_resv_fini(dmabuf->resv); in dma_buf_release() 218 static bool dma_buf_poll_add_cb(struct dma_resv *resv, bool write, in dma_buf_poll_add_cb() argument 225 dma_resv_for_each_fence(&cursor, resv, dma_resv_usage_rw(write), in dma_buf_poll_add_cb() 240 struct dma_resv *resv; in dma_buf_poll() local 244 if (!dmabuf || !dmabuf->resv) in dma_buf_poll() 247 resv = dmabuf->resv; in dma_buf_poll() 255 dma_resv_lock(resv, NULL); in dma_buf_poll() 272 if (!dma_buf_poll_add_cb(resv, true, dcb)) in dma_buf_poll() 295 if (!dma_buf_poll_add_cb(resv, false, dcb)) in dma_buf_poll() [all …]
|
/openbmc/linux/fs/xfs/libxfs/ |
H A D | xfs_log_rlimit.c | 47 struct xfs_trans_resv *resv) in xfs_log_calc_trans_resv_for_minlogblocks() argument 62 xfs_trans_resv_calc(mp, resv); in xfs_log_calc_trans_resv_for_minlogblocks() 69 resv->tr_write.tr_logcount = XFS_WRITE_LOG_COUNT_REFLINK; in xfs_log_calc_trans_resv_for_minlogblocks() 70 resv->tr_itruncate.tr_logcount = in xfs_log_calc_trans_resv_for_minlogblocks() 72 resv->tr_qm_dqalloc.tr_logcount = XFS_WRITE_LOG_COUNT_REFLINK; in xfs_log_calc_trans_resv_for_minlogblocks() 78 resv->tr_write.tr_logcount = XFS_WRITE_LOG_COUNT; in xfs_log_calc_trans_resv_for_minlogblocks() 79 resv->tr_itruncate.tr_logcount = XFS_ITRUNCATE_LOG_COUNT; in xfs_log_calc_trans_resv_for_minlogblocks() 80 resv->tr_qm_dqalloc.tr_logcount = XFS_WRITE_LOG_COUNT; in xfs_log_calc_trans_resv_for_minlogblocks() 88 resv->tr_write.tr_logres = in xfs_log_calc_trans_resv_for_minlogblocks() 90 resv->tr_itruncate.tr_logres = in xfs_log_calc_trans_resv_for_minlogblocks() [all …]
|
H A D | xfs_ag_resv.c | 134 struct xfs_ag_resv *resv; in __xfs_ag_resv_free() local 140 resv = xfs_perag_resv(pag, type); in __xfs_ag_resv_free() 142 pag->pag_mount->m_ag_max_usable += resv->ar_asked; in __xfs_ag_resv_free() 149 oldresv = resv->ar_orig_reserved; in __xfs_ag_resv_free() 151 oldresv = resv->ar_reserved; in __xfs_ag_resv_free() 153 resv->ar_reserved = 0; in __xfs_ag_resv_free() 154 resv->ar_asked = 0; in __xfs_ag_resv_free() 155 resv->ar_orig_reserved = 0; in __xfs_ag_resv_free() 186 struct xfs_ag_resv *resv; in __xfs_ag_resv_init() local 238 resv = xfs_perag_resv(pag, type); in __xfs_ag_resv_init() [all …]
|
/openbmc/linux/drivers/gpu/drm/ttm/ |
H A D | ttm_bo.c | 76 dma_resv_assert_held(bo->base.resv); in ttm_bo_move_to_lru_tail() 100 dma_resv_assert_held(bo->base.resv); in ttm_bo_set_bulk_move() 148 ret = dma_resv_reserve_fences(bo->base.resv, 1); in ttm_bo_handle_move_mem() 190 if (bo->base.resv == &bo->base._resv) in ttm_bo_individualize_resv() 195 r = dma_resv_copy_fences(&bo->base._resv, bo->base.resv); in ttm_bo_individualize_resv() 206 bo->base.resv = &bo->base._resv; in ttm_bo_individualize_resv() 215 struct dma_resv *resv = &bo->base._resv; in ttm_bo_flush_all_fences() local 219 dma_resv_iter_begin(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP); in ttm_bo_flush_all_fences() 245 struct dma_resv *resv = &bo->base._resv; in ttm_bo_cleanup_refs() local 248 if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP)) in ttm_bo_cleanup_refs() [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_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()
|
/openbmc/linux/drivers/gpu/drm/ |
H A D | drm_gem_shmem_helper.c | 145 dma_resv_lock(shmem->base.resv, NULL); in drm_gem_shmem_free() 160 dma_resv_unlock(shmem->base.resv); in drm_gem_shmem_free() 173 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_get_pages() 211 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_put_pages() 235 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_pin_locked() 244 dma_resv_assert_held(shmem->base.resv); in drm_gem_shmem_unpin_locked() 266 ret = dma_resv_lock_interruptible(shmem->base.resv, NULL); in drm_gem_shmem_pin() 270 dma_resv_unlock(shmem->base.resv); in drm_gem_shmem_pin() 289 dma_resv_lock(shmem->base.resv, NULL); in drm_gem_shmem_unpin() 291 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() 167 ret = dma_resv_lock_slow_interruptible(obj->resv, in drm_exec_lock_contended() 172 dma_resv_lock_slow(obj->resv, &exec->ticket); in drm_exec_lock_contended() 183 dma_resv_unlock(obj->resv); in drm_exec_lock_contended() 216 ret = dma_resv_lock_interruptible(obj->resv, &exec->ticket); in drm_exec_lock_obj() 218 ret = dma_resv_lock(obj->resv, &exec->ticket); in drm_exec_lock_obj() 240 dma_resv_unlock(obj->resv); in drm_exec_lock_obj() 260 dma_resv_unlock(obj->resv); in drm_exec_unlock_obj() 292 ret = dma_resv_reserve_fences(obj->resv, num_fences); in drm_exec_prepare_obj()
|
H A D | drm_gem.c | 164 if (!obj->resv) in drm_gem_private_object_init() 165 obj->resv = &obj->_resv; in drm_gem_private_object_init() 782 ret = dma_resv_wait_timeout(obj->resv, dma_resv_usage_rw(wait_all), in drm_gem_dma_resv_wait() 1182 dma_resv_assert_held(obj->resv); in drm_gem_vmap() 1199 dma_resv_assert_held(obj->resv); in drm_gem_vunmap() 1216 dma_resv_lock(obj->resv, NULL); in drm_gem_vmap_unlocked() 1218 dma_resv_unlock(obj->resv); in drm_gem_vmap_unlocked() 1226 dma_resv_lock(obj->resv, NULL); in drm_gem_vunmap_unlocked() 1228 dma_resv_unlock(obj->resv); in drm_gem_vunmap_unlocked() 1258 ret = dma_resv_lock_slow_interruptible(obj->resv, in drm_gem_lock_reservations() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_dma_buf.c | 320 struct dma_resv *resv = dma_buf->resv; in amdgpu_dma_buf_create_obj() local 327 dma_resv_lock(resv, NULL); in amdgpu_dma_buf_create_obj() 339 ttm_bo_type_sg, resv, &gobj, 0); in amdgpu_dma_buf_create_obj() 347 dma_resv_unlock(resv); in amdgpu_dma_buf_create_obj() 351 dma_resv_unlock(resv); in amdgpu_dma_buf_create_obj() 367 struct ww_acquire_ctx *ticket = dma_resv_locking_ctx(obj->resv); in amdgpu_dma_buf_move_notify() 386 struct dma_resv *resv = vm->root.bo->tbo.base.resv; in amdgpu_dma_buf_move_notify() local 393 r = dma_resv_lock(resv, ticket); in amdgpu_dma_buf_move_notify() 402 if (!dma_resv_trylock(resv)) in amdgpu_dma_buf_move_notify() 407 r = dma_resv_reserve_fences(resv, 2); in amdgpu_dma_buf_move_notify() [all …]
|
H A D | amdgpu_vm.c | 320 if (bo->tbo.base.resv != vm->root.bo->tbo.base.resv) in amdgpu_vm_bo_base_init() 323 dma_resv_assert_held(vm->root.bo->tbo.base.resv); in amdgpu_vm_bo_base_init() 849 * @resv: fences we need to sync to 866 struct dma_resv *resv, uint64_t start, uint64_t last, in amdgpu_vm_update_range() argument 926 r = vm->update_funcs->prepare(¶ms, resv, sync_mode); in amdgpu_vm_update_range() 1021 if (bo->tbo.base.resv != vm->root.bo->tbo.base.resv && in amdgpu_vm_bo_get_memory() 1022 !dma_resv_trylock(bo->tbo.base.resv)) in amdgpu_vm_bo_get_memory() 1026 if (bo->tbo.base.resv ! in amdgpu_vm_bo_get_memory() 1078 struct dma_resv *resv; amdgpu_vm_bo_update() local 1301 struct dma_resv *resv = vm->root.bo->tbo.base.resv; amdgpu_vm_prt_fini() local 1331 struct dma_resv *resv = vm->root.bo->tbo.base.resv; amdgpu_vm_clear_freed() local 1385 struct dma_resv *resv; amdgpu_vm_handle_moved() local [all...] |
H A D | amdgpu_vm_cpu.c | 49 struct dma_resv *resv, in amdgpu_vm_cpu_prepare() argument 52 if (!resv) in amdgpu_vm_cpu_prepare() 55 return amdgpu_bo_sync_wait_resv(p->adev, resv, sync_mode, p->vm, true); in amdgpu_vm_cpu_prepare() 80 r = dma_resv_wait_timeout(vmbo->bo.tbo.base.resv, DMA_RESV_USAGE_KERNEL, in amdgpu_vm_cpu_update()
|
H A D | amdgpu_object.c | 269 bp.resv = NULL; in amdgpu_bo_create_reserved() 553 .resv = bp->resv in amdgpu_bo_create() 625 bp->resv, bp->destroy); in amdgpu_bo_create() 640 r = amdgpu_fill_buffer(bo, 0, bo->tbo.base.resv, &fence, true); in amdgpu_bo_create() 644 dma_resv_add_fence(bo->tbo.base.resv, fence, in amdgpu_bo_create() 648 if (!bp->resv) in amdgpu_bo_create() 661 if (!bp->resv) in amdgpu_bo_create() 662 dma_resv_unlock(bo->tbo.base.resv); in amdgpu_bo_create() 792 r = dma_resv_wait_timeout(bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL, in amdgpu_bo_kmap() 1155 dma_resv_assert_held(bo->tbo.base.resv); in amdgpu_bo_get_tiling_flags() [all …]
|
/openbmc/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()
|
/openbmc/linux/include/drm/ttm/ |
H A D | ttm_bo.h | 184 struct dma_resv *resv; member 250 success = dma_resv_trylock(bo->base.resv); in ttm_bo_reserve() 255 ret = dma_resv_lock_interruptible(bo->base.resv, ticket); in ttm_bo_reserve() 257 ret = dma_resv_lock(bo->base.resv, ticket); in ttm_bo_reserve() 278 int ret = dma_resv_lock_slow_interruptible(bo->base.resv, in ttm_bo_reserve_slowpath() 284 dma_resv_lock_slow(bo->base.resv, ticket); in ttm_bo_reserve_slowpath() 329 dma_resv_unlock(bo->base.resv); in ttm_bo_unreserve() 363 struct sg_table *sg, struct dma_resv *resv, 368 struct sg_table *sg, struct dma_resv *resv,
|
/openbmc/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()
|
/openbmc/linux/include/uapi/linux/ |
H A D | io_uring.h | 481 __u32 resv[3]; member 565 __u32 resv; member 585 __u32 resv; member 591 __u32 resv; member 605 __u8 resv; member 613 __u16 resv; member 625 __u8 resv; member 633 __u16 resv; member 672 __u64 resv[3]; member 721 __u64 resv; member
|
/openbmc/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()
|
/openbmc/linux/drivers/infiniband/core/ |
H A D | umem_dmabuf.c | 24 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_map_pages() 72 ret = dma_resv_wait_timeout(umem_dmabuf->attach->dmabuf->resv, in ib_umem_dmabuf_map_pages() 85 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_unmap_pages() 200 dma_resv_lock(umem_dmabuf->attach->dmabuf->resv, NULL); in ib_umem_dmabuf_get_pinned() 209 dma_resv_unlock(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_get_pinned() 216 dma_resv_unlock(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_get_pinned() 226 dma_resv_lock(dmabuf->resv, NULL); in ib_umem_dmabuf_release() 230 dma_resv_unlock(dmabuf->resv); in ib_umem_dmabuf_release()
|
/openbmc/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()
|
/openbmc/linux/drivers/gpu/drm/loongson/ |
H A D | lsdc_gem.c | 154 struct dma_resv *resv) in lsdc_gem_object_create() argument 161 lbo = lsdc_bo_create(ddev, domain, size, kerenl, sg, resv); in lsdc_gem_object_create() 188 struct dma_resv *resv = attach->dmabuf->resv; in lsdc_prime_import_sg_table() local 193 dma_resv_lock(resv, NULL); in lsdc_prime_import_sg_table() 195 sg, resv); in lsdc_prime_import_sg_table() 196 dma_resv_unlock(resv); in lsdc_prime_import_sg_table()
|
/openbmc/linux/include/linux/sunrpc/ |
H A D | svc.h | 491 struct kvec *resv = buf->head; in svcxdr_init_encode() local 496 xdr->iov = resv; in svcxdr_init_encode() 497 xdr->p = resv->iov_base + resv->iov_len; in svcxdr_init_encode() 498 xdr->end = resv->iov_base + PAGE_SIZE; in svcxdr_init_encode() 499 buf->len = resv->iov_len; in svcxdr_init_encode() 538 struct kvec *resv = buf->head; in svcxdr_set_auth_slack() local 545 WARN_ON(xdr->iov != resv); in svcxdr_set_auth_slack()
|