diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-02-27 14:04:40 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-27 14:04:40 -0700 |
commit | 29f141fed01a09050207c4d41fc5811520d81146 (patch) | |
tree | c55a51dca4a0e4da9fdc2b904eefbde37d2a5b03 /drivers/virtio/virtio_ring.c | |
parent | 2261cc627f5453004042b4f694612edae27e492e (diff) | |
parent | 14cd3c15cfc8118586262a79bfa3b3123f13e2c2 (diff) |
Merge branch 'fixes-for-grant' of git://sources.calxeda.com/kernel/linux into devicetree/merge
Diffstat (limited to 'drivers/virtio/virtio_ring.c')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 79e1b292c03..5aa43c3392a 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -35,7 +35,7 @@ #define virtio_rmb(vq) \ do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0) #define virtio_wmb(vq) \ - do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0) + do { if ((vq)->weak_barriers) smp_wmb(); else wmb(); } while(0) #else /* We must force memory ordering even if guest is UP since host could be * running on another CPU, but SMP barriers are defined to barrier() in that @@ -308,9 +308,9 @@ bool virtqueue_kick_prepare(struct virtqueue *_vq) bool needs_kick; START_USE(vq); - /* Descriptors and available array need to be set before we expose the - * new available array entries. */ - virtio_wmb(vq); + /* We need to expose available array entries before checking avail + * event. */ + virtio_mb(vq); old = vq->vring.avail->idx - vq->num_added; new = vq->vring.avail->idx; |