Searched refs:vq (Results 1 - 25 of 61) sorted by relevance

123

/drivers/virtio/
H A Dvirtio_ring.c33 #define virtio_mb(vq) \
34 do { if ((vq)->weak_barriers) smp_mb(); else mb(); } while(0)
35 #define virtio_rmb(vq) \
36 do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
37 #define virtio_wmb(vq) \
38 do { if ((vq)->weak_barriers) smp_wmb(); else wmb(); } while(0)
43 #define virtio_mb(vq) mb()
44 #define virtio_rmb(vq) rmb()
45 #define virtio_wmb(vq) wmb()
52 dev_err(&(_vq)->vq
79 struct virtqueue vq; member in struct:vring_virtqueue
125 vring_add_indirect(struct vring_virtqueue *vq, struct scatterlist sg[], unsigned int out, unsigned int in, gfp_t gfp) argument
198 struct vring_virtqueue *vq = to_vvq(_vq); local
306 struct vring_virtqueue *vq = to_vvq(_vq); local
346 struct vring_virtqueue *vq = to_vvq(_vq); local
363 virtqueue_kick(struct virtqueue *vq) argument
370 detach_buf(struct vring_virtqueue *vq, unsigned int head) argument
395 more_used(const struct vring_virtqueue *vq) argument
418 struct vring_virtqueue *vq = to_vvq(_vq); local
484 struct vring_virtqueue *vq = to_vvq(_vq); local
503 struct vring_virtqueue *vq = to_vvq(_vq); local
540 struct vring_virtqueue *vq = to_vvq(_vq); local
575 struct vring_virtqueue *vq = to_vvq(_vq); local
601 struct vring_virtqueue *vq = to_vvq(_vq); local
628 struct vring_virtqueue *vq; local
676 vring_del_virtqueue(struct virtqueue *vq) argument
712 struct vring_virtqueue *vq = to_vvq(_vq); local
[all...]
H A Dvirtio_mmio.c83 struct virtqueue *vq; member in struct:virtio_mmio_vq_info
179 static void vm_notify(struct virtqueue *vq) argument
181 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev);
182 struct virtio_mmio_vq_info *info = vq->priv;
213 ret |= vring_interrupt(irq, info->vq);
222 static void vm_del_vq(struct virtqueue *vq) argument
224 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev);
225 struct virtio_mmio_vq_info *info = vq->priv;
232 vring_del_virtqueue(vq);
246 struct virtqueue *vq, * local
256 vm_setup_vq(struct virtio_device *vdev, unsigned index, void (*callback)(struct virtqueue *vq), const char *name) argument
262 struct virtqueue *vq; local
[all...]
H A Dvirtio_pci.c56 /* Vectors allocated, excluding per-vq vectors if any */
62 /* Whether we have vector per vq */
77 struct virtqueue *vq; member in struct:virtio_pci_vq_info
202 static void vp_notify(struct virtqueue *vq) argument
204 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev);
205 struct virtio_pci_vq_info *info = vq->priv;
235 if (vring_interrupt(irq, info->vq) == IRQ_HANDLED)
380 void (*callback)(struct virtqueue *vq),
386 struct virtqueue *vq; local
421 vq
379 setup_vq(struct virtio_device *vdev, unsigned index, void (*callback)(struct virtqueue *vq), const char *name, u16 msix_vec) argument
460 vp_del_vq(struct virtqueue *vq) argument
493 struct virtqueue *vq, *n; local
[all...]
H A Dvirtio_balloon.c90 static void balloon_ack(struct virtqueue *vq) argument
95 vb = virtqueue_get_buf(vq, &len);
100 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) argument
109 if (virtqueue_add_buf(vq, &sg, 1, 0, vb, GFP_KERNEL) < 0)
111 virtqueue_kick(vq);
232 static void stats_request(struct virtqueue *vq) argument
237 vb = virtqueue_get_buf(vq, &len);
246 struct virtqueue *vq; local
252 vq = vb->stats_vq;
254 if (virtqueue_add_buf(vq,
[all...]
/drivers/vhost/
H A Dvhost.c42 #define vhost_used_event(vq) ((u16 __user *)&vq->avail->ring[vq->num])
43 #define vhost_avail_event(vq) ((u16 __user *)&vq->used->ring[vq->num])
160 struct vhost_virtqueue *vq)
162 vq->num = 1;
163 vq->desc = NULL;
164 vq
159 vhost_vq_reset(struct vhost_dev *dev, struct vhost_virtqueue *vq) argument
235 vhost_vq_free_iovecs(struct vhost_virtqueue *vq) argument
247 vhost_enable_zcopy(int vq) argument
420 vhost_zerocopy_signal_used(struct vhost_virtqueue *vq) argument
577 vq_log_access_ok(struct vhost_dev *d, struct vhost_virtqueue *vq, void __user *log_base) argument
594 vhost_vq_access_ok(struct vhost_virtqueue *vq) argument
641 struct vhost_virtqueue *vq; local
864 struct vhost_virtqueue *vq; local
977 vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, unsigned int log_num, u64 len) argument
1001 vhost_update_used_flags(struct vhost_virtqueue *vq) argument
1020 vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) argument
1039 vhost_init_used(struct vhost_virtqueue *vq) argument
1110 get_indirect(struct vhost_dev *dev, struct vhost_virtqueue *vq, struct iovec iov[], unsigned int iov_size, unsigned int *out_num, unsigned int *in_num, struct vhost_log *log, unsigned int *log_num, struct vring_desc *indirect) argument
1206 vhost_get_vq_desc(struct vhost_dev *dev, struct vhost_virtqueue *vq, struct iovec iov[], unsigned int iov_size, unsigned int *out_num, unsigned int *in_num, struct vhost_log *log, unsigned int *log_num) argument
1329 vhost_discard_vq_desc(struct vhost_virtqueue *vq, int n) argument
1336 vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) argument
1382 __vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) argument
1418 vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) argument
1451 vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) argument
1488 vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) argument
1496 vhost_add_used_and_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq, unsigned int head, int len) argument
1505 vhost_add_used_and_signal_n(struct vhost_dev *dev, struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) argument
1514 vhost_enable_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) argument
1551 vhost_disable_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) argument
1573 vhost_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy) argument
1604 struct vhost_virtqueue *vq = ubufs->vq; local
[all...]
H A Dnet.c63 * Protected by tx vq lock. */
133 struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_TX]; local
141 .msg_iov = vq->iov,
152 sock = rcu_dereference_check(vq->private_data, 1);
158 mutex_lock(&vq->mutex);
160 mutex_unlock(&vq->mutex);
164 mutex_lock(&vq->mutex);
165 vhost_disable_notify(&net->dev, vq);
169 hdr_size = vq->vhost_hlen;
175 vhost_zerocopy_signal_used(vq);
307 get_rx_bufs(struct vhost_virtqueue *vq, struct vring_used_elem *heads, int datalen, unsigned *iovcount, struct vhost_log *log, unsigned *log_num, unsigned int quota) argument
363 struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_RX]; local
470 struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, local
479 struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, local
527 vhost_net_disable_vq(struct vhost_net *n, struct vhost_virtqueue *vq) argument
539 vhost_net_enable_vq(struct vhost_net *n, struct vhost_virtqueue *vq) argument
555 vhost_net_stop_vq(struct vhost_net *n, struct vhost_virtqueue *vq) argument
676 struct vhost_virtqueue *vq; local
[all...]
H A Dtest.c41 struct vhost_virtqueue *vq = &n->dev.vqs[VHOST_TEST_VQ]; local
47 private = rcu_dereference_check(vq->private_data, 1);
51 mutex_lock(&vq->mutex);
52 vhost_disable_notify(&n->dev, vq);
55 head = vhost_get_vq_desc(&n->dev, vq, vq->iov,
56 ARRAY_SIZE(vq->iov),
63 if (head == vq->num) {
64 if (unlikely(vhost_enable_notify(&n->dev, vq))) {
65 vhost_disable_notify(&n->dev, vq);
94 struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, local
123 vhost_test_stop_vq(struct vhost_test *n, struct vhost_virtqueue *vq) argument
169 struct vhost_virtqueue *vq; local
[all...]
H A Dvhost.h63 struct vhost_virtqueue *vq; member in struct:vhost_ubuf_ref
142 * Protected by vq mutex. Writers must also take device mutex. */
168 int vhost_vq_access_ok(struct vhost_virtqueue *vq);
189 int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
192 int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq);
194 #define vq_err(vq, fmt, ...) do { \
196 if ((vq)->error_ctx) \
197 eventfd_signal((vq)->error_ctx, 1);\
219 void vhost_enable_zcopy(int vq);
/drivers/char/hw_random/
H A Dvirtio-rng.c28 static struct virtqueue *vq; variable in typeref:struct:virtqueue
33 static void random_recv_done(struct virtqueue *vq) argument
36 if (!virtqueue_get_buf(vq, &data_avail))
50 if (virtqueue_add_buf(vq, &sg, 0, 1, buf, GFP_KERNEL) < 0)
53 virtqueue_kick(vq);
93 vq = virtio_find_single_vq(vdev, random_recv_done, "input");
94 if (IS_ERR(vq))
95 return PTR_ERR(vq);
/drivers/remoteproc/
H A Dremoteproc_virtio.c33 static void rproc_virtio_notify(struct virtqueue *vq) argument
35 struct rproc_vring *rvring = vq->priv;
39 dev_dbg(rproc->dev, "kicking vq index: %d\n", notifyid);
60 dev_dbg(rproc->dev, "vq index %d is interrupted\n", notifyid);
63 if (!rvring || !rvring->vq)
66 return vring_interrupt(0, rvring->vq);
72 void (*callback)(struct virtqueue *vq),
78 struct virtqueue *vq; local
99 * Create the new vq, and tell virtio we're not interested in
102 vq
70 rp_find_vq(struct virtio_device *vdev, unsigned id, void (*callback)(struct virtqueue *vq), const char *name) argument
117 struct virtqueue *vq, *n; local
[all...]
/drivers/s390/kvm/
H A Dkvm_virtio.c168 static void kvm_notify(struct virtqueue *vq) argument
170 struct kvm_vqconfig *config = vq->priv;
181 void (*callback)(struct virtqueue *vq),
186 struct virtqueue *vq; local
200 vq = vring_new_virtqueue(config->num, KVM_S390_VIRTIO_RING_ALIGN,
203 if (!vq) {
212 config->token = (u64) vq;
214 vq->priv = config;
215 return vq;
224 static void kvm_del_vq(struct virtqueue *vq) argument
179 kvm_find_vq(struct virtio_device *vdev, unsigned index, void (*callback)(struct virtqueue *vq), const char *name) argument
236 struct virtqueue *vq, *n; local
386 struct virtqueue *vq; local
[all...]
/drivers/media/video/
H A Dv4l2-mem2mem.c298 struct vb2_queue *vq; local
300 vq = v4l2_m2m_get_vq(m2m_ctx, reqbufs->type);
301 return vb2_reqbufs(vq, reqbufs);
313 struct vb2_queue *vq; local
317 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type);
318 ret = vb2_querybuf(vq, buf);
321 if (buf->memory == V4L2_MEMORY_MMAP && !V4L2_TYPE_IS_OUTPUT(vq->type)) {
322 if (V4L2_TYPE_IS_MULTIPLANAR(vq->type)) {
342 struct vb2_queue *vq; local
345 vq
361 struct vb2_queue *vq; local
374 struct vb2_queue *vq; local
392 struct vb2_queue *vq; local
475 struct vb2_queue *vq; local
[all...]
H A Dsh_vou.c229 static void free_buffer(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
234 videobuf_waiton(vq, vb, 0, 0);
235 videobuf_dma_contig_free(vq, vb);
240 static int sh_vou_buf_setup(struct videobuf_queue *vq, unsigned int *count, argument
243 struct video_device *vdev = vq->priv_data;
256 dev_dbg(vq->dev, "%s(): count=%d, size=%d\n", __func__, *count, *size);
262 static int sh_vou_buf_prepare(struct videobuf_queue *vq, argument
266 struct video_device *vdev = vq->priv_data;
272 dev_dbg(vq->dev, "%s()\n", __func__);
281 free_buffer(vq, v
311 sh_vou_buf_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
351 sh_vou_buf_release(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
[all...]
H A Dmx1_camera.c125 static int mx1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count, argument
128 struct soc_camera_device *icd = vq->priv_data;
148 static void free_buffer(struct videobuf_queue *vq, struct mx1_buffer *buf) argument
150 struct soc_camera_device *icd = vq->priv_data;
162 videobuf_waiton(vq, vb, 0, 0);
163 videobuf_dma_contig_free(vq, vb);
168 static int mx1_videobuf_prepare(struct videobuf_queue *vq, argument
171 struct soc_camera_device *icd = vq->priv_data;
212 ret = videobuf_iolock(vq, vb, NULL);
224 free_buffer(vq, bu
253 mx1_videobuf_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
282 mx1_videobuf_release(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
[all...]
/drivers/lguest/
H A Dlguest_device.c232 static void lg_notify(struct virtqueue *vq) argument
238 struct lguest_vq_info *lvq = vq->priv;
258 void (*callback)(struct virtqueue *vq),
263 struct virtqueue *vq; local
299 vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN, vdev,
301 if (!vq) {
320 dev_name(&vdev->dev), vq);
328 vq->priv = lvq;
329 return vq;
334 vring_del_virtqueue(vq);
256 lg_find_vq(struct virtio_device *vdev, unsigned index, void (*callback)(struct virtqueue *vq), const char *name) argument
344 lg_del_vq(struct virtqueue *vq) argument
360 struct virtqueue *vq, *n; local
[all...]
/drivers/media/video/au0828/
H A Dau0828-vbi.c38 free_buffer(struct videobuf_queue *vq, struct au0828_buffer *buf) argument
40 struct au0828_fh *fh = vq->priv_data;
114 vbi_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
119 struct au0828_fh *fh = vq->priv_data;
/drivers/media/video/em28xx/
H A Dem28xx-vbi.c45 free_buffer(struct videobuf_queue *vq, struct em28xx_buffer *buf) argument
47 struct em28xx_fh *fh = vq->priv_data;
121 vbi_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
126 struct em28xx_fh *fh = vq->priv_data;
/drivers/scsi/
H A Dvirtio_scsi.c148 static void virtscsi_vq_done(struct virtqueue *vq, void (*fn)(void *buf)) argument
150 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev);
159 virtqueue_disable_cb(vq);
160 while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
162 } while (!virtqueue_enable_cb(vq));
167 static void virtscsi_req_done(struct virtqueue *vq) argument
169 virtscsi_vq_done(vq, virtscsi_complete_cmd);
182 static void virtscsi_ctrl_done(struct virtqueue *vq) argument
184 virtscsi_vq_done(vq, virtscsi_complete_free);
187 static void virtscsi_event_done(struct virtqueue *vq) argument
253 virtscsi_kick_cmd(struct virtio_scsi *vscsi, struct virtqueue *vq, struct virtio_scsi_cmd *cmd, size_t req_size, size_t resp_size, gfp_t gfp) argument
[all...]
/drivers/media/video/cx231xx/
H A Dcx231xx-vbi.c173 vbi_buffer_setup(struct videobuf_queue *vq, unsigned int *count, argument
176 struct cx231xx_fh *fh = vq->priv_data;
194 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) argument
196 struct cx231xx_fh *fh = vq->priv_data;
221 vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, argument
224 struct cx231xx_fh *fh = vq->priv_data;
244 rc = videobuf_iolock(vq, &buf->vb, NULL);
265 free_buffer(vq, buf);
270 vbi_buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
274 struct cx231xx_fh *fh = vq
283 vbi_buffer_release(struct videobuf_queue *vq, struct videobuf_buffer *vb) argument
[all...]
/drivers/char/
H A Dvirtio_console.c133 /* To protect the vq operations for the control channel */
304 struct virtqueue *vq)
311 if (port->in_vq == vq || port->out_vq == vq)
388 static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf) argument
395 ret = virtqueue_add_buf(vq, sg, 0, 1, buf, GFP_ATOMIC);
396 virtqueue_kick(vq);
423 dev_warn(port->dev, "Errors adding %d buffers back to vq\n",
447 struct virtqueue *vq; local
457 vq
303 find_port_by_vq(struct ports_device *portdev, struct virtqueue *vq) argument
1097 fill_queue(struct virtqueue *vq, spinlock_t *lock) argument
1461 struct virtqueue *vq; local
1487 out_intr(struct virtqueue *vq) argument
1498 in_intr(struct virtqueue *vq) argument
1531 control_intr(struct virtqueue *vq) argument
[all...]
/drivers/media/video/s5p-mfc/
H A Ds5p_mfc_dec.c747 static int s5p_mfc_queue_setup(struct vb2_queue *vq, argument
752 struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv);
757 vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
767 vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
778 mfc_err("State seems invalid. State = %d, vq->type = %d\n",
779 ctx->state, vq->type);
785 vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
790 } else if (vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE &&
819 struct vb2_queue *vq = vb->vb2_queue; local
820 struct s5p_mfc_ctx *ctx = fh_to_ctx(vq
925 struct vb2_queue *vq = vb->vb2_queue; local
[all...]
H A Ds5p_mfc_opr.h54 void s5p_mfc_cleanup_queue(struct list_head *lh, struct vb2_queue *vq);
/drivers/media/video/marvell-ccic/
H A Dmcam-core.c909 static int mcam_vb_queue_setup(struct vb2_queue *vq, argument
914 struct mcam_camera *cam = vb2_get_drv_priv(vq);
950 static void mcam_vb_wait_prepare(struct vb2_queue *vq) argument
952 struct mcam_camera *cam = vb2_get_drv_priv(vq);
957 static void mcam_vb_wait_finish(struct vb2_queue *vq) argument
959 struct mcam_camera *cam = vb2_get_drv_priv(vq);
967 static int mcam_vb_start_streaming(struct vb2_queue *vq, unsigned int count) argument
969 struct mcam_camera *cam = vb2_get_drv_priv(vq);
990 static int mcam_vb_stop_streaming(struct vb2_queue *vq) argument
992 struct mcam_camera *cam = vb2_get_drv_priv(vq);
1103 struct vb2_queue *vq = &cam->vb_queue; local
[all...]
/drivers/block/
H A Dvirtio_blk.c27 struct virtqueue *vq; member in struct:virtio_blk
65 static void blk_done(struct virtqueue *vq) argument
67 struct virtio_blk *vblk = vq->vdev->priv;
73 while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) {
182 if (virtqueue_add_buf(vblk->vq, vblk->sg, out, in, vbr, GFP_ATOMIC)<0) {
211 virtqueue_kick(vblk->vq);
371 vblk->vq = virtio_find_single_vq(vblk->vdev, blk_done, "requests");
372 if (IS_ERR(vblk->vq))
373 err = PTR_ERR(vblk->vq);
/drivers/media/video/blackfin/
H A Dbfin_capture.c266 static int bcap_queue_setup(struct vb2_queue *vq, argument
271 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq);
330 static void bcap_lock(struct vb2_queue *vq) argument
332 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq);
336 static void bcap_unlock(struct vb2_queue *vq) argument
338 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq);
342 static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count) argument
344 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq);
383 static int bcap_stop_streaming(struct vb2_queue *vq) argument
385 struct bcap_device *bcap_dev = vb2_get_drv_priv(vq);
427 struct vb2_queue *vq = &bcap_dev->buffer_queue; local
[all...]

Completed in 7504 milliseconds

123