virtio: fix typos of memory barriers
Note: this fixes a bug introduced recently in
7b21e34fd1
.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Rusty Russell
parent
74ea15d909
commit
4dbc5d9f4f
@@ -35,7 +35,7 @@
|
|||||||
#define virtio_rmb(vq) \
|
#define virtio_rmb(vq) \
|
||||||
do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
|
do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
|
||||||
#define virtio_wmb(vq) \
|
#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
|
#else
|
||||||
/* We must force memory ordering even if guest is UP since host could be
|
/* 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
|
* running on another CPU, but SMP barriers are defined to barrier() in that
|
||||||
|
Reference in New Issue
Block a user