Home
last modified time | relevance | path

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

123

/linux-3.4.99/drivers/virtio/
Dvirtio_ring.c33 #define virtio_mb(vq) \ argument
34 do { if ((vq)->weak_barriers) smp_mb(); else mb(); } while(0)
35 #define virtio_rmb(vq) \ argument
36 do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
37 #define virtio_wmb(vq) \ argument
38 do { if ((vq)->weak_barriers) smp_wmb(); else wmb(); } while(0)
43 #define virtio_mb(vq) mb() argument
44 #define virtio_rmb(vq) rmb() argument
45 #define virtio_wmb(vq) wmb() argument
52 dev_err(&(_vq)->vq.vdev->dev, \
[all …]
Dvirtio_mmio.c83 struct virtqueue *vq; member
179 static void vm_notify(struct virtqueue *vq) in vm_notify() argument
181 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_notify()
182 struct virtio_mmio_vq_info *info = vq->priv; in vm_notify()
213 ret |= vring_interrupt(irq, info->vq); in vm_interrupt()
222 static void vm_del_vq(struct virtqueue *vq) in vm_del_vq() argument
224 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_del_vq()
225 struct virtio_mmio_vq_info *info = vq->priv; in vm_del_vq()
232 vring_del_virtqueue(vq); in vm_del_vq()
246 struct virtqueue *vq, *n; in vm_del_vqs() local
[all …]
Dvirtio_pci.c77 struct virtqueue *vq; member
202 static void vp_notify(struct virtqueue *vq) in vp_notify() argument
204 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); in vp_notify()
205 struct virtio_pci_vq_info *info = vq->priv; in vp_notify()
235 if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) in vp_vring_interrupt()
380 void (*callback)(struct virtqueue *vq), in setup_vq() argument
386 struct virtqueue *vq; in setup_vq() local
421 vq = vring_new_virtqueue(info->num, VIRTIO_PCI_VRING_ALIGN, vdev, in setup_vq()
423 if (!vq) { in setup_vq()
428 vq->priv = info; in setup_vq()
[all …]
Dvirtio_balloon.c90 static void balloon_ack(struct virtqueue *vq) in balloon_ack() argument
95 vb = virtqueue_get_buf(vq, &len); in balloon_ack()
100 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) in tell_host() argument
109 if (virtqueue_add_buf(vq, &sg, 1, 0, vb, GFP_KERNEL) < 0) in tell_host()
111 virtqueue_kick(vq); in tell_host()
232 static void stats_request(struct virtqueue *vq) in stats_request() argument
237 vb = virtqueue_get_buf(vq, &len); in stats_request()
246 struct virtqueue *vq; in stats_handle_request() local
252 vq = vb->stats_vq; in stats_handle_request()
254 if (virtqueue_add_buf(vq, &sg, 1, 0, vb, GFP_KERNEL) < 0) in stats_handle_request()
[all …]
/linux-3.4.99/drivers/vhost/
Dvhost.c42 #define vhost_used_event(vq) ((u16 __user *)&vq->avail->ring[vq->num]) argument
43 #define vhost_avail_event(vq) ((u16 __user *)&vq->used->ring[vq->num]) argument
160 struct vhost_virtqueue *vq) in vhost_vq_reset() argument
162 vq->num = 1; in vhost_vq_reset()
163 vq->desc = NULL; in vhost_vq_reset()
164 vq->avail = NULL; in vhost_vq_reset()
165 vq->used = NULL; in vhost_vq_reset()
166 vq->last_avail_idx = 0; in vhost_vq_reset()
167 vq->avail_idx = 0; in vhost_vq_reset()
168 vq->last_used_idx = 0; in vhost_vq_reset()
[all …]
Dnet.c133 struct vhost_virtqueue *vq = &net->dev.vqs[VHOST_NET_VQ_TX]; in handle_tx() local
141 .msg_iov = vq->iov, in handle_tx()
152 sock = rcu_dereference_check(vq->private_data, 1); in handle_tx()
158 mutex_lock(&vq->mutex); in handle_tx()
160 mutex_unlock(&vq->mutex); in handle_tx()
164 mutex_lock(&vq->mutex); in handle_tx()
165 vhost_disable_notify(&net->dev, vq); in handle_tx()
169 hdr_size = vq->vhost_hlen; in handle_tx()
175 vhost_zerocopy_signal_used(vq); in handle_tx()
177 head = vhost_get_vq_desc(&net->dev, vq, vq->iov, in handle_tx()
[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 …]
Dvhost.h63 struct vhost_virtqueue *vq; member
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 { \ argument
196 if ((vq)->error_ctx) \
197 eventfd_signal((vq)->error_ctx, 1);\
219 void vhost_enable_zcopy(int vq);
/linux-3.4.99/arch/s390/kernel/
Dvtime.c130 struct vtimer_queue *vq = &__get_cpu_var(virt_cpu_timer); in vtime_stop_cpu() local
144 psw_idle(idle, vq, psw_mask, !list_empty(&vq->list)); in vtime_stop_cpu()
199 struct vtimer_queue *vq; in do_callbacks() local
205 vq = &__get_cpu_var(virt_cpu_timer); in do_callbacks()
212 event->expires = event->interval + vq->elapsed; in do_callbacks()
213 spin_lock(&vq->lock); in do_callbacks()
214 list_add_sorted(event, &vq->list); in do_callbacks()
215 spin_unlock(&vq->lock); in do_callbacks()
226 struct vtimer_queue *vq; in do_cpu_timer_interrupt() local
233 vq = &__get_cpu_var(virt_cpu_timer); in do_cpu_timer_interrupt()
[all …]
/linux-3.4.99/tools/lguest/
Dlguest.c132 struct virtqueue *vq; member
164 void (*service)(struct virtqueue *vq);
206 #define lg_last_avail(vq) ((vq)->last_avail_idx) argument
625 static void trigger_irq(struct virtqueue *vq) in trigger_irq() argument
627 unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; in trigger_irq()
630 if (!vq->pending_used) in trigger_irq()
632 vq->pending_used = 0; in trigger_irq()
635 if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) { in trigger_irq()
641 err(1, "Triggering irq %i", vq->config.irq); in trigger_irq()
652 static unsigned wait_for_vq_desc(struct virtqueue *vq, in wait_for_vq_desc() argument
[all …]
/linux-3.4.99/include/linux/
Dvirtio.h22 void (*callback)(struct virtqueue *vq);
28 int virtqueue_add_buf(struct virtqueue *vq,
35 void virtqueue_kick(struct virtqueue *vq);
37 bool virtqueue_kick_prepare(struct virtqueue *vq);
39 void virtqueue_notify(struct virtqueue *vq);
41 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
43 void virtqueue_disable_cb(struct virtqueue *vq);
45 bool virtqueue_enable_cb(struct virtqueue *vq);
47 unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq);
49 bool virtqueue_poll(struct virtqueue *vq, unsigned);
[all …]
/linux-3.4.99/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_buf(vq, &sg, 0, 1, buf, GFP_KERNEL) < 0) in register_buffer()
53 virtqueue_kick(vq); in register_buffer()
92 if (vq) { in virtrng_probe()
97 vq = virtio_find_single_vq(vdev, random_recv_done, "input"); in virtrng_probe()
98 if (IS_ERR(vq)) { in virtrng_probe()
99 err = PTR_ERR(vq); in virtrng_probe()
100 vq = NULL; in virtrng_probe()
[all …]
/linux-3.4.99/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
78 struct virtqueue *vq; in rp_find_vq() local
102 vq = vring_new_virtqueue(len, rvring->align, vdev, false, addr, in rp_find_vq()
104 if (!vq) { in rp_find_vq()
109 rvring->vq = vq; in rp_find_vq()
110 vq->priv = rvring; in rp_find_vq()
[all …]
/linux-3.4.99/tools/virtio/
Dvirtio_test.c26 struct virtqueue *vq; member
40 void vq_notify(struct virtqueue *vq) in vq_notify() argument
42 struct vq_info *info = vq->priv; in vq_notify()
49 void vq_callback(struct virtqueue *vq) in vq_callback() argument
95 info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, in vq_info_add()
98 assert(info->vq); in vq_info_add()
99 info->vq->priv = info; in vq_info_add()
147 static void run_test(struct vdev_info *dev, struct vq_info *vq, int bufs) in run_test() argument
158 virtqueue_disable_cb(vq->vq); in run_test()
163 r = virtqueue_add_buf(vq->vq, &sl, 1, 0, in run_test()
[all …]
/linux-3.4.99/drivers/s390/kvm/
Dkvm_virtio.c168 static void kvm_notify(struct virtqueue *vq) in kvm_notify() argument
170 struct kvm_vqconfig *config = vq->priv; in kvm_notify()
181 void (*callback)(struct virtqueue *vq), in kvm_find_vq() argument
186 struct virtqueue *vq; in kvm_find_vq() local
200 vq = vring_new_virtqueue(config->num, KVM_S390_VIRTIO_RING_ALIGN, in kvm_find_vq()
203 if (!vq) { in kvm_find_vq()
212 config->token = (u64) vq; in kvm_find_vq()
214 vq->priv = config; in kvm_find_vq()
215 return vq; in kvm_find_vq()
224 static void kvm_del_vq(struct virtqueue *vq) in kvm_del_vq() argument
[all …]
/linux-3.4.99/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
299 vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN, vdev, in lg_find_vq()
301 if (!vq) { in lg_find_vq()
320 dev_name(&vdev->dev), vq); in lg_find_vq()
328 vq->priv = lvq; in lg_find_vq()
329 return vq; in lg_find_vq()
334 vring_del_virtqueue(vq); in lg_find_vq()
[all …]
/linux-3.4.99/drivers/media/video/
Dv4l2-mem2mem.c298 struct vb2_queue *vq; in v4l2_m2m_reqbufs() local
300 vq = v4l2_m2m_get_vq(m2m_ctx, reqbufs->type); in v4l2_m2m_reqbufs()
301 return vb2_reqbufs(vq, reqbufs); in v4l2_m2m_reqbufs()
313 struct vb2_queue *vq; in v4l2_m2m_querybuf() local
317 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_querybuf()
318 ret = vb2_querybuf(vq, buf); in v4l2_m2m_querybuf()
321 if (buf->memory == V4L2_MEMORY_MMAP && !V4L2_TYPE_IS_OUTPUT(vq->type)) { in v4l2_m2m_querybuf()
322 if (V4L2_TYPE_IS_MULTIPLANAR(vq->type)) { in v4l2_m2m_querybuf()
342 struct vb2_queue *vq; in v4l2_m2m_qbuf() local
345 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_qbuf()
[all …]
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()
148 static void free_buffer(struct videobuf_queue *vq, struct mx1_buffer *buf) in free_buffer() argument
150 struct soc_camera_device *icd = vq->priv_data; in free_buffer()
162 videobuf_waiton(vq, vb, 0, 0); in free_buffer()
163 videobuf_dma_contig_free(vq, vb); in free_buffer()
168 static int mx1_videobuf_prepare(struct videobuf_queue *vq, in mx1_videobuf_prepare() argument
171 struct soc_camera_device *icd = vq->priv_data; in mx1_videobuf_prepare()
212 ret = videobuf_iolock(vq, vb, NULL); in mx1_videobuf_prepare()
224 free_buffer(vq, buf); in mx1_videobuf_prepare()
[all …]
/linux-3.4.99/tools/virtio/linux/
Dvirtio.h163 void (*callback)(struct virtqueue *vq);
192 int virtqueue_add_buf(struct virtqueue *vq,
199 void virtqueue_kick(struct virtqueue *vq);
201 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
203 void virtqueue_disable_cb(struct virtqueue *vq);
205 bool virtqueue_enable_cb(struct virtqueue *vq);
207 void *virtqueue_detach_unused_buf(struct virtqueue *vq);
213 void (*notify)(struct virtqueue *vq),
214 void (*callback)(struct virtqueue *vq),
216 void vring_del_virtqueue(struct virtqueue *vq);
/linux-3.4.99/drivers/scsi/
Dvirtio_scsi.c148 static void virtscsi_vq_done(struct virtqueue *vq, void (*fn)(void *buf)) in virtscsi_vq_done() argument
150 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev); in virtscsi_vq_done()
159 virtqueue_disable_cb(vq); in virtscsi_vq_done()
160 while ((buf = virtqueue_get_buf(vq, &len)) != NULL) in virtscsi_vq_done()
162 } while (!virtqueue_enable_cb(vq)); in virtscsi_vq_done()
167 static void virtscsi_req_done(struct virtqueue *vq) in virtscsi_req_done() argument
169 virtscsi_vq_done(vq, virtscsi_complete_cmd); in virtscsi_req_done()
182 static void virtscsi_ctrl_done(struct virtqueue *vq) in virtscsi_ctrl_done() argument
184 virtscsi_vq_done(vq, virtscsi_complete_free); in virtscsi_ctrl_done()
187 static void virtscsi_event_done(struct virtqueue *vq) in virtscsi_event_done() argument
[all …]
/linux-3.4.99/include/media/
Dsoc_camera.h273 static inline struct soc_camera_device *soc_camera_from_vb2q(const struct vb2_queue *vq) in soc_camera_from_vb2q() argument
275 return container_of(vq, struct soc_camera_device, vb2_vidq); in soc_camera_from_vb2q()
278 static inline struct soc_camera_device *soc_camera_from_vbq(const struct videobuf_queue *vq) in soc_camera_from_vbq() argument
280 return container_of(vq, struct soc_camera_device, vb_vidq); in soc_camera_from_vbq()
288 void soc_camera_lock(struct vb2_queue *vq);
289 void soc_camera_unlock(struct vb2_queue *vq);
/linux-3.4.99/net/9p/
Dtrans_virtio.c84 struct virtqueue *vq; member
143 static void req_done(struct virtqueue *vq) in req_done() argument
145 struct virtio_chan *chan = vq->vdev->priv; in req_done()
155 rc = virtqueue_get_buf(chan->vq, &len); in req_done()
276 err = virtqueue_add_buf(chan->vq, chan->sg, out, in, req->tc, in p9_virtio_request()
296 virtqueue_kick(chan->vq); in p9_virtio_request()
419 err = virtqueue_add_buf(chan->vq, chan->sg, out, in, req->tc, in p9_virtio_zc_request()
440 virtqueue_kick(chan->vq); in p9_virtio_zc_request()
505 chan->vq = virtio_find_single_vq(vdev, req_done, "requests"); in p9_virtio_probe()
506 if (IS_ERR(chan->vq)) { in p9_virtio_probe()
[all …]
/linux-3.4.99/drivers/media/video/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()
/linux-3.4.99/drivers/media/video/em28xx/
Dem28xx-vbi.c45 free_buffer(struct videobuf_queue *vq, struct em28xx_buffer *buf) in free_buffer() argument
47 struct em28xx_fh *fh = vq->priv_data; in free_buffer()
121 vbi_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in vbi_queue() argument
126 struct em28xx_fh *fh = vq->priv_data; in vbi_queue()
/linux-3.4.99/drivers/media/video/cx231xx/
Dcx231xx-vbi.c173 vbi_buffer_setup(struct videobuf_queue *vq, unsigned int *count, in vbi_buffer_setup() argument
176 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_setup()
194 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) in free_buffer() argument
196 struct cx231xx_fh *fh = vq->priv_data; in free_buffer()
221 vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in vbi_buffer_prepare() argument
224 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_prepare()
244 rc = videobuf_iolock(vq, &buf->vb, NULL); in vbi_buffer_prepare()
265 free_buffer(vq, buf); in vbi_buffer_prepare()
270 vbi_buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in vbi_buffer_queue() argument
274 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_queue()
[all …]

123