mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
virtio: use KVM_S390_VIRTIO_RING_ALIGN instead of relying on pagesize
This doesn't really matter, since s390 pagesize is 4k anyway. Signed-off-by: Rusty Russell <[email protected]> Acked-by: Christian Borntraeger <[email protected]>
This commit is contained in:
parent
2966af73e7
commit
db40598863
2 changed files with 10 additions and 3 deletions
|
|
@ -188,7 +188,8 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
|
|||
config = kvm_vq_config(kdev->desc)+index;
|
||||
|
||||
err = vmem_add_mapping(config->address,
|
||||
vring_size(config->num, PAGE_SIZE));
|
||||
vring_size(config->num,
|
||||
KVM_S390_VIRTIO_RING_ALIGN));
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
@ -209,7 +210,8 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
|
|||
return vq;
|
||||
unmap:
|
||||
vmem_remove_mapping(config->address,
|
||||
vring_size(config->num, PAGE_SIZE));
|
||||
vring_size(config->num,
|
||||
KVM_S390_VIRTIO_RING_ALIGN));
|
||||
out:
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
|
@ -220,7 +222,8 @@ static void kvm_del_vq(struct virtqueue *vq)
|
|||
|
||||
vring_del_virtqueue(vq);
|
||||
vmem_remove_mapping(config->address,
|
||||
vring_size(config->num, PAGE_SIZE));
|
||||
vring_size(config->num,
|
||||
KVM_S390_VIRTIO_RING_ALIGN));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue