Searched refs:last_used_idx (Results 1 - 7 of 7) sorted by relevance

/linux-4.1.27/drivers/virtio/
H A Dvirtio_ring.c81 u16 last_used_idx; member in struct:vring_virtqueue
451 return vq->last_used_idx != virtio16_to_cpu(vq->vq.vdev, vq->vring.used->idx); more_used()
493 last_used = (vq->last_used_idx & (vq->vring.num - 1)); virtqueue_get_buf()
509 vq->last_used_idx++; virtqueue_get_buf()
514 vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); virtqueue_get_buf()
559 u16 last_used_idx; virtqueue_enable_cb_prepare() local
569 vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, last_used_idx = vq->last_used_idx); virtqueue_enable_cb_prepare()
571 return last_used_idx; virtqueue_enable_cb_prepare()
578 * @last_used_idx: virtqueue state (from call to virtqueue_enable_cb_prepare).
584 bool virtqueue_poll(struct virtqueue *_vq, unsigned last_used_idx) virtqueue_poll() argument
589 return (u16)last_used_idx != virtio16_to_cpu(_vq->vdev, vq->vring.used->idx); virtqueue_poll()
606 unsigned last_used_idx = virtqueue_enable_cb_prepare(_vq); virtqueue_enable_cb() local
607 return !virtqueue_poll(_vq, last_used_idx); virtqueue_enable_cb()
638 bufs = (u16)(virtio16_to_cpu(_vq->vdev, vq->vring.avail->idx) - vq->last_used_idx) * 3 / 4; virtqueue_enable_cb_delayed()
639 vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx + bufs); virtqueue_enable_cb_delayed()
641 if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->vring.used->idx) - vq->last_used_idx) > bufs)) { virtqueue_enable_cb_delayed()
737 vq->last_used_idx = 0; vring_new_virtqueue()
/linux-4.1.27/drivers/vhost/
H A Dvhost.c186 vq->last_used_idx = 0; vhost_vq_reset()
1046 __virtio16 last_used_idx; vhost_init_used() local
1057 r = __get_user(last_used_idx, &vq->used->idx); vhost_init_used()
1060 vq->last_used_idx = vhost16_to_cpu(vq, last_used_idx); vhost_init_used()
1377 start = vq->last_used_idx % vq->num; __vhost_add_used_n()
1401 old = vq->last_used_idx; __vhost_add_used_n()
1402 new = (vq->last_used_idx += count); __vhost_add_used_n()
1419 start = vq->last_used_idx % vq->num; vhost_add_used_n()
1432 if (__put_user(cpu_to_vhost16(vq, vq->last_used_idx), &vq->used->idx)) { vhost_add_used_n()
1472 new = vq->signalled_used = vq->last_used_idx; vhost_notify()
H A Dvhost.h84 u16 last_used_idx; member in struct:vhost_virtqueue
H A Dvringh.c414 used_idx = vrh->last_used_idx + vrh->completed; __vringh_complete()
488 vrh->last_used_idx + vrh->completed, __vringh_need_notify()
489 vrh->last_used_idx); __vringh_need_notify()
491 vrh->last_used_idx += vrh->completed; __vringh_need_notify()
621 vrh->last_used_idx = 0; vringh_init_user()
882 vrh->last_used_idx = 0; vringh_init_kern()
/linux-4.1.27/drivers/misc/mic/host/
H A Dmic_debugfs.c317 seq_printf(s, " last_avail_idx %d last_used_idx %d", mic_vdev_info_show()
318 vrh->last_avail_idx, vrh->last_used_idx); mic_vdev_info_show()
H A Dmic_virtio.c431 vrh->last_used_idx = 0; mic_virtio_device_reset()
/linux-4.1.27/include/linux/
H A Dvringh.h47 u16 last_used_idx; member in struct:vringh

Completed in 228 milliseconds