Lines Matching defs:hdev

17  * @hdev:             pointer to device structure
22 struct hl_device *hdev;
62 struct hl_device *hdev = eqe_work->hdev;
64 hdev->asic_funcs->handle_eqe(hdev, &eqe_work->eq_entry);
72 * @hdev: pointer to device structure
78 static void job_finish(struct hl_device *hdev, u32 cs_seq, struct hl_cq *cq, ktime_t timestamp)
83 queue = &hdev->kernel_queues[cq->hw_queue_id];
86 queue_work(hdev->cq_wq[cq->cq_idx], &job->finish_work);
94 * @hdev: pointer to device structure
99 static void cs_finish(struct hl_device *hdev, u16 cs_seq, ktime_t timestamp)
101 struct asic_fixed_properties *prop = &hdev->asic_prop;
106 cs = hdev->shadow_cs_queue[cs_seq & (prop->max_pending_cs - 1)];
108 dev_warn(hdev->dev,
115 queue = &hdev->kernel_queues[job->hw_queue_id];
120 queue_work(hdev->cs_cmplt_wq, &cs->finish_work);
133 struct hl_device *hdev = cq->hdev;
139 if (hdev->disabled) {
140 dev_dbg(hdev->dev,
176 if (shadow_index_valid && !hdev->disabled) {
177 if (hdev->asic_prop.completion_mode ==
179 cs_finish(hdev, shadow_index, timestamp);
181 job_finish(hdev, shadow_index, cq, timestamp);
211 struct hl_device *hdev = job->hdev;
214 dev_dbg(hdev->dev, "About to put refcount to buf (%p) cq_cb(%p)\n",
228 dev_dbg(hdev->dev,
255 static int handle_registration_node(struct hl_device *hdev, struct hl_user_pending_interrupt *pend,
279 dev_dbg(hdev->dev,
304 dev_dbg(hdev->dev, "Irq handle: Timestamp record (%p) ts cb address (%p), interrupt_id: %u\n",
329 static void handle_user_interrupt_ts_list(struct hl_device *hdev, struct hl_user_interrupt *intr)
356 rc = handle_registration_node(hdev, pend,
370 job->hdev = hdev;
371 queue_work(hdev->ts_free_obj_wq, &job->free_obj);
377 static void handle_user_interrupt_wait_list(struct hl_device *hdev, struct hl_user_interrupt *intr)
394 static void handle_tpc_interrupt(struct hl_device *hdev)
405 dev_err_ratelimited(hdev->dev, "Received TPC assert\n");
406 hl_device_cond_reset(hdev, flags, event_mask);
409 static void handle_unexpected_user_interrupt(struct hl_device *hdev)
411 dev_err_ratelimited(hdev->dev, "Received unexpected user error interrupt\n");
423 struct hl_device *hdev = user_int->hdev;
429 handle_user_interrupt_wait_list(hdev, &hdev->common_user_cq_interrupt);
430 handle_user_interrupt_wait_list(hdev, user_int);
433 handle_user_interrupt_ts_list(hdev, &hdev->common_user_cq_interrupt);
434 handle_user_interrupt_ts_list(hdev, user_int);
437 handle_user_interrupt_wait_list(hdev, &hdev->common_decoder_interrupt);
440 handle_user_interrupt_wait_list(hdev, user_int);
460 struct hl_device *hdev = user_int->hdev;
465 handle_tpc_interrupt(hdev);
468 handle_unexpected_user_interrupt(hdev);
480 struct hl_device *hdev = arg;
482 dev_err(hdev->dev, "EQ error interrupt received\n");
484 hl_device_cond_reset(hdev, HL_DRV_RESET_HARD, event_mask);
499 struct hl_device *hdev = eq->hdev;
517 if ((hdev->event_queue.check_eqe_index) &&
519 dev_err(hdev->dev,
537 if (hdev->disabled && !hdev->reset_info.in_compute_reset) {
540 dev_warn(hdev->dev,
548 handle_eqe_work->hdev = hdev;
553 queue_work(hdev->eq_wq, &handle_eqe_work->eq_work);
563 hdev->asic_funcs->update_eq_ci(hdev, eq->ci);
586 * @hdev: pointer to device structure
594 int hl_cq_init(struct hl_device *hdev, struct hl_cq *q, u32 hw_queue_id)
598 p = hl_asic_dma_alloc_coherent(hdev, HL_CQ_SIZE_IN_BYTES, &q->bus_address,
603 q->hdev = hdev;
617 * @hdev: pointer to device structure
622 void hl_cq_fini(struct hl_device *hdev, struct hl_cq *q)
624 hl_asic_dma_free_coherent(hdev, HL_CQ_SIZE_IN_BYTES, q->kernel_address, q->bus_address);
627 void hl_cq_reset(struct hl_device *hdev, struct hl_cq *q)
647 * @hdev: pointer to device structure
653 int hl_eq_init(struct hl_device *hdev, struct hl_eq *q)
657 p = hl_cpu_accessible_dma_pool_alloc(hdev, HL_EQ_SIZE_IN_BYTES, &q->bus_address);
661 q->hdev = hdev;
672 * @hdev: pointer to device structure
677 void hl_eq_fini(struct hl_device *hdev, struct hl_eq *q)
679 flush_workqueue(hdev->eq_wq);
681 hl_cpu_accessible_dma_pool_free(hdev, HL_EQ_SIZE_IN_BYTES, q->kernel_address);
684 void hl_eq_reset(struct hl_device *hdev, struct hl_eq *q)