Skip to content

Commit d83c67c

Browse files
committed
virtio-iommu: convert to LE accessors
Virtio iommu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 99e0d04 commit d83c67c

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

drivers/iommu/virtio-iommu.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,8 +1010,8 @@ static int viommu_probe(struct virtio_device *vdev)
10101010
if (ret)
10111011
return ret;
10121012

1013-
virtio_cread(vdev, struct virtio_iommu_config, page_size_mask,
1014-
&viommu->pgsize_bitmap);
1013+
virtio_cread_le(vdev, struct virtio_iommu_config, page_size_mask,
1014+
&viommu->pgsize_bitmap);
10151015

10161016
if (!viommu->pgsize_bitmap) {
10171017
ret = -EINVAL;
@@ -1022,25 +1022,25 @@ static int viommu_probe(struct virtio_device *vdev)
10221022
viommu->last_domain = ~0U;
10231023

10241024
/* Optional features */
1025-
virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE,
1026-
struct virtio_iommu_config, input_range.start,
1027-
&input_start);
1025+
virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE,
1026+
struct virtio_iommu_config, input_range.start,
1027+
&input_start);
10281028

1029-
virtio_cread_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE,
1030-
struct virtio_iommu_config, input_range.end,
1031-
&input_end);
1029+
virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_INPUT_RANGE,
1030+
struct virtio_iommu_config, input_range.end,
1031+
&input_end);
10321032

1033-
virtio_cread_feature(vdev, VIRTIO_IOMMU_F_DOMAIN_RANGE,
1034-
struct virtio_iommu_config, domain_range.start,
1035-
&viommu->first_domain);
1033+
virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_DOMAIN_RANGE,
1034+
struct virtio_iommu_config, domain_range.start,
1035+
&viommu->first_domain);
10361036

1037-
virtio_cread_feature(vdev, VIRTIO_IOMMU_F_DOMAIN_RANGE,
1038-
struct virtio_iommu_config, domain_range.end,
1039-
&viommu->last_domain);
1037+
virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_DOMAIN_RANGE,
1038+
struct virtio_iommu_config, domain_range.end,
1039+
&viommu->last_domain);
10401040

1041-
virtio_cread_feature(vdev, VIRTIO_IOMMU_F_PROBE,
1042-
struct virtio_iommu_config, probe_size,
1043-
&viommu->probe_size);
1041+
virtio_cread_le_feature(vdev, VIRTIO_IOMMU_F_PROBE,
1042+
struct virtio_iommu_config, probe_size,
1043+
&viommu->probe_size);
10441044

10451045
viommu->geometry = (struct iommu_domain_geometry) {
10461046
.aperture_start = input_start,

0 commit comments

Comments
 (0)