Lines Matching refs:interrupt

40 	struct hl_user_interrupt *interrupt;
1097 wake_pending_user_interrupt_threads(struct hl_user_interrupt *interrupt)
1102 spin_lock_irqsave(&interrupt->wait_list_lock, flags);
1103 list_for_each_entry_safe(pend, temp, &interrupt->wait_list_head, list_node) {
1107 spin_unlock_irqrestore(&interrupt->wait_list_lock, flags);
1109 spin_lock_irqsave(&interrupt->ts_list_lock, flags);
1110 list_for_each_entry_safe(pend, temp, &interrupt->ts_list_head, list_node) {
1115 spin_unlock_irqrestore(&interrupt->ts_list_lock, flags);
1121 struct hl_user_interrupt *interrupt;
1127 /* We iterate through the user interrupt requests and waking up all
1128 * user threads waiting for interrupt completion. We iterate the
1135 interrupt = &hdev->user_interrupt[i];
1136 wake_pending_user_interrupt_threads(interrupt);
1139 interrupt = &hdev->common_user_cq_interrupt;
1140 wake_pending_user_interrupt_threads(interrupt);
1142 interrupt = &hdev->common_decoder_interrupt;
1143 wake_pending_user_interrupt_threads(interrupt);
3248 struct hl_user_interrupt *interrupt = record->ts_reg_info.interrupt;
3253 spin_lock_irqsave(&interrupt->ts_list_lock, flags);
3262 spin_unlock_irqrestore(&interrupt->ts_list_lock, flags);
3290 req_offset_record->ts_reg_info.interrupt->interrupt_id,
3292 data->interrupt->interrupt_id);
3294 * Since interrupt here can be different than the one the node currently registered
3296 * unlock the new interrupt wait list here and acquire the lock again after you done
3298 if (data->interrupt->interrupt_id !=
3299 req_offset_record->ts_reg_info.interrupt->interrupt_id) {
3302 spin_unlock_irqrestore(&data->interrupt->ts_list_lock, *flags);
3308 spin_lock_irqsave(&data->interrupt->ts_list_lock, *flags);
3316 req_offset_record->ts_reg_info.interrupt = data->interrupt;
3348 dev_dbg(hdev->dev, "Timestamp registration: interrupt id: %u, handle: 0x%llx, ts offset: %llu, cq_offset: %llu\n",
3349 data->interrupt->interrupt_id, data->ts_handle,
3358 spin_lock_irqsave(&data->interrupt->ts_list_lock, flags);
3363 spin_unlock_irqrestore(&data->interrupt->ts_list_lock, flags);
3367 /* We check for completion value as interrupt could have been received
3371 spin_unlock_irqrestore(&data->interrupt->ts_list_lock, flags);
3373 dev_dbg(hdev->dev, "Target value already reached release ts record: pend: %p, offset: %llu, interrupt: %u\n",
3374 pend, data->ts_offset, data->interrupt->interrupt_id);
3383 list_add_tail(&pend->list_node, &data->interrupt->ts_list_head);
3384 spin_unlock_irqrestore(&data->interrupt->ts_list_lock, flags);
3437 spin_lock_irqsave(&data->interrupt->wait_list_lock, flags);
3440 /* We check for completion value as interrupt could have been received
3444 spin_unlock_irqrestore(&data->interrupt->wait_list_lock, flags);
3455 /* Add pending user interrupt to relevant list for the interrupt
3461 list_add_tail(&pend->list_node, &data->interrupt->wait_list_head);
3462 spin_unlock_irqrestore(&data->interrupt->wait_list_lock, flags);
3464 /* Wait for interrupt handler to signal completion */
3470 "interrupt based wait ioctl aborted(error:%d) due to a reset cycle initiated\n",
3480 "user process got signal while waiting for interrupt ID %d\n",
3481 data->interrupt->interrupt_id);
3501 spin_lock_irqsave(&data->interrupt->wait_list_lock, flags);
3503 spin_unlock_irqrestore(&data->interrupt->wait_list_lock, flags);
3523 u64 target_value, struct hl_user_interrupt *interrupt,
3545 /* Add pending user interrupt to relevant list for the interrupt
3548 spin_lock_irqsave(&interrupt->wait_list_lock, flags);
3549 list_add_tail(&pend->list_node, &interrupt->wait_list_head);
3550 spin_unlock_irqrestore(&interrupt->wait_list_lock, flags);
3552 /* We check for completion value as interrupt could have been received
3563 /* There was no interrupt, we assume the completion is now. */
3573 /* Wait for interrupt handler to signal completion */
3581 spin_lock_irqsave(&interrupt->wait_list_lock, flags);
3583 * completion value, otherwise, if interrupt is received after
3588 spin_unlock_irqrestore(&interrupt->wait_list_lock, flags);
3601 "interrupt based wait ioctl aborted(error:%d) due to a reset cycle initiated\n",
3611 "user process got signal while waiting for interrupt ID %d\n",
3612 interrupt->interrupt_id);
3625 spin_lock_irqsave(&interrupt->wait_list_lock, flags);
3627 spin_unlock_irqrestore(&interrupt->wait_list_lock, flags);
3642 struct hl_user_interrupt *interrupt;
3664 dev_err(hdev->dev, "interrupt on a disabled core(%u) not allowed",
3669 interrupt = &hdev->user_interrupt[interrupt_id];
3674 interrupt = &hdev->user_interrupt[int_idx];
3677 interrupt = &hdev->common_user_cq_interrupt;
3679 interrupt = &hdev->common_decoder_interrupt;
3681 dev_err(hdev->dev, "invalid user interrupt %u", interrupt_id);
3688 wait_intr_data.interrupt = interrupt;
3701 * Since the registration flow is protected only by the interrupt lock,
3702 * re-use flow might request to move ts node to another interrupt list,
3717 args->in.target, interrupt, &status,
3744 * device, there is no point in waiting for any command submission or user interrupt.