Lines Matching refs:poll
165 struct vhost_poll *poll; in vhost_poll_func() local
167 poll = container_of(pt, struct vhost_poll, table); in vhost_poll_func()
168 poll->wqh = wqh; in vhost_poll_func()
169 add_wait_queue(wqh, &poll->wait); in vhost_poll_func()
175 struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait); in vhost_poll_wakeup() local
176 struct vhost_work *work = &poll->work; in vhost_poll_wakeup()
178 if (!(key_to_poll(key) & poll->mask)) in vhost_poll_wakeup()
181 if (!poll->dev->use_worker) in vhost_poll_wakeup()
184 vhost_poll_queue(poll); in vhost_poll_wakeup()
197 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, in vhost_poll_init() argument
201 init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); in vhost_poll_init()
202 init_poll_funcptr(&poll->table, vhost_poll_func); in vhost_poll_init()
203 poll->mask = mask; in vhost_poll_init()
204 poll->dev = dev; in vhost_poll_init()
205 poll->wqh = NULL; in vhost_poll_init()
206 poll->vq = vq; in vhost_poll_init()
208 vhost_work_init(&poll->work, fn); in vhost_poll_init()
214 int vhost_poll_start(struct vhost_poll *poll, struct file *file) in vhost_poll_start() argument
218 if (poll->wqh) in vhost_poll_start()
221 mask = vfs_poll(file, &poll->table); in vhost_poll_start()
223 vhost_poll_wakeup(&poll->wait, 0, 0, poll_to_key(mask)); in vhost_poll_start()
225 vhost_poll_stop(poll); in vhost_poll_start()
235 void vhost_poll_stop(struct vhost_poll *poll) in vhost_poll_stop() argument
237 if (poll->wqh) { in vhost_poll_stop()
238 remove_wait_queue(poll->wqh, &poll->wait); in vhost_poll_stop()
239 poll->wqh = NULL; in vhost_poll_stop()
333 void vhost_poll_queue(struct vhost_poll *poll) in vhost_poll_queue() argument
335 vhost_vq_work_queue(poll->vq, &poll->work); in vhost_poll_queue()
552 vhost_poll_queue(&vq->poll); in vhost_exceeds_weight()
623 vhost_poll_init(&vq->poll, vq->handle_kick, in vhost_dev_init()
1175 vhost_poll_stop(&dev->vqs[i]->poll); in vhost_dev_stop()
1599 vhost_poll_queue(&node->vq->poll); in vhost_iotlb_notify_vq()
2255 vhost_poll_stop(&vq->poll); in vhost_vring_ioctl()
2263 r = vhost_poll_start(&vq->poll, vq->kick); in vhost_vring_ioctl()
2268 vhost_dev_flush(vq->poll.dev); in vhost_vring_ioctl()