diff options
author | Zoltan Herpai <wigyori@uid0.hu> | 2016-08-17 19:15:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 19:15:35 +0200 |
commit | ac0b5e87020112dd575fff82b566cbed98eb5457 (patch) | |
tree | 8943cbcedd413a67f9eaae166c206b91a1fe1bf9 /target/linux/generic | |
parent | fd32782491007b33fb877327b647e3b273aecfce (diff) | |
parent | cd91ba788bddf420fbe2d85d75016c2f22cf8580 (diff) | |
download | master-187ad058-ac0b5e87020112dd575fff82b566cbed98eb5457.tar.gz master-187ad058-ac0b5e87020112dd575fff82b566cbed98eb5457.tar.bz2 master-187ad058-ac0b5e87020112dd575fff82b566cbed98eb5457.zip |
Merge pull request #58 from wigyori/master
Backport virtio_ring patches to fix realview, fix bcm53xx build
Diffstat (limited to 'target/linux/generic')
-rw-r--r-- | target/linux/generic/patches-4.4/150-virtio-revert_dma_wmb_rmb_weak_barriers.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.4/150-virtio-revert_dma_wmb_rmb_weak_barriers.patch b/target/linux/generic/patches-4.4/150-virtio-revert_dma_wmb_rmb_weak_barriers.patch new file mode 100644 index 0000000000..0abbefa44d --- /dev/null +++ b/target/linux/generic/patches-4.4/150-virtio-revert_dma_wmb_rmb_weak_barriers.patch @@ -0,0 +1,55 @@ +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; |