Lines Matching full:w

299 static inline u16 iowait_get_desc(struct iowait_work *w)
304 if (!list_empty(&w->tx_head)) {
305 tx = list_first_entry(&w->tx_head, struct sdma_txreq,
309 w->iow->priority++;
314 static inline u32 iowait_get_all_desc(struct iowait *w)
318 num_desc = iowait_get_desc(&w->wait[IOWAIT_IB_SE]);
319 num_desc += iowait_get_desc(&w->wait[IOWAIT_TID_SE]);
323 static inline void iowait_update_priority(struct iowait_work *w)
327 if (!list_empty(&w->tx_head)) {
328 tx = list_first_entry(&w->tx_head, struct sdma_txreq,
331 w->iow->priority++;
335 static inline void iowait_update_all_priority(struct iowait *w)
337 iowait_update_priority(&w->wait[IOWAIT_IB_SE]);
338 iowait_update_priority(&w->wait[IOWAIT_TID_SE]);
341 static inline void iowait_init_priority(struct iowait *w)
343 w->priority = 0;
344 if (w->init_priority)
345 w->init_priority(w);
348 static inline void iowait_get_priority(struct iowait *w)
350 iowait_init_priority(w);
351 iowait_update_all_priority(w);
357 * @w: the iowait struct
364 static inline void iowait_queue(bool pkts_sent, struct iowait *w,
374 w->starved_cnt = 0;
376 w->starved_cnt++;
378 if (w->priority > 0 || !pkts_sent)
379 list_add(&w->list, wait_head);
381 list_add_tail(&w->list, wait_head);
387 * @w: the iowait struct
392 static inline void iowait_starve_clear(bool pkts_sent, struct iowait *w)
395 w->starved_cnt = 0;
399 uint iowait_priority_update_top(struct iowait *w,
414 * @w: the log work struct
417 static inline void iowait_inc_wait_count(struct iowait_work *w, u16 n)
419 if (!w)
421 w->iow->tx_count++;
422 w->iow->count += n;
427 * @w: the iowait struct
429 static inline struct iowait_work *iowait_get_tid_work(struct iowait *w)
431 return &w->wait[IOWAIT_TID_SE];
436 * @w: the iowait struct
438 static inline struct iowait_work *iowait_get_ib_work(struct iowait *w)
440 return &w->wait[IOWAIT_IB_SE];
445 * @w: the iowait_work struct
447 static inline struct iowait *iowait_ioww_to_iow(struct iowait_work *w)
449 if (likely(w))
450 return w->iow;
454 void iowait_cancel_work(struct iowait *w);
455 int iowait_set_work_flag(struct iowait_work *w);