Lines Matching full:wq
11 static struct idxd_desc *__get_desc(struct idxd_wq *wq, int idx, int cpu) in __get_desc() argument
14 struct idxd_device *idxd = wq->idxd; in __get_desc()
16 desc = wq->descs[idx]; in __get_desc()
27 struct idxd_desc *idxd_alloc_desc(struct idxd_wq *wq, enum idxd_op_type optype) in idxd_alloc_desc() argument
30 struct idxd_device *idxd = wq->idxd; in idxd_alloc_desc()
38 sbq = &wq->sbq; in idxd_alloc_desc()
44 return __get_desc(wq, idx, cpu); in idxd_alloc_desc()
62 return __get_desc(wq, idx, cpu); in idxd_alloc_desc()
66 void idxd_free_desc(struct idxd_wq *wq, struct idxd_desc *desc) in idxd_free_desc() argument
71 sbitmap_queue_clear(&wq->sbq, desc->id, cpu); in idxd_free_desc()
75 static struct idxd_desc *list_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie, in list_abort_desc() argument
97 static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie, in llist_abort_desc() argument
126 found = list_abort_desc(wq, ie, desc); in llist_abort_desc()
147 * ENQCMDS typically fail when the WQ is inactive or busy. On host submission, the driver
148 * has better control of number of descriptors being submitted to a shared wq by limiting
149 * the number of driver allocated descriptors to the wq size. However, when the swq is
155 int idxd_enqcmds(struct idxd_wq *wq, void __iomem *portal, const void *desc) in idxd_enqcmds() argument
157 unsigned int retries = wq->enqcmds_retries; in idxd_enqcmds()
170 int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc) in idxd_submit_desc() argument
172 struct idxd_device *idxd = wq->idxd; in idxd_submit_desc()
181 if (!percpu_ref_tryget_live(&wq->wq_active)) { in idxd_submit_desc()
182 wait_for_completion(&wq->wq_resurrect); in idxd_submit_desc()
183 if (!percpu_ref_tryget_live(&wq->wq_active)) in idxd_submit_desc()
187 portal = idxd_wq_portal_addr(wq); in idxd_submit_desc()
194 ie = &wq->ie; in idxd_submit_desc()
206 if (wq_dedicated(wq)) { in idxd_submit_desc()
209 rc = idxd_enqcmds(wq, portal, desc->hw); in idxd_submit_desc()
211 percpu_ref_put(&wq->wq_active); in idxd_submit_desc()
214 llist_abort_desc(wq, ie, desc); in idxd_submit_desc()
219 percpu_ref_put(&wq->wq_active); in idxd_submit_desc()