Lines Matching defs:iop

21  * @iop:      The parent iopoll structure
27 void irq_poll_sched(struct irq_poll *iop)
31 if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
33 if (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
37 list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll));
44 * __irq_poll_complete - Mark this @iop as un-polled again
45 * @iop: The parent iopoll structure
51 static void __irq_poll_complete(struct irq_poll *iop)
53 list_del(&iop->list);
55 clear_bit_unlock(IRQ_POLL_F_SCHED, &iop->state);
59 * irq_poll_complete - Mark this @iop as un-polled again
60 * @iop: The parent iopoll structure
68 void irq_poll_complete(struct irq_poll *iop)
73 __irq_poll_complete(iop);
87 struct irq_poll *iop;
105 iop = list_entry(list->next, struct irq_poll, list);
107 weight = iop->weight;
109 if (test_bit(IRQ_POLL_F_SCHED, &iop->state))
110 work = iop->poll(iop, weight);
125 if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
126 __irq_poll_complete(iop);
128 list_move_tail(&iop->list, list);
139 * irq_poll_disable - Disable iopoll on this @iop
140 * @iop: The parent iopoll structure
145 void irq_poll_disable(struct irq_poll *iop)
147 set_bit(IRQ_POLL_F_DISABLE, &iop->state);
148 while (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
150 clear_bit(IRQ_POLL_F_DISABLE, &iop->state);
155 * irq_poll_enable - Enable iopoll on this @iop
156 * @iop: The parent iopoll structure
159 * Enable iopoll on this @iop. Note that the handler run will not be
162 void irq_poll_enable(struct irq_poll *iop)
164 BUG_ON(!test_bit(IRQ_POLL_F_SCHED, &iop->state));
166 clear_bit_unlock(IRQ_POLL_F_SCHED, &iop->state);
171 * irq_poll_init - Initialize this @iop
172 * @iop: The parent iopoll structure
179 void irq_poll_init(struct irq_poll *iop, int weight, irq_poll_fn *poll_fn)
181 memset(iop, 0, sizeof(*iop));
182 INIT_LIST_HEAD(&iop->list);
183 iop->weight = weight;
184 iop->poll = poll_fn;