[SLOF] [PATCH v1 22/27] virtio: change signature of virtio_set_qaddr
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Jan 13 22:17:09 AEDT 2016
Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
---
lib/libvirtio/virtio.c | 4 ++--
lib/libvirtio/virtio.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/libvirtio/virtio.c b/lib/libvirtio/virtio.c
index e1ab97f..e073c8b 100644
--- a/lib/libvirtio/virtio.c
+++ b/lib/libvirtio/virtio.c
@@ -358,7 +358,7 @@ void virtio_queue_notify(struct virtio_device *dev, int queue)
/**
* Set queue address
*/
-void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned int qaddr)
+void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned long qaddr)
{
if (dev->type != VIRTIO_TYPE_PCI)
return;
@@ -375,7 +375,7 @@ void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned int qaddr)
virtio_write64(dev->common.addr + offset_of(struct virtio_dev_common, q_used), q_used);
ci_write_16(dev->common.addr + offset_of(struct virtio_dev_common, q_enable), cpu_to_le16(1));
} else {
- uint32_t val = qaddr;
+ uint32_t val = (uint32_t)qaddr;
val = val >> 12;
ci_write_16(dev->base+VIRTIOHDR_QUEUE_SELECT,
cpu_to_le16(queue));
diff --git a/lib/libvirtio/virtio.h b/lib/libvirtio/virtio.h
index afa3c9c..f5f6a15 100644
--- a/lib/libvirtio/virtio.h
+++ b/lib/libvirtio/virtio.h
@@ -122,7 +122,7 @@ extern void virtio_setup_device(struct virtio_device *dev);
extern void virtio_reset_device(struct virtio_device *dev);
extern void virtio_queue_notify(struct virtio_device *dev, int queue);
extern void virtio_set_status(struct virtio_device *dev, int status);
-extern void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned int qaddr);
+extern void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned long qaddr);
extern void virtio_set_guest_features(struct virtio_device *dev, int features);
extern void virtio_get_host_features(struct virtio_device *dev, int *features);
extern void virtio_set_guest_features_long(struct virtio_device *dev, uint64_t features);
--
2.5.0
More information about the SLOF
mailing list