Author: grehan
Date: Thu Sep 13 00:36:46 2012
New Revision: 240427
URL: http://svn.freebsd.org/changeset/base/240427
Log:
Relax requirement of certain mb()s
Submitted by: Bryan Venteicher bryanv at daemoninthecloset org
Modified:
head/sys/dev/virtio/virtqueue.c
Modified: head/sys/dev/virtio/virtqueue.c
==============================================================================
--- head/sys/dev/virtio/virtqueue.c Wed Sep 12 22:54:11 2012
(r240426)
+++ head/sys/dev/virtio/virtqueue.c Thu Sep 13 00:36:46 2012
(r240427)
@@ -525,7 +525,7 @@ virtqueue_dequeue(struct virtqueue *vq,
used_idx = vq->vq_used_cons_idx++ & (vq->vq_nentries - 1);
uep = &vq->vq_ring.used->ring[used_idx];
- mb();
+ rmb();
desc_idx = (uint16_t) uep->id;
if (len != NULL)
*len = uep->len;
@@ -623,7 +623,7 @@ vq_ring_update_avail(struct virtqueue *v
avail_idx = vq->vq_ring.avail->idx & (vq->vq_nentries - 1);
vq->vq_ring.avail->ring[avail_idx] = desc_idx;
- mb();
+ wmb();
vq->vq_ring.avail->idx++;
/* Keep pending count until virtqueue_notify(). */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"