Lines Matching refs:pend

1047 	struct hl_user_pending_interrupt *pend, *temp;  in wake_pending_user_interrupt_threads()  local
1051 list_for_each_entry_safe(pend, temp, &interrupt->wait_list_head, wait_list_node) { in wake_pending_user_interrupt_threads()
1052 if (pend->ts_reg_info.buf) { in wake_pending_user_interrupt_threads()
1053 list_del(&pend->wait_list_node); in wake_pending_user_interrupt_threads()
1054 hl_mmap_mem_buf_put(pend->ts_reg_info.buf); in wake_pending_user_interrupt_threads()
1055 hl_cb_put(pend->ts_reg_info.cq_cb); in wake_pending_user_interrupt_threads()
1057 pend->fence.error = -EIO; in wake_pending_user_interrupt_threads()
1058 complete_all(&pend->fence.completion); in wake_pending_user_interrupt_threads()
3040 struct hl_user_pending_interrupt **pend) in ts_buff_get_kernel_ts_record() argument
3107 *pend = requested_offset_record; in ts_buff_get_kernel_ts_record()
3121 struct hl_user_pending_interrupt *pend; in _hl_interrupt_wait_ioctl() local
3157 &interrupt->wait_list_lock, &pend); in _hl_interrupt_wait_ioctl()
3161 pend = kzalloc(sizeof(*pend), GFP_KERNEL); in _hl_interrupt_wait_ioctl()
3162 if (!pend) { in _hl_interrupt_wait_ioctl()
3166 hl_fence_init(&pend->fence, ULONG_MAX); in _hl_interrupt_wait_ioctl()
3167 pend->cq_kernel_addr = (u64 *) cq_cb->kernel_address + cq_counters_offset; in _hl_interrupt_wait_ioctl()
3168 pend->cq_target_value = target_value; in _hl_interrupt_wait_ioctl()
3176 if (*pend->cq_kernel_addr >= target_value) { in _hl_interrupt_wait_ioctl()
3178 pend->ts_reg_info.in_use = 0; in _hl_interrupt_wait_ioctl()
3184 *pend->ts_reg_info.timestamp_kernel_addr = ktime_get_ns(); in _hl_interrupt_wait_ioctl()
3187 pend->fence.timestamp = ktime_get(); in _hl_interrupt_wait_ioctl()
3193 pend->fence.timestamp = ktime_get(); in _hl_interrupt_wait_ioctl()
3203 list_add_tail(&pend->wait_list_node, &interrupt->wait_list_head); in _hl_interrupt_wait_ioctl()
3212 completion_rc = wait_for_completion_interruptible_timeout(&pend->fence.completion, in _hl_interrupt_wait_ioctl()
3224 if (pend->fence.error == -EIO) { in _hl_interrupt_wait_ioctl()
3227 pend->fence.error); in _hl_interrupt_wait_ioctl()
3249 list_del(&pend->wait_list_node); in _hl_interrupt_wait_ioctl()
3253 *timestamp = ktime_to_ns(pend->fence.timestamp); in _hl_interrupt_wait_ioctl()
3254 kfree(pend); in _hl_interrupt_wait_ioctl()
3277 struct hl_user_pending_interrupt *pend; in _hl_interrupt_wait_ioctl_user_addr() local
3287 pend = kzalloc(sizeof(*pend), GFP_KERNEL); in _hl_interrupt_wait_ioctl_user_addr()
3288 if (!pend) { in _hl_interrupt_wait_ioctl_user_addr()
3293 hl_fence_init(&pend->fence, ULONG_MAX); in _hl_interrupt_wait_ioctl_user_addr()
3299 list_add_tail(&pend->wait_list_node, &interrupt->wait_list_head); in _hl_interrupt_wait_ioctl_user_addr()
3314 pend->fence.timestamp = ktime_get(); in _hl_interrupt_wait_ioctl_user_addr()
3324 completion_rc = wait_for_completion_interruptible_timeout(&pend->fence.completion, in _hl_interrupt_wait_ioctl_user_addr()
3337 reinit_completion(&pend->fence.completion); in _hl_interrupt_wait_ioctl_user_addr()
3349 } else if (pend->fence.error) { in _hl_interrupt_wait_ioctl_user_addr()
3352 pend->fence.error); in _hl_interrupt_wait_ioctl_user_addr()
3376 list_del(&pend->wait_list_node); in _hl_interrupt_wait_ioctl_user_addr()
3379 *timestamp = ktime_to_ns(pend->fence.timestamp); in _hl_interrupt_wait_ioctl_user_addr()
3381 kfree(pend); in _hl_interrupt_wait_ioctl_user_addr()