]> git.proxmox.com Git - qemu.git/commitdiff
s390: Drop set_bit usage in virtio_ccw.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 29 Jan 2013 15:33:04 +0000 (16:33 +0100)
committerAlexander Graf <agraf@suse.de>
Tue, 29 Jan 2013 20:50:05 +0000 (21:50 +0100)
set_bit on indicators doesn't go well on 32 bit targets:

note: expected 'long unsigned int *' but argument is of type 'uint64_t *'

Switch to bit shifts instead.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
[agraf: use 1ULL instead]
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/s390x/virtio-ccw.c

index 7d7f33637fc5d3b2737241b55a012e939c13e2d9..231f81e48cc66968c945a76b60377f799098abd9 100644 (file)
@@ -662,12 +662,12 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector)
 
     if (vector < VIRTIO_PCI_QUEUE_MAX) {
         indicators = ldq_phys(dev->indicators);
-        set_bit(vector, &indicators);
+        indicators |= 1ULL << vector;
         stq_phys(dev->indicators, indicators);
     } else {
         vector = 0;
         indicators = ldq_phys(dev->indicators2);
-        set_bit(vector, &indicators);
+        indicators |= 1ULL << vector;
         stq_phys(dev->indicators2, indicators);
     }