aboutsummaryrefslogtreecommitdiff
path: root/include/standard-headers/linux/virtio_ring.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-09-09 14:50:17 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-16 17:33:32 +0200
commit120758fba4c52d1ccf3a8ae1fe3b7495f2b584d8 (patch)
tree261ad17b6b247ee7b16331a43530af89121394bc /include/standard-headers/linux/virtio_ring.h
parent84090bbce91a386ae6e5f61b26f36783196712d2 (diff)
update Linux headers to 4.3-rc1
The update to 4.2 was reviewed by Michael S. Tsirkin and Cornelia Huck. The further update to 4.3-rc1 only touches KVM files. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/standard-headers/linux/virtio_ring.h')
-rw-r--r--include/standard-headers/linux/virtio_ring.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/standard-headers/linux/virtio_ring.h b/include/standard-headers/linux/virtio_ring.h
index 6fe276fafb..023c6db041 100644
--- a/include/standard-headers/linux/virtio_ring.h
+++ b/include/standard-headers/linux/virtio_ring.h
@@ -31,6 +31,7 @@
* SUCH DAMAGE.
*
* Copyright Rusty Russell IBM Corporation 2007. */
+#include <stdint.h>
#include "standard-headers/linux/types.h"
#include "standard-headers/linux/virtio_types.h"
@@ -143,7 +144,7 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p,
vr->num = num;
vr->desc = p;
vr->avail = p + num*sizeof(struct vring_desc);
- vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__virtio16)
+ vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16)
+ align-1) & ~(align - 1));
}