/drivers/virtio/ |
D | virtio_ring.c | 32 dev_err(&(_vq)->vq.vdev->dev, \ 33 "%s:"fmt, (_vq)->vq.name, ##args); \ 41 (_vq)->vq.name, (_vq)->in_use); \ 49 dev_err(&_vq->vq.vdev->dev, \ 50 "%s:"fmt, (_vq)->vq.name, ##args); \ 53 #define START_USE(vq) argument 54 #define END_USE(vq) argument 59 struct virtqueue vq; member 85 bool (*notify)(struct virtqueue *vq); 100 #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) [all …]
|
D | virtio_mmio.c | 129 struct virtqueue *vq; member 222 static bool 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() 253 ret |= vring_interrupt(irq, info->vq); in vm_interrupt() 262 static void vm_del_vq(struct virtqueue *vq) in vm_del_vq() argument 264 struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev); in vm_del_vq() 265 struct virtio_mmio_vq_info *info = vq->priv; in vm_del_vq() 267 unsigned int index = vq->index; in vm_del_vq() 273 vring_del_virtqueue(vq); in vm_del_vq() [all …]
|
D | virtio_pci.c | 75 struct virtqueue *vq; member 197 static bool vp_notify(struct virtqueue *vq) in vp_notify() argument 199 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); in vp_notify() 203 iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); in vp_notify() 226 if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) in vp_vring_interrupt() 385 void (*callback)(struct virtqueue *vq), in setup_vq() argument 391 struct virtqueue *vq; in setup_vq() local 425 vq = vring_new_virtqueue(index, info->num, VIRTIO_PCI_VRING_ALIGN, vdev, in setup_vq() 427 if (!vq) { in setup_vq() 432 vq->priv = info; in setup_vq() [all …]
|
D | virtio_balloon.c | 97 static void balloon_ack(struct virtqueue *vq) in balloon_ack() argument 99 struct virtio_balloon *vb = vq->vdev->priv; in balloon_ack() 104 static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) in tell_host() argument 112 virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL); in tell_host() 113 virtqueue_kick(vq); in tell_host() 116 wait_event(vb->acked, virtqueue_get_buf(vq, &len)); in tell_host() 242 static void stats_request(struct virtqueue *vq) in stats_request() argument 244 struct virtio_balloon *vb = vq->vdev->priv; in stats_request() 252 struct virtqueue *vq; in stats_handle_request() local 259 vq = vb->stats_vq; in stats_handle_request() [all …]
|
/drivers/vhost/ |
D | vhost.c | 36 #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 178 struct vhost_virtqueue *vq) in vhost_vq_reset() argument 180 vq->num = 1; in vhost_vq_reset() 181 vq->desc = NULL; in vhost_vq_reset() 182 vq->avail = NULL; in vhost_vq_reset() 183 vq->used = NULL; in vhost_vq_reset() 184 vq->last_avail_idx = 0; in vhost_vq_reset() 185 vq->avail_idx = 0; in vhost_vq_reset() 186 vq->last_used_idx = 0; in vhost_vq_reset() [all …]
|
D | net.c | 81 struct vhost_virtqueue *vq; member 85 struct vhost_virtqueue vq; member 120 static void vhost_net_enable_zcopy(int vq) in vhost_net_enable_zcopy() argument 122 vhost_net_zcopy_mask |= 0x1 << vq; in vhost_net_enable_zcopy() 126 vhost_net_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy) in vhost_net_ubuf_alloc() argument 137 ubufs->vq = vq; in vhost_net_ubuf_alloc() 281 struct vhost_virtqueue *vq) in vhost_zerocopy_signal_used() argument 284 container_of(vq, struct vhost_net_virtqueue, vq); in vhost_zerocopy_signal_used() 289 if (vq->heads[i].len == VHOST_DMA_FAILED_LEN) in vhost_zerocopy_signal_used() 291 if (VHOST_DMA_IS_DONE(vq->heads[i].len)) { in vhost_zerocopy_signal_used() [all …]
|
D | test.c | 40 struct vhost_virtqueue *vq = &n->vqs[VHOST_TEST_VQ]; in handle_vq() local 46 mutex_lock(&vq->mutex); in handle_vq() 47 private = vq->private_data; in handle_vq() 49 mutex_unlock(&vq->mutex); in handle_vq() 53 vhost_disable_notify(&n->dev, vq); in handle_vq() 56 head = vhost_get_vq_desc(vq, vq->iov, in handle_vq() 57 ARRAY_SIZE(vq->iov), in handle_vq() 64 if (head == vq->num) { in handle_vq() 65 if (unlikely(vhost_enable_notify(&n->dev, vq))) { in handle_vq() 66 vhost_disable_notify(&n->dev, vq); in handle_vq() [all …]
|
D | scsi.c | 181 struct vhost_virtqueue vq; member 240 struct vhost_virtqueue *vq; in tcm_vhost_init_inflight() local 244 vq = &vs->vqs[i].vq; in tcm_vhost_init_inflight() 246 mutex_lock(&vq->mutex); in tcm_vhost_init_inflight() 259 mutex_unlock(&vq->mutex); in tcm_vhost_init_inflight() 264 tcm_vhost_get_inflight(struct vhost_virtqueue *vq) in tcm_vhost_get_inflight() argument 269 svq = container_of(vq, struct vhost_scsi_virtqueue, vq); in tcm_vhost_get_inflight() 565 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in tcm_vhost_allocate_evt() local 575 vq_err(vq, "Failed to allocate tcm_vhost_evt\n"); in tcm_vhost_allocate_evt() 604 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in tcm_vhost_do_evt_work() local [all …]
|
D | vhost.h | 138 int vhost_vq_access_ok(struct vhost_virtqueue *vq); 159 int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, 162 #define vq_err(vq, fmt, ...) do { \ argument 164 if ((vq)->error_ctx) \ 165 eventfd_signal((vq)->error_ctx, 1);\ 175 static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) in vhost_has_feature() argument 177 return vq->acked_features & (1 << bit); in vhost_has_feature()
|
/drivers/remoteproc/ |
D | remoteproc_virtio.c | 33 static bool rproc_virtio_notify(struct virtqueue *vq) in rproc_virtio_notify() argument 35 struct rproc_vring *rvring = vq->priv; in rproc_virtio_notify() 64 if (!rvring || !rvring->vq) in rproc_vq_interrupt() 67 return vring_interrupt(0, rvring->vq); in rproc_vq_interrupt() 73 void (*callback)(struct virtqueue *vq), in rp_find_vq() argument 80 struct virtqueue *vq; in rp_find_vq() local 110 vq = vring_new_virtqueue(id, len, rvring->align, vdev, false, addr, in rp_find_vq() 112 if (!vq) { in rp_find_vq() 118 rvring->vq = vq; in rp_find_vq() 119 vq->priv = rvring; in rp_find_vq() [all …]
|
/drivers/s390/kvm/ |
D | kvm_virtio.c | 169 static bool kvm_notify(struct virtqueue *vq) in kvm_notify() argument 172 struct kvm_vqconfig *config = vq->priv; in kvm_notify() 186 void (*callback)(struct virtqueue *vq), in kvm_find_vq() argument 191 struct virtqueue *vq; in kvm_find_vq() local 208 vq = vring_new_virtqueue(index, config->num, KVM_S390_VIRTIO_RING_ALIGN, in kvm_find_vq() 211 if (!vq) { in kvm_find_vq() 220 config->token = (u64) vq; in kvm_find_vq() 222 vq->priv = config; in kvm_find_vq() 223 return vq; in kvm_find_vq() 232 static void kvm_del_vq(struct virtqueue *vq) in kvm_del_vq() argument [all …]
|
D | virtio_ccw.c | 91 struct virtqueue *vq; member 145 static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) in drop_airq_indicator() argument 151 if (vq == (void *)airq_iv_get_ptr(info->aiv, i)) { in drop_airq_indicator() 261 drop_airq_indicator(info->vq, vcdev->airq_info); in virtio_ccw_drop_indicators() 362 static bool virtio_ccw_kvm_notify(struct virtqueue *vq) in virtio_ccw_kvm_notify() argument 364 struct virtio_ccw_vq_info *info = vq->priv; in virtio_ccw_kvm_notify() 368 vcdev = to_vc_device(info->vq->vdev); in virtio_ccw_kvm_notify() 370 info->cookie = do_kvm_notify(schid, vq->index, info->cookie); in virtio_ccw_kvm_notify() 388 static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw) in virtio_ccw_del_vq() argument 390 struct virtio_ccw_device *vcdev = to_vc_device(vq->vdev); in virtio_ccw_del_vq() [all …]
|
/drivers/lguest/ |
D | lguest_device.c | 232 static bool lg_notify(struct virtqueue *vq) in lg_notify() argument 238 struct lguest_vq_info *lvq = vq->priv; in lg_notify() 259 void (*callback)(struct virtqueue *vq), in lg_find_vq() argument 264 struct virtqueue *vq; in lg_find_vq() local 303 vq = vring_new_virtqueue(index, lvq->config.num, LGUEST_VRING_ALIGN, vdev, in lg_find_vq() 305 if (!vq) { in lg_find_vq() 324 dev_name(&vdev->dev), vq); in lg_find_vq() 332 vq->priv = lvq; in lg_find_vq() 333 return vq; in lg_find_vq() 338 vring_del_virtqueue(vq); in lg_find_vq() [all …]
|
/drivers/scsi/ |
D | virtio_scsi.c | 65 struct virtqueue *vq; member 219 struct virtqueue *vq = virtscsi_vq->vq; in virtscsi_vq_done() local 223 virtqueue_disable_cb(vq); in virtscsi_vq_done() 224 while ((buf = virtqueue_get_buf(vq, &len)) != NULL) in virtscsi_vq_done() 227 if (unlikely(virtqueue_is_broken(vq))) in virtscsi_vq_done() 229 } while (!virtqueue_enable_cb(vq)); in virtscsi_vq_done() 233 static void virtscsi_req_done(struct virtqueue *vq) in virtscsi_req_done() argument 235 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev); in virtscsi_req_done() 237 int index = vq->index - VIRTIO_SCSI_VQ_BASE; in virtscsi_req_done() 261 static void virtscsi_ctrl_done(struct virtqueue *vq) in virtscsi_ctrl_done() argument [all …]
|
/drivers/media/v4l2-core/ |
D | v4l2-mem2mem.c | 359 struct vb2_queue *vq; in v4l2_m2m_reqbufs() local 361 vq = v4l2_m2m_get_vq(m2m_ctx, reqbufs->type); in v4l2_m2m_reqbufs() 362 return vb2_reqbufs(vq, reqbufs); in v4l2_m2m_reqbufs() 374 struct vb2_queue *vq; in v4l2_m2m_querybuf() local 378 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_querybuf() 379 ret = vb2_querybuf(vq, buf); in v4l2_m2m_querybuf() 382 if (buf->memory == V4L2_MEMORY_MMAP && !V4L2_TYPE_IS_OUTPUT(vq->type)) { in v4l2_m2m_querybuf() 383 if (V4L2_TYPE_IS_MULTIPLANAR(vq->type)) { in v4l2_m2m_querybuf() 403 struct vb2_queue *vq; in v4l2_m2m_qbuf() local 406 vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); in v4l2_m2m_qbuf() [all …]
|
/drivers/net/ |
D | virtio_net.c | 68 struct virtqueue *vq; member 80 struct virtqueue *vq; member 162 static int vq2txq(struct virtqueue *vq) in vq2txq() argument 164 return (vq->index - 1) / 2; in vq2txq() 172 static int vq2rxq(struct virtqueue *vq) in vq2rxq() argument 174 return vq->index / 2; in vq2rxq() 214 static void skb_xmit_done(struct virtqueue *vq) in skb_xmit_done() argument 216 struct virtnet_info *vi = vq->vdev->priv; in skb_xmit_done() 219 virtqueue_disable_cb(vq); in skb_xmit_done() 222 netif_wake_subqueue(vi->dev, vq2txq(vq)); in skb_xmit_done() [all …]
|
/drivers/char/hw_random/ |
D | virtio-rng.c | 32 struct virtqueue *vq; member 43 static void random_recv_done(struct virtqueue *vq) in random_recv_done() argument 45 struct virtrng_info *vi = vq->vdev->priv; in random_recv_done() 48 if (!virtqueue_get_buf(vi->vq, &vi->data_avail)) in random_recv_done() 62 virtqueue_add_inbuf(vi->vq, &sg, 1, buf, GFP_KERNEL); in register_buffer() 64 virtqueue_kick(vi->vq); in register_buffer() 128 vi->vq = virtio_find_single_vq(vdev, random_recv_done, "input"); in probe_common() 129 if (IS_ERR(vi->vq)) { in probe_common() 130 err = PTR_ERR(vi->vq); in probe_common()
|
/drivers/misc/mic/card/ |
D | mic_virtio.c | 190 static bool mic_notify(struct virtqueue *vq) in mic_notify() argument 192 struct mic_vdev *mvdev = vq->priv; in mic_notify() 198 static void mic_del_vq(struct virtqueue *vq, int n) in mic_del_vq() argument 200 struct mic_vdev *mvdev = to_micvdev(vq->vdev); in mic_del_vq() 201 struct vring *vr = (struct vring *)(vq + 1); in mic_del_vq() 204 vring_del_virtqueue(vq); in mic_del_vq() 212 struct virtqueue *vq, *n; in mic_del_vqs() local 217 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in mic_del_vqs() 218 mic_del_vq(vq, idx++); in mic_del_vqs() 228 void (*callback)(struct virtqueue *vq), in mic_find_vq() argument [all …]
|
/drivers/media/platform/vivid/ |
D | vivid-vbi-out.c | 30 static int vbi_out_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, in vbi_out_queue_setup() argument 34 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_out_queue_setup() 36 unsigned size = vq->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT ? in vbi_out_queue_setup() 45 if (vq->num_buffers + *nbuffers < 2) in vbi_out_queue_setup() 46 *nbuffers = 2 - vq->num_buffers; in vbi_out_queue_setup() 92 static int vbi_out_start_streaming(struct vb2_queue *vq, unsigned count) in vbi_out_start_streaming() argument 94 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_out_start_streaming() 117 static void vbi_out_stop_streaming(struct vb2_queue *vq) in vbi_out_stop_streaming() argument 119 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_out_stop_streaming()
|
D | vivid-vbi-cap.c | 138 static int vbi_cap_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, in vbi_cap_queue_setup() argument 142 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_queue_setup() 144 unsigned size = vq->type == V4L2_BUF_TYPE_SLICED_VBI_CAPTURE ? in vbi_cap_queue_setup() 153 if (vq->num_buffers + *nbuffers < 2) in vbi_cap_queue_setup() 154 *nbuffers = 2 - vq->num_buffers; in vbi_cap_queue_setup() 200 static int vbi_cap_start_streaming(struct vb2_queue *vq, unsigned count) in vbi_cap_start_streaming() argument 202 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_start_streaming() 225 static void vbi_cap_stop_streaming(struct vb2_queue *vq) in vbi_cap_stop_streaming() argument 227 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_stop_streaming()
|
/drivers/char/ |
D | virtio_console.c | 324 struct virtqueue *vq) in find_port_by_vq() argument 331 if (port->in_vq == vq || port->out_vq == vq) in find_port_by_vq() 420 static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size, in alloc_buf() argument 443 if (is_rproc_serial(vq->vdev)) { in alloc_buf() 453 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent) in alloc_buf() 455 buf->dev = vq->vdev->dev.parent->parent; in alloc_buf() 503 static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf) in add_inbuf() argument 510 ret = virtqueue_add_inbuf(vq, sg, 1, buf, GFP_ATOMIC); in add_inbuf() 511 virtqueue_kick(vq); in add_inbuf() 513 ret = vq->num_free; in add_inbuf() [all …]
|
/drivers/media/usb/cx231xx/ |
D | cx231xx-vbi.c | 169 vbi_buffer_setup(struct videobuf_queue *vq, unsigned int *count, in vbi_buffer_setup() argument 172 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_setup() 190 static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf) in free_buffer() argument 192 struct cx231xx_fh *fh = vq->priv_data; in free_buffer() 217 vbi_buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, in vbi_buffer_prepare() argument 220 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_prepare() 240 rc = videobuf_iolock(vq, &buf->vb, NULL); in vbi_buffer_prepare() 261 free_buffer(vq, buf); in vbi_buffer_prepare() 266 vbi_buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in vbi_buffer_queue() argument 270 struct cx231xx_fh *fh = vq->priv_data; in vbi_buffer_queue() [all …]
|
/drivers/block/ |
D | virtio_blk.c | 26 struct virtqueue *vq; member 76 static int __virtblk_add_req(struct virtqueue *vq, in __virtblk_add_req() argument 116 return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC); in __virtblk_add_req() 135 static void virtblk_done(struct virtqueue *vq) in virtblk_done() argument 137 struct virtio_blk *vblk = vq->vdev->priv; in virtblk_done() 139 int qid = vq->index; in virtblk_done() 146 virtqueue_disable_cb(vq); in virtblk_done() 147 while ((vbr = virtqueue_get_buf(vblk->vqs[qid].vq, &len)) != NULL) { in virtblk_done() 151 if (unlikely(virtqueue_is_broken(vq))) in virtblk_done() 153 } while (!virtqueue_enable_cb(vq)); in virtblk_done() [all …]
|
/drivers/media/platform/marvell-ccic/ |
D | mcam-core.c | 1069 static int mcam_vb_queue_setup(struct vb2_queue *vq, in mcam_vb_queue_setup() argument 1074 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_queue_setup() 1110 static void mcam_vb_wait_prepare(struct vb2_queue *vq) in mcam_vb_wait_prepare() argument 1112 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_wait_prepare() 1117 static void mcam_vb_wait_finish(struct vb2_queue *vq) in mcam_vb_wait_finish() argument 1119 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_wait_finish() 1127 static int mcam_vb_start_streaming(struct vb2_queue *vq, unsigned int count) in mcam_vb_start_streaming() argument 1129 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_start_streaming() 1159 static void mcam_vb_stop_streaming(struct vb2_queue *vq) in mcam_vb_stop_streaming() argument 1161 struct mcam_camera *cam = vb2_get_drv_priv(vq); in mcam_vb_stop_streaming() [all …]
|
/drivers/media/usb/au0828/ |
D | au0828-vbi.c | 38 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()
|