Skip to content

Commit 24b6842

Browse files
committed
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: Michael S. Tsirkin <mst@redhat.com>
1 parent 321bd21 commit 24b6842

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/gpu/drm/virtio/virtgpu_object.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
141141
struct virtio_gpu_mem_entry **ents,
142142
unsigned int *nents)
143143
{
144-
bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev);
144+
bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
145145
struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
146146
struct scatterlist *sg;
147147
int si, ret;

‎drivers/gpu/drm/virtio/virtgpu_vq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev,
599599
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]);
600600
struct virtio_gpu_transfer_to_host_2d *cmd_p;
601601
struct virtio_gpu_vbuffer *vbuf;
602-
bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev);
602+
bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
603603
struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
604604

605605
if (use_dma_api)
@@ -1015,7 +1015,7 @@ void virtio_gpu_cmd_transfer_to_host_3d(struct virtio_gpu_device *vgdev,
10151015
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(objs->objs[0]);
10161016
struct virtio_gpu_transfer_host_3d *cmd_p;
10171017
struct virtio_gpu_vbuffer *vbuf;
1018-
bool use_dma_api = !virtio_has_iommu_quirk(vgdev->vdev);
1018+
bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
10191019
struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
10201020

10211021
if (use_dma_api)

‎drivers/virtio/virtio_ring.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static inline bool virtqueue_use_indirect(struct virtqueue *_vq,
240240

241241
static bool vring_use_dma_api(struct virtio_device *vdev)
242242
{
243-
if (!virtio_has_iommu_quirk(vdev))
243+
if (!virtio_has_dma_quirk(vdev))
244244
return true;
245245

246246
/* Otherwise, we are left to guess. */

‎include/linux/virtio_config.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
162162
}
163163

164164
/**
165-
* virtio_has_iommu_quirk - determine whether this device has the iommu quirk
165+
* virtio_has_dma_quirk - determine whether this device has the DMA quirk
166166
* @vdev: the device
167167
*/
168-
static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev)
168+
static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
169169
{
170170
/*
171171
* Note the reverse polarity of the quirk feature (compared to most

‎tools/virtio/linux/virtio_config.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ static inline void __virtio_clear_bit(struct virtio_device *vdev,
4242
(__virtio_test_bit((dev), feature))
4343

4444
/**
45-
* virtio_has_iommu_quirk - determine whether this device has the iommu quirk
45+
* virtio_has_dma_quirk - determine whether this device has the DMA quirk
4646
* @vdev: the device
4747
*/
48-
static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev)
48+
static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
4949
{
5050
/*
5151
* Note the reverse polarity of the quirk feature (compared to most

0 commit comments

Comments
 (0)