Lines Matching refs:iop
30 void blk_iopoll_sched(struct blk_iopoll *iop) in blk_iopoll_sched() argument
35 list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll)); in blk_iopoll_sched()
49 void __blk_iopoll_complete(struct blk_iopoll *iop) in __blk_iopoll_complete() argument
51 list_del(&iop->list); in __blk_iopoll_complete()
53 clear_bit_unlock(IOPOLL_F_SCHED, &iop->state); in __blk_iopoll_complete()
67 void blk_iopoll_complete(struct blk_iopoll *iop) in blk_iopoll_complete() argument
72 __blk_iopoll_complete(iop); in blk_iopoll_complete()
86 struct blk_iopoll *iop; in blk_iopoll_softirq() local
104 iop = list_entry(list->next, struct blk_iopoll, list); in blk_iopoll_softirq()
106 weight = iop->weight; in blk_iopoll_softirq()
108 if (test_bit(IOPOLL_F_SCHED, &iop->state)) in blk_iopoll_softirq()
109 work = iop->poll(iop, weight); in blk_iopoll_softirq()
124 if (blk_iopoll_disable_pending(iop)) in blk_iopoll_softirq()
125 __blk_iopoll_complete(iop); in blk_iopoll_softirq()
127 list_move_tail(&iop->list, list); in blk_iopoll_softirq()
144 void blk_iopoll_disable(struct blk_iopoll *iop) in blk_iopoll_disable() argument
146 set_bit(IOPOLL_F_DISABLE, &iop->state); in blk_iopoll_disable()
147 while (test_and_set_bit(IOPOLL_F_SCHED, &iop->state)) in blk_iopoll_disable()
149 clear_bit(IOPOLL_F_DISABLE, &iop->state); in blk_iopoll_disable()
161 void blk_iopoll_enable(struct blk_iopoll *iop) in blk_iopoll_enable() argument
163 BUG_ON(!test_bit(IOPOLL_F_SCHED, &iop->state)); in blk_iopoll_enable()
165 clear_bit_unlock(IOPOLL_F_SCHED, &iop->state); in blk_iopoll_enable()
179 void blk_iopoll_init(struct blk_iopoll *iop, int weight, blk_iopoll_fn *poll_fn) in blk_iopoll_init() argument
181 memset(iop, 0, sizeof(*iop)); in blk_iopoll_init()
182 INIT_LIST_HEAD(&iop->list); in blk_iopoll_init()
183 iop->weight = weight; in blk_iopoll_init()
184 iop->poll = poll_fn; in blk_iopoll_init()
185 set_bit(IOPOLL_F_SCHED, &iop->state); in blk_iopoll_init()