Merge tag 'pci-v4.1-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[linux-2.6-block.git] / include / linux / virtio_ring.h
index 67e06fe18c03b6814e217f05134cdb68a5df13bc..8e50888a6d595af06221ee43dfc2d0e4aa91c18e 100644 (file)
  * actually quite cheap.
  */
 
-#ifdef CONFIG_SMP
 static inline void virtio_mb(bool weak_barriers)
 {
+#ifdef CONFIG_SMP
        if (weak_barriers)
                smp_mb();
        else
+#endif
                mb();
 }
 
 static inline void virtio_rmb(bool weak_barriers)
 {
        if (weak_barriers)
-               smp_rmb();
+               dma_rmb();
        else
                rmb();
 }
@@ -41,26 +42,10 @@ static inline void virtio_rmb(bool weak_barriers)
 static inline void virtio_wmb(bool weak_barriers)
 {
        if (weak_barriers)
-               smp_wmb();
+               dma_wmb();
        else
                wmb();
 }
-#else
-static inline void virtio_mb(bool weak_barriers)
-{
-       mb();
-}
-
-static inline void virtio_rmb(bool weak_barriers)
-{
-       rmb();
-}
-
-static inline void virtio_wmb(bool weak_barriers)
-{
-       wmb();
-}
-#endif
 
 struct virtio_device;
 struct virtqueue;