virtio_mmio: Add casts missing from r360722

This fixes -Wshift-count-overflow warnings/errors on architectures using
32-bit physical addresses.

Reported by:	lwhsu
This commit is contained in:
Jessica Clarke 2020-05-07 17:59:17 +00:00
parent f57d153e2e
commit cfe6a221ad

View File

@ -439,19 +439,19 @@ vtmmio_set_virtqueue(struct vtmmio_softc *sc, struct virtqueue *vq,
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);
}