12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h
- index 8e50888..67e06fe 100644
- --- a/include/linux/virtio_ring.h
- +++ b/include/linux/virtio_ring.h
- @@ -21,20 +21,19 @@
- * 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)
- - dma_rmb();
- + smp_rmb();
- else
- rmb();
- }
- @@ -42,10 +41,26 @@ static inline void virtio_rmb(bool weak_barriers)
- static inline void virtio_wmb(bool weak_barriers)
- {
- if (weak_barriers)
- - dma_wmb();
- + smp_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;
|