diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-04-19 19:29:41 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-06-07 19:54:23 +0200 |
commit | 55e49dc43a835b19567e62142cb1c87dc7db7b3c (patch) | |
tree | b89327c3415a0b789c2532a8df9a938231d1c420 /include | |
parent | Linux 4.17 (diff) | |
download | linux-55e49dc43a835b19567e62142cb1c87dc7db7b3c.tar.xz linux-55e49dc43a835b19567e62142cb1c87dc7db7b3c.zip |
virtio_ring: switch to dma_XX barriers for rpmsg
virtio is using barriers to order memory accesses, thus
dma_wmb/rmb is a good match.
Before
[mst@tuck linux]$ size drivers/virtio/virtio_ring.o
text data bss dec hex filename
11392 820 0 12212 2fb4 drivers/virtio/virtio_ring.o
After
mst@tuck linux]$ size drivers/virtio/virtio_ring.o
text data bss dec hex filename
11284 820 0 12104 2f48 drivers/virtio/virtio_ring.o
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-remoteproc@vger.kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/virtio_ring.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index bbf32524ab27..fab02133a919 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h @@ -35,7 +35,7 @@ static inline void virtio_rmb(bool weak_barriers) if (weak_barriers) virt_rmb(); else - rmb(); + dma_rmb(); } static inline void virtio_wmb(bool weak_barriers) @@ -43,7 +43,7 @@ static inline void virtio_wmb(bool weak_barriers) if (weak_barriers) virt_wmb(); else - wmb(); + dma_wmb(); } static inline void virtio_store_mb(bool weak_barriers, |