diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-03-17 22:52:18 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-19 23:30:41 -0400 |
commit | 73640c991e2f2804939af70567b23e4c54b7c266 (patch) | |
tree | 40800f0b2ddd54ef17160879bada9d1e16a4ce01 /tools | |
parent | 29266e2e29f1f87b93321e56812f9fb16f91cb6d (diff) |
tools/virtio: fix build for 3.8
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtio/Makefile | 2 | ||||
-rw-r--r-- | tools/virtio/linux/virtio.h | 7 | ||||
-rw-r--r-- | tools/virtio/virtio_test.c | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile index d1d442ed106a..b48c4329e644 100644 --- a/tools/virtio/Makefile +++ b/tools/virtio/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | all: test mod | 1 | all: test mod |
2 | test: virtio_test | 2 | test: virtio_test |
3 | virtio_test: virtio_ring.o virtio_test.o | 3 | virtio_test: virtio_ring.o virtio_test.o |
4 | CFLAGS += -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -MMD | 4 | CFLAGS += -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD |
5 | vpath %.c ../../drivers/virtio | 5 | vpath %.c ../../drivers/virtio |
6 | mod: | 6 | mod: |
7 | ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test | 7 | ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test |
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h index 81847dd08bd0..390c4cb3b018 100644 --- a/tools/virtio/linux/virtio.h +++ b/tools/virtio/linux/virtio.h | |||
@@ -85,6 +85,8 @@ typedef __u16 u16; | |||
85 | typedef enum { | 85 | typedef enum { |
86 | GFP_KERNEL, | 86 | GFP_KERNEL, |
87 | GFP_ATOMIC, | 87 | GFP_ATOMIC, |
88 | __GFP_HIGHMEM, | ||
89 | __GFP_HIGH | ||
88 | } gfp_t; | 90 | } gfp_t; |
89 | typedef enum { | 91 | typedef enum { |
90 | IRQ_NONE, | 92 | IRQ_NONE, |
@@ -163,6 +165,8 @@ struct virtqueue { | |||
163 | void (*callback)(struct virtqueue *vq); | 165 | void (*callback)(struct virtqueue *vq); |
164 | const char *name; | 166 | const char *name; |
165 | struct virtio_device *vdev; | 167 | struct virtio_device *vdev; |
168 | unsigned int index; | ||
169 | unsigned int num_free; | ||
166 | void *priv; | 170 | void *priv; |
167 | }; | 171 | }; |
168 | 172 | ||
@@ -206,7 +210,8 @@ bool virtqueue_enable_cb(struct virtqueue *vq); | |||
206 | bool virtqueue_enable_cb_delayed(struct virtqueue *vq); | 210 | bool virtqueue_enable_cb_delayed(struct virtqueue *vq); |
207 | 211 | ||
208 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); | 212 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); |
209 | struct virtqueue *vring_new_virtqueue(unsigned int num, | 213 | struct virtqueue *vring_new_virtqueue(unsigned int index, |
214 | unsigned int num, | ||
210 | unsigned int vring_align, | 215 | unsigned int vring_align, |
211 | struct virtio_device *vdev, | 216 | struct virtio_device *vdev, |
212 | bool weak_barriers, | 217 | bool weak_barriers, |
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index fcc9aa25fd08..faf3f0c9d71f 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c | |||
@@ -92,7 +92,8 @@ static void vq_info_add(struct vdev_info *dev, int num) | |||
92 | assert(r >= 0); | 92 | assert(r >= 0); |
93 | memset(info->ring, 0, vring_size(num, 4096)); | 93 | memset(info->ring, 0, vring_size(num, 4096)); |
94 | vring_init(&info->vring, num, info->ring, 4096); | 94 | vring_init(&info->vring, num, info->ring, 4096); |
95 | info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, | 95 | info->vq = vring_new_virtqueue(info->idx, |
96 | info->vring.num, 4096, &dev->vdev, | ||
96 | true, info->ring, | 97 | true, info->ring, |
97 | vq_notify, vq_callback, "test"); | 98 | vq_notify, vq_callback, "test"); |
98 | assert(info->vq); | 99 | assert(info->vq); |