aboutsummaryrefslogtreecommitdiffstats
path: root/libc/kernel/uapi/linux/virtio_ring.h
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2016-02-04 13:16:38 -0800
committerChristopher Ferris <cferris@google.com>2016-02-05 16:03:55 -0800
commit05d08e9716b5974d6ed08973f44930804890b902 (patch)
treee3a33c02c6a918c04d30d93a315bf5b90b6cb512 /libc/kernel/uapi/linux/virtio_ring.h
parentd2be3802582e69bfaf1a8ab02849bc44c4fa2ce6 (diff)
downloadandroid_bionic-05d08e9716b5974d6ed08973f44930804890b902.tar.gz
android_bionic-05d08e9716b5974d6ed08973f44930804890b902.tar.bz2
android_bionic-05d08e9716b5974d6ed08973f44930804890b902.zip
Updated to v4.4.1 kernel headers.
Small modifications needed to allow compilation with the new headers: - Manually modify bionic/libc/kernel/uapi/asm-mips/asm/siginfo.h to remove the uapi from the include. - PR_XXX defines are now available for mips, so remove the definition from linker_mips.cpp. Bug: 23789423 Change-Id: I6dc8a03b012426d3a937db15cb24d3a50fab5a8c
Diffstat (limited to 'libc/kernel/uapi/linux/virtio_ring.h')
-rw-r--r--libc/kernel/uapi/linux/virtio_ring.h39
1 files changed, 23 insertions, 16 deletions
diff --git a/libc/kernel/uapi/linux/virtio_ring.h b/libc/kernel/uapi/linux/virtio_ring.h
index a17187408..3e85e1049 100644
--- a/libc/kernel/uapi/linux/virtio_ring.h
+++ b/libc/kernel/uapi/linux/virtio_ring.h
@@ -18,49 +18,56 @@
****************************************************************************/
#ifndef _UAPI_LINUX_VIRTIO_RING_H
#define _UAPI_LINUX_VIRTIO_RING_H
+#include <stdint.h>
#include <linux/types.h>
-#define VRING_DESC_F_NEXT 1
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#include <linux/virtio_types.h>
+#define VRING_DESC_F_NEXT 1
#define VRING_DESC_F_WRITE 2
#define VRING_DESC_F_INDIRECT 4
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define VRING_USED_F_NO_NOTIFY 1
#define VRING_AVAIL_F_NO_INTERRUPT 1
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define VIRTIO_RING_F_INDIRECT_DESC 28
#define VIRTIO_RING_F_EVENT_IDX 29
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct vring_desc {
- __u64 addr;
+ __virtio64 addr;
+ __virtio32 len;
+ __virtio16 flags;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- __u32 len;
- __u16 flags;
- __u16 next;
+ __virtio16 next;
};
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct vring_avail {
- __u16 flags;
- __u16 idx;
- __u16 ring[];
+ __virtio16 flags;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __virtio16 idx;
+ __virtio16 ring[];
};
struct vring_used_elem {
- __u32 id;
- __u32 len;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __virtio32 id;
+ __virtio32 len;
};
struct vring_used {
- __u16 flags;
- __u16 idx;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ __virtio16 flags;
+ __virtio16 idx;
struct vring_used_elem ring[];
};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct vring {
unsigned int num;
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct vring_desc * desc;
struct vring_avail * avail;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct vring_used * used;
};
+#define VRING_AVAIL_ALIGN_SIZE 2
+#define VRING_USED_ALIGN_SIZE 4
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define VRING_DESC_ALIGN_SIZE 16
#define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
-#define vring_avail_event(vr) (* (__u16 *) & (vr)->used->ring[(vr)->num])
+#define vring_avail_event(vr) (* (__virtio16 *) & (vr)->used->ring[(vr)->num])
#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */