virtio_ring: update weak barriers to use virt_xxx
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 27 Dec 2015 15:55:35 +0000 (17:55 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 12 Jan 2016 18:47:00 +0000 (20:47 +0200)
commita65961272e1ebdb60804bbe2bb440481fcbd1c76
treeb88a96970204049d3934e5e16b61ceb64862335e
parentd307fb16f788823b29aab9aa7e4821ac8a124b19
virtio_ring: update weak barriers to use virt_xxx

virtio ring uses smp_wmb on SMP and wmb on !SMP,
the reason for the later being that it might be
talking to another kernel on the same SMP machine.

This is exactly what virt_xxx barriers do,
so switch to these instead of homegrown ifdef hacks.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
include/linux/virtio_ring.h