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);
209 struct hl_device *hdev = job->hdev;
212 dev_dbg(hdev->dev, "About to put refcount to buf (%p) cq_cb(%p)\n",
235 static int handle_registration_node(struct hl_device *hdev, struct hl_user_pending_interrupt *pend,
258 dev_dbg(hdev->dev, "Timestamp is set to ts cb address (%p), ts: 0x%llx\n",
277 static void handle_user_interrupt(struct hl_device *hdev, struct hl_user_interrupt *intr)
304 rc = handle_registration_node(hdev, pend,
321 job->hdev = hdev;
322 queue_work(hdev->ts_free_obj_wq, &job->free_obj);
328 static void handle_tpc_interrupt(struct hl_device *hdev)
339 dev_err_ratelimited(hdev->dev, "Received TPC assert\n");
340 hl_device_cond_reset(hdev, flags, event_mask);
343 static void handle_unexpected_user_interrupt(struct hl_device *hdev)
345 dev_err_ratelimited(hdev->dev, "Received unexpected user error interrupt\n");
375 struct hl_device *hdev = user_int->hdev;
379 handle_user_interrupt(hdev, &hdev->common_user_cq_interrupt);
382 handle_user_interrupt(hdev, user_int);
385 handle_user_interrupt(hdev, &hdev->common_decoder_interrupt);
388 handle_user_interrupt(hdev, user_int);
391 handle_tpc_interrupt(hdev);
394 handle_unexpected_user_interrupt(hdev);
413 struct hl_device *hdev = eq->hdev;
431 if ((hdev->event_queue.check_eqe_index) &&
433 dev_err(hdev->dev,
451 if (hdev->disabled && !hdev->reset_info.in_compute_reset) {
454 dev_warn(hdev->dev,
462 handle_eqe_work->hdev = hdev;
467 queue_work(hdev->eq_wq, &handle_eqe_work->eq_work);
477 hdev->asic_funcs->update_eq_ci(hdev, eq->ci);
500 * @hdev: pointer to device structure
508 int hl_cq_init(struct hl_device *hdev, struct hl_cq *q, u32 hw_queue_id)
512 p = hl_asic_dma_alloc_coherent(hdev, HL_CQ_SIZE_IN_BYTES, &q->bus_address,
517 q->hdev = hdev;
531 * @hdev: pointer to device structure
536 void hl_cq_fini(struct hl_device *hdev, struct hl_cq *q)
538 hl_asic_dma_free_coherent(hdev, HL_CQ_SIZE_IN_BYTES, q->kernel_address, q->bus_address);
541 void hl_cq_reset(struct hl_device *hdev, struct hl_cq *q)
561 * @hdev: pointer to device structure
567 int hl_eq_init(struct hl_device *hdev, struct hl_eq *q)
571 p = hl_cpu_accessible_dma_pool_alloc(hdev, HL_EQ_SIZE_IN_BYTES, &q->bus_address);
575 q->hdev = hdev;
586 * @hdev: pointer to device structure
591 void hl_eq_fini(struct hl_device *hdev, struct hl_eq *q)
593 flush_workqueue(hdev->eq_wq);
595 hl_cpu_accessible_dma_pool_free(hdev, HL_EQ_SIZE_IN_BYTES, q->kernel_address);
598 void hl_eq_reset(struct hl_device *hdev, struct hl_eq *q)