Lines Matching full:w

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