virtio_ring.c (bb478d8b167cf875565ac7d927ffbdc0b6d280e8) | virtio_ring.c (46f9c2b925ac12e5ad8b8b7c90c71dacc9d5db37) |
---|---|
1/* Virtio ring implementation. 2 * 3 * Copyright 2007 Rusty Russell IBM Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 67 unchanged lines hidden (view full) --- 76 unsigned int free_head; 77 /* Number we've added since last sync. */ 78 unsigned int num_added; 79 80 /* Last used index we've seen. */ 81 u16 last_used_idx; 82 83 /* How to notify other side. FIXME: commonalize hcalls! */ | 1/* Virtio ring implementation. 2 * 3 * Copyright 2007 Rusty Russell IBM Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 67 unchanged lines hidden (view full) --- 76 unsigned int free_head; 77 /* Number we've added since last sync. */ 78 unsigned int num_added; 79 80 /* Last used index we've seen. */ 81 u16 last_used_idx; 82 83 /* How to notify other side. FIXME: commonalize hcalls! */ |
84 void (*notify)(struct virtqueue *vq); | 84 bool (*notify)(struct virtqueue *vq); |
85 86#ifdef DEBUG 87 /* They're supposed to lock for us. */ 88 unsigned int in_use; 89 90 /* Figure out if their kicks are too delayed. */ 91 bool last_add_time_valid; 92 ktime_t last_add_time; --- 646 unchanged lines hidden (view full) --- 739EXPORT_SYMBOL_GPL(vring_interrupt); 740 741struct virtqueue *vring_new_virtqueue(unsigned int index, 742 unsigned int num, 743 unsigned int vring_align, 744 struct virtio_device *vdev, 745 bool weak_barriers, 746 void *pages, | 85 86#ifdef DEBUG 87 /* They're supposed to lock for us. */ 88 unsigned int in_use; 89 90 /* Figure out if their kicks are too delayed. */ 91 bool last_add_time_valid; 92 ktime_t last_add_time; --- 646 unchanged lines hidden (view full) --- 739EXPORT_SYMBOL_GPL(vring_interrupt); 740 741struct virtqueue *vring_new_virtqueue(unsigned int index, 742 unsigned int num, 743 unsigned int vring_align, 744 struct virtio_device *vdev, 745 bool weak_barriers, 746 void *pages, |
747 void (*notify)(struct virtqueue *), | 747 bool (*notify)(struct virtqueue *), |
748 void (*callback)(struct virtqueue *), 749 const char *name) 750{ 751 struct vring_virtqueue *vq; 752 unsigned int i; 753 754 /* We assume num is a power of 2. */ 755 if (num & (num - 1)) { --- 87 unchanged lines hidden --- | 748 void (*callback)(struct virtqueue *), 749 const char *name) 750{ 751 struct vring_virtqueue *vq; 752 unsigned int i; 753 754 /* We assume num is a power of 2. */ 755 if (num & (num - 1)) { --- 87 unchanged lines hidden --- |