mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
virtio_ring: switch to use vring_virtqueue for virtqueue_kick_prepare variants
Those variants are used internally so let's switch to use vring_virtqueue as parameter to be consistent with other internal virtqueue helpers. Acked-by: Eugenio Pérez <eperezma@redhat.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20251230064649.55597-6-jasowang@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
9552bc0581
commit
8b8590b708
@@ -717,9 +717,8 @@ unmap_release:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static bool virtqueue_kick_prepare_split(struct virtqueue *_vq)
|
||||
static bool virtqueue_kick_prepare_split(struct vring_virtqueue *vq)
|
||||
{
|
||||
struct vring_virtqueue *vq = to_vvq(_vq);
|
||||
u16 new, old;
|
||||
bool needs_kick;
|
||||
|
||||
@@ -736,12 +735,12 @@ static bool virtqueue_kick_prepare_split(struct virtqueue *_vq)
|
||||
LAST_ADD_TIME_INVALID(vq);
|
||||
|
||||
if (vq->event) {
|
||||
needs_kick = vring_need_event(virtio16_to_cpu(_vq->vdev,
|
||||
needs_kick = vring_need_event(virtio16_to_cpu(vq->vq.vdev,
|
||||
vring_avail_event(&vq->split.vring)),
|
||||
new, old);
|
||||
} else {
|
||||
needs_kick = !(vq->split.vring.used->flags &
|
||||
cpu_to_virtio16(_vq->vdev,
|
||||
cpu_to_virtio16(vq->vq.vdev,
|
||||
VRING_USED_F_NO_NOTIFY));
|
||||
}
|
||||
END_USE(vq);
|
||||
@@ -1595,9 +1594,8 @@ unmap_release:
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq)
|
||||
static bool virtqueue_kick_prepare_packed(struct vring_virtqueue *vq)
|
||||
{
|
||||
struct vring_virtqueue *vq = to_vvq(_vq);
|
||||
u16 new, old, off_wrap, flags, wrap_counter, event_idx;
|
||||
bool needs_kick;
|
||||
union {
|
||||
@@ -2456,8 +2454,8 @@ bool virtqueue_kick_prepare(struct virtqueue *_vq)
|
||||
{
|
||||
struct vring_virtqueue *vq = to_vvq(_vq);
|
||||
|
||||
return vq->packed_ring ? virtqueue_kick_prepare_packed(_vq) :
|
||||
virtqueue_kick_prepare_split(_vq);
|
||||
return vq->packed_ring ? virtqueue_kick_prepare_packed(vq) :
|
||||
virtqueue_kick_prepare_split(vq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(virtqueue_kick_prepare);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user