X-Git-Url: https://git.subgeniuskitty.com/xeon-phi-kernel-module/.git/blobdiff_plain/800f879a77716ad833d229ccc058e700c698b039..db10dc009b1dea6ccb377d4ecd2d0ecbb5548865:/host/vhost/vhost.h diff --git a/host/vhost/vhost.h b/host/vhost/vhost.h index 9bb1653..0b7fcc1 100644 --- a/host/vhost/vhost.h +++ b/host/vhost/vhost.h @@ -32,23 +32,23 @@ struct vhost_work; typedef void (*vhost_work_fn_t)(struct vhost_work *work); struct vhost_work { - struct list_head node; - vhost_work_fn_t fn; - wait_queue_head_t done; - int flushing; - unsigned queue_seq; - unsigned done_seq; + struct list_head node; + vhost_work_fn_t fn; + wait_queue_head_t done; + int flushing; + unsigned queue_seq; + unsigned done_seq; }; /* Poll a file (eventfd or socket) */ /* Note: there's nothing vhost specific about this structure. */ struct vhost_poll { - poll_table table; - wait_queue_head_t *wqh; - wait_queue_t wait; - struct vhost_work work; - unsigned long mask; - struct vhost_dev *dev; + poll_table table; + wait_queue_head_t *wqh; + wait_queue_entry_t wait; + struct vhost_work work; + unsigned long mask; + struct vhost_dev *dev; }; void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, @@ -206,20 +206,9 @@ int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); } while (0) #ifndef __rcu_dereference_index_check -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)) #define __rcu_dereference_index_check(p, c) \ ({ \ - typeof(p) _________p1 = ACCESS_ONCE(p); \ - rcu_lockdep_assert(c, \ - "suspicious rcu_dereference_index_check()" \ - " usage"); \ - smp_read_barrier_depends(); \ - (_________p1); \ - }) -#else -#define __rcu_dereference_index_check(p, c) \ - ({ \ - typeof(p) _________p1 = ACCESS_ONCE(p); \ + typeof(p) _________p1 = READ_ONCE(p); \ RCU_LOCKDEP_WARN(c, \ "suspicious rcu_dereference_index_check()" \ " usage"); \ @@ -227,7 +216,6 @@ int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); (_________p1); \ }) #endif -#endif enum { VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) |