svn commit: r360789 - head/sys/dev/virtio/mmio
Jessica Clarke
jrtc27 at FreeBSD.org
Thu May 7 17:59:18 UTC 2020
Author: jrtc27
Date: Thu May 7 17:59:17 2020
New Revision: 360789
URL: https://svnweb.freebsd.org/changeset/base/360789
Log:
virtio_mmio: Add casts missing from r360722
This fixes -Wshift-count-overflow warnings/errors on architectures using
32-bit physical addresses.
Reported by: lwhsu
Modified:
head/sys/dev/virtio/mmio/virtio_mmio.c
Modified: head/sys/dev/virtio/mmio/virtio_mmio.c
==============================================================================
--- head/sys/dev/virtio/mmio/virtio_mmio.c Thu May 7 17:58:07 2020 (r360788)
+++ head/sys/dev/virtio/mmio/virtio_mmio.c Thu May 7 17:59:17 2020 (r360789)
@@ -439,19 +439,19 @@ vtmmio_set_virtqueue(struct vtmmio_softc *sc, struct v
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_DESC_LOW,
paddr);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_DESC_HIGH,
- paddr >> 32);
+ ((uint64_t)paddr) >> 32);
paddr = virtqueue_avail_paddr(vq);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_AVAIL_LOW,
paddr);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_AVAIL_HIGH,
- paddr >> 32);
+ ((uint64_t)paddr) >> 32);
paddr = virtqueue_used_paddr(vq);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_USED_LOW,
paddr);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_USED_HIGH,
- paddr >> 32);
+ ((uint64_t)paddr) >> 32);
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_READY, 1);
}
More information about the svn-src-head
mailing list