aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZoltan Herpai <wigyori@uid0.hu>2016-08-17 19:15:35 +0200
committerGitHub <noreply@github.com>2016-08-17 19:15:35 +0200
commitac0b5e87020112dd575fff82b566cbed98eb5457 (patch)
tree8943cbcedd413a67f9eaae166c206b91a1fe1bf9
parentfd32782491007b33fb877327b647e3b273aecfce (diff)
parentcd91ba788bddf420fbe2d85d75016c2f22cf8580 (diff)
downloadmaster-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
-rw-r--r--target/linux/bcm53xx/image/Makefile2
-rw-r--r--target/linux/generic/patches-4.4/150-virtio-revert_dma_wmb_rmb_weak_barriers.patch55
2 files changed, 55 insertions, 2 deletions
diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index e067d4da5c..a11b0d102c 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -17,8 +17,6 @@ define Image/Prepare
# For UBI we want only one extra block
rm -f $(KDIR)/ubi_mark
echo -ne '\xde\xad\xc0\xde' > $(KDIR)/ubi_mark
-
- $(CP) ./ubinize.cfg $(KDIR)
endef
define Build/append-dtb
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;