Commit 24b6842a authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirk

Now that the corresponding feature bit has been renamed,
rename the quirk too - it's about special ways to
do DMA, not necessarily about the IOMMU.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 321bd212
...@@ -141,7 +141,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev, ...@@ -141,7 +141,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
struct virtio_gpu_mem_entry **ents, struct virtio_gpu_mem_entry **ents,
unsigned int *nents) unsigned int *nents)
{ {
bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev); bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
struct scatterlist *sg; struct scatterlist *sg;
int si, ret; int si, ret;
......
...@@ -599,7 +599,7 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, ...@@ -599,7 +599,7 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev,
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]); struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]);
struct virtio_gpu_transfer_to_host_2d *cmd_p; struct virtio_gpu_transfer_to_host_2d *cmd_p;
struct virtio_gpu_vbuffer *vbuf; struct virtio_gpu_vbuffer *vbuf;
bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev); bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
if (use_dma_api) if (use_dma_api)
...@@ -1015,7 +1015,7 @@ void virtio_gpu_cmd_transfer_to_host_3d(struct virtio_gpu_device *vgdev, ...@@ -1015,7 +1015,7 @@ void virtio_gpu_cmd_transfer_to_host_3d(struct virtio_gpu_device *vgdev,
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]); struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]);
struct virtio_gpu_transfer_host_3d *cmd_p; struct virtio_gpu_transfer_host_3d *cmd_p;
struct virtio_gpu_vbuffer *vbuf; struct virtio_gpu_vbuffer *vbuf;
bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev); bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
if (use_dma_api) if (use_dma_api)
......
...@@ -240,7 +240,7 @@ static inline bool virtqueue_use_indirect(struct virtqueue *_vq, ...@@ -240,7 +240,7 @@ static inline bool virtqueue_use_indirect(struct virtqueue *_vq,
static bool vring_use_dma_api(struct virtio_device *vdev) static bool vring_use_dma_api(struct virtio_device *vdev)
{ {
if (!virtio_has_iommu_quirk(vdev)) if (!virtio_has_dma_quirk(vdev))
return true; return true;
/* Otherwise, we are left to guess. */ /* Otherwise, we are left to guess. */
......
...@@ -162,10 +162,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, ...@@ -162,10 +162,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
} }
/** /**
* virtio_has_iommu_quirk - determine whether this device has the iommu quirk * virtio_has_dma_quirk - determine whether this device has the DMA quirk
* @vdev: the device * @vdev: the device
*/ */
static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev) static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
{ {
/* /*
* Note the reverse polarity of the quirk feature (compared to most * Note the reverse polarity of the quirk feature (compared to most
......
...@@ -42,10 +42,10 @@ static inline void __virtio_clear_bit(struct virtio_device *vdev, ...@@ -42,10 +42,10 @@ static inline void __virtio_clear_bit(struct virtio_device *vdev,
(__virtio_test_bit((dev), feature)) (__virtio_test_bit((dev), feature))
/** /**
* virtio_has_iommu_quirk - determine whether this device has the iommu quirk * virtio_has_dma_quirk - determine whether this device has the DMA quirk
* @vdev: the device * @vdev: the device
*/ */
static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev) static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
{ {
/* /*
* Note the reverse polarity of the quirk feature (compared to most * Note the reverse polarity of the quirk feature (compared to most
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment