Michael S. Tsirkin
2014-Oct-22 18:44 UTC
[PATCH RFC v3 06/16] virtio: make endian-ness depend on virtio 1.0
virtio 1.0 is LE, virtio without 1.0 is native endian. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 7d46280..be0f6dd 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -157,11 +157,11 @@ int virtqueue_set_affinity(struct virtqueue *vq, int cpu) #define DEFINE_VIRTIO_XX_TO_CPU(bits) \ static inline u##bits virtio##bits##_to_cpu(struct virtio_device *vdev, __virtio##bits val) \ { \ - return __virtio##bits##_to_cpu(false, val); \ + return __virtio##bits##_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); \ } \ static inline __virtio##bits cpu_to_virtio##bits(struct virtio_device *vdev, u##bits val) \ { \ - return __cpu_to_virtio##bits(false, val); \ + return __cpu_to_virtio##bits(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); \ } DEFINE_VIRTIO_XX_TO_CPU(16) -- MST
Cornelia Huck
2014-Oct-23 12:06 UTC
[PATCH RFC v3 06/16] virtio: make endian-ness depend on virtio 1.0
On Wed, 22 Oct 2014 21:44:34 +0300 "Michael S. Tsirkin" <mst at redhat.com> wrote:> virtio 1.0 is LE, virtio without 1.0 is native endian. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > include/linux/virtio_config.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >Looks sane.
Seemingly Similar Threads
- [PATCH RFC v2 06/16] virtio: make endian-ness depend on virtio 1.0
- [PATCH RFC v3 06/16] virtio: make endian-ness depend on virtio 1.0
- [PATCH RFC v2 06/16] virtio: make endian-ness depend on virtio 1.0
- [PATCH RFC v4 06/17] virtio: make endian-ness depend on virtio 1.0
- [PATCH RFC v4 06/17] virtio: make endian-ness depend on virtio 1.0