Home
last modified time | relevance | path

Searched refs:vq (Results 1 – 25 of 83) sorted by relevance

1234

/drivers/virtio/
Dvirtio_ring.c31 dev_err(&(_vq)->vq.vdev->dev, \
32 "%s:"fmt, (_vq)->vq.name, ##args); \
40 (_vq)->vq.name, (_vq)->in_use); \
48 dev_err(&_vq->vq.vdev->dev, \
49 "%s:"fmt, (_vq)->vq.name, ##args); \
52 #define START_USE(vq) argument
53 #define END_USE(vq) argument
58 struct virtqueue vq; member
84 void (*notify)(struct virtqueue *vq);
99 #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq)
[all …]
Dvirtio_mmio.c129 struct virtqueue *vq; member
222 static void vm_notify(struct virtqueue *vq) in vm_notify() argument
224 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_notify()
228 writel(vq->index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY); in vm_notify()
255 ret |= vring_interrupt(irq, info->vq); in vm_interrupt()
264 static void vm_del_vq(struct virtqueue *vq) in vm_del_vq() argument
266 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_del_vq()
267 struct virtio_mmio_vq_info *info = vq->priv; in vm_del_vq()
269 unsigned int index = vq->index; in vm_del_vq()
275 vring_del_virtqueue(vq); in vm_del_vq()
[all …]
Dvirtio_pci.c78 struct virtqueue *vq; member
200 static void vp_notify(struct virtqueue *vq) in vp_notify() argument
202 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); in vp_notify()
206 iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); in vp_notify()
232 if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) in vp_vring_interrupt()
392 void (*callback)(struct virtqueue *vq), in setup_vq() argument
398 struct virtqueue *vq; in setup_vq() local
432 vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, in setup_vq()
434 if (!vq) { in setup_vq()
439 vq->priv = info; in setup_vq()
[all …]
Dvirtio_balloon.c96 static void balloon_ack(struct virtqueue *vq) in balloon_ack() argument
98 struct virtio_balloon *vb = vq->vdev->priv; in balloon_ack()
103 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) in tell_host() argument
111 if (virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL) < 0) in tell_host()
113 virtqueue_kick(vq); in tell_host()
116 wait_event(vb->acked, virtqueue_get_buf(vq, &len)); in tell_host()
238 static void stats_request(struct virtqueue *vq) in stats_request() argument
240 struct virtio_balloon *vb = vq->vdev->priv; in stats_request()
248 struct virtqueue *vq; in stats_handle_request() local
255 vq = vb->stats_vq; in stats_handle_request()
[all …]
/drivers/vhost/
Dvhost.c36 #define vhost_used_event(vq) ((u16 __user *)&vq->avail->ring[vq->num]) argument
37 #define vhost_avail_event(vq) ((u16 __user *)&vq->used->ring[vq->num]) argument
168 struct vhost_virtqueue *vq) in vhost_vq_reset() argument
170 vq->num = 1; in vhost_vq_reset()
171 vq->desc = NULL; in vhost_vq_reset()
172 vq->avail = NULL; in vhost_vq_reset()
173 vq->used = NULL; in vhost_vq_reset()
174 vq->last_avail_idx = 0; in vhost_vq_reset()
175 vq->avail_idx = 0; in vhost_vq_reset()
176 vq->last_used_idx = 0; in vhost_vq_reset()
[all …]
Dnet.c76 struct vhost_virtqueue *vq; member
80 struct vhost_virtqueue vq; member
115 static void vhost_net_enable_zcopy(int vq) in vhost_net_enable_zcopy() argument
117 vhost_net_zcopy_mask |= 0x1 << vq; in vhost_net_enable_zcopy()
129 vhost_net_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy) in vhost_net_ubuf_alloc() argument
140 ubufs->vq = vq; in vhost_net_ubuf_alloc()
276 struct vhost_virtqueue *vq) in vhost_zerocopy_signal_used() argument
279 container_of(vq, struct vhost_net_virtqueue, vq); in vhost_zerocopy_signal_used()
284 if (vq->heads[i].len == VHOST_DMA_FAILED_LEN) in vhost_zerocopy_signal_used()
286 if (VHOST_DMA_IS_DONE(vq->heads[i].len)) { in vhost_zerocopy_signal_used()
[all …]
Dtest.c41 struct vhost_virtqueue *vq = &n->dev.vqs[VHOST_TEST_VQ]; in handle_vq() local
47 private = rcu_dereference_check(vq->private_data, 1); in handle_vq()
51 mutex_lock(&vq->mutex); in handle_vq()
52 vhost_disable_notify(&n->dev, vq); in handle_vq()
55 head = vhost_get_vq_desc(&n->dev, vq, vq->iov, in handle_vq()
56 ARRAY_SIZE(vq->iov), in handle_vq()
63 if (head == vq->num) { in handle_vq()
64 if (unlikely(vhost_enable_notify(&n->dev, vq))) { in handle_vq()
65 vhost_disable_notify(&n->dev, vq); in handle_vq()
71 vq_err(vq, "Unexpected descriptor format for TX: " in handle_vq()
[all …]
Dscsi.c174 struct vhost_virtqueue vq; member
233 struct vhost_virtqueue *vq; in tcm_vhost_init_inflight() local
237 vq = &vs->vqs[i].vq; in tcm_vhost_init_inflight()
239 mutex_lock(&vq->mutex); in tcm_vhost_init_inflight()
252 mutex_unlock(&vq->mutex); in tcm_vhost_init_inflight()
257 tcm_vhost_get_inflight(struct vhost_virtqueue *vq) in tcm_vhost_get_inflight() argument
262 svq = container_of(vq, struct vhost_scsi_virtqueue, vq); in tcm_vhost_get_inflight()
533 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in tcm_vhost_allocate_evt() local
543 vq_err(vq, "Failed to allocate tcm_vhost_evt\n"); in tcm_vhost_allocate_evt()
578 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in tcm_vhost_do_evt_work() local
[all …]
Dvhost.h144 int vhost_vq_access_ok(struct vhost_virtqueue *vq);
165 int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
168 #define vq_err(vq, fmt, ...) do { \ argument
170 if ((vq)->error_ctx) \
171 eventfd_signal((vq)->error_ctx, 1);\
/drivers/char/hw_random/
Dvirtio-rng.c28 static struct virtqueue *vq; variable
33 static void random_recv_done(struct virtqueue *vq) in random_recv_done() argument
36 if (!virtqueue_get_buf(vq, &data_avail)) in random_recv_done()
50 if (virtqueue_add_inbuf(vq, &sg, 1, buf, GFP_KERNEL) < 0) in register_buffer()
53 virtqueue_kick(vq); in register_buffer()
95 if (vq) { in probe_common()
100 vq = virtio_find_single_vq(vdev, random_recv_done, "input"); in probe_common()
101 if (IS_ERR(vq)) { in probe_common()
102 err = PTR_ERR(vq); in probe_common()
103 vq = NULL; in probe_common()
[all …]
/drivers/s390/kvm/
Dkvm_virtio.c169 static void kvm_notify(struct virtqueue *vq) in kvm_notify() argument
171 struct kvm_vqconfig *config = vq->priv; in kvm_notify()
182 void (*callback)(struct virtqueue *vq), in kvm_find_vq() argument
187 struct virtqueue *vq; in kvm_find_vq() local
204 vq = vring_new_virtqueue(index, config->num, KVM_S390_VIRTIO_RING_ALIGN, in kvm_find_vq()
207 if (!vq) { in kvm_find_vq()
216 config->token = (u64) vq; in kvm_find_vq()
218 vq->priv = config; in kvm_find_vq()
219 return vq; in kvm_find_vq()
228 static void kvm_del_vq(struct virtqueue *vq) in kvm_del_vq() argument
[all …]
Dvirtio_ccw.c76 struct virtqueue *vq; member
165 static void virtio_ccw_kvm_notify(struct virtqueue *vq) in virtio_ccw_kvm_notify() argument
167 struct virtio_ccw_vq_info *info = vq->priv; in virtio_ccw_kvm_notify()
171 vcdev = to_vc_device(info->vq->vdev); in virtio_ccw_kvm_notify()
173 info->cookie = do_kvm_notify(schid, vq->index, info->cookie); in virtio_ccw_kvm_notify()
188 static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw) in virtio_ccw_del_vq() argument
190 struct virtio_ccw_device *vcdev = to_vc_device(vq->vdev); in virtio_ccw_del_vq()
191 struct virtio_ccw_vq_info *info = vq->priv; in virtio_ccw_del_vq()
195 unsigned int index = vq->index; in virtio_ccw_del_vq()
218 dev_warn(&vq->vdev->dev, "Error %d while deleting queue %d", in virtio_ccw_del_vq()
[all …]
/drivers/remoteproc/
Dremoteproc_virtio.c33 static void rproc_virtio_notify(struct virtqueue *vq) in rproc_virtio_notify() argument
35 struct rproc_vring *rvring = vq->priv; in rproc_virtio_notify()
63 if (!rvring || !rvring->vq) in rproc_vq_interrupt()
66 return vring_interrupt(0, rvring->vq); in rproc_vq_interrupt()
72 void (*callback)(struct virtqueue *vq), in rp_find_vq() argument
79 struct virtqueue *vq; in rp_find_vq() local
109 vq = vring_new_virtqueue(id, len, rvring->align, vdev, false, addr, in rp_find_vq()
111 if (!vq) { in rp_find_vq()
117 rvring->vq = vq; in rp_find_vq()
118 vq->priv = rvring; in rp_find_vq()
[all …]
/drivers/media/v4l2-core/
Dv4l2-mem2mem.c307 struct vb2_queue *vq; in v4l2_m2m_reqbufs() local
309 vq = v4l2_m2m_get_vq(m2m_ctx, reqbufs->type); in v4l2_m2m_reqbufs()
310 return vb2_reqbufs(vq, reqbufs); in v4l2_m2m_reqbufs()
322 struct vb2_queue *vq; in v4l2_m2m_querybuf() local
326 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_querybuf()
327 ret = vb2_querybuf(vq, buf); in v4l2_m2m_querybuf()
330 if (buf->memory == V4L2_MEMORY_MMAP && !V4L2_TYPE_IS_OUTPUT(vq->type)) { in v4l2_m2m_querybuf()
331 if (V4L2_TYPE_IS_MULTIPLANAR(vq->type)) { in v4l2_m2m_querybuf()
351 struct vb2_queue *vq; in v4l2_m2m_qbuf() local
354 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_qbuf()
[all …]
/drivers/lguest/
Dlguest_device.c232 static void lg_notify(struct virtqueue *vq) in lg_notify() argument
238 struct lguest_vq_info *lvq = vq->priv; in lg_notify()
258 void (*callback)(struct virtqueue *vq), in lg_find_vq() argument
263 struct virtqueue *vq; in lg_find_vq() local
302 vq = vring_new_virtqueue(index, lvq->config.num, LGUEST_VRING_ALIGN, vdev, in lg_find_vq()
304 if (!vq) { in lg_find_vq()
323 dev_name(&vdev->dev), vq); in lg_find_vq()
331 vq->priv = lvq; in lg_find_vq()
332 return vq; in lg_find_vq()
337 vring_del_virtqueue(vq); in lg_find_vq()
[all …]
/drivers/scsi/
Dvirtio_scsi.c61 struct virtqueue *vq; member
220 struct virtqueue *vq = virtscsi_vq->vq; in virtscsi_vq_done() local
224 virtqueue_disable_cb(vq); in virtscsi_vq_done()
225 while ((buf = virtqueue_get_buf(vq, &len)) != NULL) in virtscsi_vq_done()
227 } while (!virtqueue_enable_cb(vq)); in virtscsi_vq_done()
231 static void virtscsi_req_done(struct virtqueue *vq) in virtscsi_req_done() argument
233 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev); in virtscsi_req_done()
235 int index = vq->index - VIRTIO_SCSI_VQ_BASE; in virtscsi_req_done()
283 static void virtscsi_ctrl_done(struct virtqueue *vq) in virtscsi_ctrl_done() argument
285 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev); in virtscsi_ctrl_done()
[all …]
/drivers/net/
Dvirtio_net.c57 struct virtqueue *vq; member
69 struct virtqueue *vq; member
154 static int vq2txq(struct virtqueue *vq) in vq2txq() argument
156 return (vq->index - 1) / 2; in vq2txq()
164 static int vq2rxq(struct virtqueue *vq) in vq2rxq() argument
166 return vq->index / 2; in vq2rxq()
206 static void skb_xmit_done(struct virtqueue *vq) in skb_xmit_done() argument
208 struct virtnet_info *vi = vq->vdev->priv; in skb_xmit_done()
211 virtqueue_disable_cb(vq); in skb_xmit_done()
214 netif_wake_subqueue(vi->dev, vq2txq(vq)); in skb_xmit_done()
[all …]
/drivers/media/platform/marvell-ccic/
Dmcam-core.c903 static int mcam_vb_queue_setup(struct vb2_queue *vq, in mcam_vb_queue_setup() argument
908 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_queue_setup()
944 static void mcam_vb_wait_prepare(struct vb2_queue *vq) in mcam_vb_wait_prepare() argument
946 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_wait_prepare()
951 static void mcam_vb_wait_finish(struct vb2_queue *vq) in mcam_vb_wait_finish() argument
953 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_wait_finish()
961 static int mcam_vb_start_streaming(struct vb2_queue *vq, unsigned int count) in mcam_vb_start_streaming() argument
963 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_start_streaming()
984 static int mcam_vb_stop_streaming(struct vb2_queue *vq) in mcam_vb_stop_streaming() argument
986 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_stop_streaming()
[all …]
/drivers/char/
Dvirtio_console.c320 struct virtqueue *vq) in find_port_by_vq() argument
327 if (port->in_vq == vq || port->out_vq == vq) in find_port_by_vq()
416 static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size, in alloc_buf() argument
439 if (is_rproc_serial(vq->vdev)) { in alloc_buf()
449 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent) in alloc_buf()
451 buf->dev = vq->vdev->dev.parent->parent; in alloc_buf()
499 static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf) in add_inbuf() argument
506 ret = virtqueue_add_inbuf(vq, sg, 1, buf, GFP_ATOMIC); in add_inbuf()
507 virtqueue_kick(vq); in add_inbuf()
509 ret = vq->num_free; in add_inbuf()
[all …]
/drivers/media/usb/cx231xx/
Dcx231xx-vbi.c170 vbi_buffer_setup(struct videobuf_queue *vq, unsigned int *count, in vbi_buffer_setup() argument
173 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_setup()
191 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) in free_buffer() argument
193 struct cx231xx_fh *fh = vq->priv_data; in free_buffer()
218 vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in vbi_buffer_prepare() argument
221 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_prepare()
241 rc = videobuf_iolock(vq, &buf->vb, NULL); in vbi_buffer_prepare()
262 free_buffer(vq, buf); in vbi_buffer_prepare()
267 vbi_buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in vbi_buffer_queue() argument
271 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_queue()
[all …]
/drivers/media/platform/soc_camera/
Dmx1_camera.c125 static int mx1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count, in mx1_videobuf_setup() argument
128 struct soc_camera_device *icd = vq->priv_data; in mx1_videobuf_setup()
143 static void free_buffer(struct videobuf_queue *vq, struct mx1_buffer *buf) in free_buffer() argument
145 struct soc_camera_device *icd = vq->priv_data; in free_buffer()
157 videobuf_waiton(vq, vb, 0, 0); in free_buffer()
158 videobuf_dma_contig_free(vq, vb); in free_buffer()
163 static int mx1_videobuf_prepare(struct videobuf_queue *vq, in mx1_videobuf_prepare() argument
166 struct soc_camera_device *icd = vq->priv_data; in mx1_videobuf_prepare()
202 ret = videobuf_iolock(vq, vb, NULL); in mx1_videobuf_prepare()
214 free_buffer(vq, buf); in mx1_videobuf_prepare()
[all …]
/drivers/media/usb/au0828/
Dau0828-vbi.c38 free_buffer(struct videobuf_queue *vq, struct au0828_buffer *buf) in free_buffer() argument
40 struct au0828_fh *fh = vq->priv_data; in free_buffer()
114 vbi_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in vbi_queue() argument
119 struct au0828_fh *fh = vq->priv_data; in vbi_queue()
/drivers/block/
Dvirtio_blk.c28 struct virtqueue *vq; member
103 static int __virtblk_add_req(struct virtqueue *vq, in __virtblk_add_req() argument
143 return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); in __virtblk_add_req()
153 while (unlikely((ret = __virtblk_add_req(vblk->vq, vbr, vbr->sg, in virtblk_add_req()
165 virtqueue_kick(vblk->vq); in virtblk_add_req()
275 static void virtblk_done(struct virtqueue *vq) in virtblk_done() argument
277 struct virtio_blk *vblk = vq->vdev->priv; in virtblk_done()
285 virtqueue_disable_cb(vq); in virtblk_done()
286 while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) { in virtblk_done()
295 } while (!virtqueue_enable_cb(vq)); in virtblk_done()
[all …]
/drivers/media/usb/uvc/
Duvc_queue.c43 static int uvc_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, in uvc_queue_setup() argument
47 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_queue_setup()
118 static void uvc_wait_prepare(struct vb2_queue *vq) in uvc_wait_prepare() argument
120 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_wait_prepare()
125 static void uvc_wait_finish(struct vb2_queue *vq) in uvc_wait_finish() argument
127 struct uvc_video_queue *queue = vb2_get_drv_priv(vq); in uvc_wait_finish()
/drivers/media/platform/
Dtimblogiw.c475 static int buffer_setup(struct videobuf_queue *vq, unsigned int *count, in buffer_setup() argument
478 struct timblogiw_fh *fh = vq->priv_data; in buffer_setup()
491 static int buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in buffer_prepare() argument
494 struct timblogiw_fh *fh = vq->priv_data; in buffer_prepare()
518 err = videobuf_iolock(vq, vb, NULL); in buffer_prepare()
539 videobuf_dma_contig_free(vq, vb); in buffer_prepare()
544 static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in buffer_queue() argument
546 struct timblogiw_fh *fh = vq->priv_data; in buffer_queue()
585 static void buffer_release(struct videobuf_queue *vq, in buffer_release() argument
588 struct timblogiw_fh *fh = vq->priv_data; in buffer_release()
[all …]

1234