]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Jun 2014 00:37:20 +0000 (17:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Jun 2014 00:37:20 +0000 (17:37 -0700)
added patches:
drivers-hv-switch-to-use-mb-instead-of-smp_mb.patch

queue-3.4/drivers-hv-switch-to-use-mb-instead-of-smp_mb.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/drivers-hv-switch-to-use-mb-instead-of-smp_mb.patch b/queue-3.4/drivers-hv-switch-to-use-mb-instead-of-smp_mb.patch
new file mode 100644 (file)
index 0000000..d26a0b8
--- /dev/null
@@ -0,0 +1,61 @@
+From 35848f68b07df3f917cb13fc3c134718669f569b Mon Sep 17 00:00:00 2001
+From: Jason Wang <jasowang@redhat.com>
+Date: Tue, 18 Jun 2013 13:04:23 +0800
+Subject: drivers: hv: switch to use mb() instead of smp_mb()
+
+From: Jason Wang <jasowang@redhat.com>
+
+commit 35848f68b07df3f917cb13fc3c134718669f569b upstream.
+
+Even if guest were compiled without SMP support, it could not assume that host
+wasn't. So switch to use mb() instead of smp_mb() to force memory barriers for
+UP guest.
+
+Signed-off-by: Jason Wang <jasowang@redhat.com>
+Cc: Haiyang Zhang <haiyangz@microsoft.com>
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+[bwh: Backported to 3.2:
+ - Drop changes to functions that don't exist here
+ - hv_ringbuffer_write() has only a write memory barrier]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+[hq: Backported to 3.4:
+ - Add the change in hv_ringbuffer_read]
+Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
+
+---
+ drivers/hv/ring_buffer.c |    4 ++--
+ drivers/hv/vmbus_drv.c   |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/hv/ring_buffer.c
++++ b/drivers/hv/ring_buffer.c
+@@ -383,7 +383,7 @@ int hv_ringbuffer_write(struct hv_ring_b
+                                            sizeof(u64));
+       /* Make sure we flush all writes before updating the writeIndex */
+-      smp_wmb();
++      wmb();
+       /* Now, update the write location */
+       hv_set_next_write_location(outring_info, next_write_location);
+@@ -485,7 +485,7 @@ int hv_ringbuffer_read(struct hv_ring_bu
+       /* Make sure all reads are done before we update the read index since */
+       /* the writer may start writing to the read area once the read index */
+       /*is updated */
+-      smp_mb();
++      mb();
+       /* Update the read index */
+       hv_set_next_read_location(inring_info, next_read_location);
+--- a/drivers/hv/vmbus_drv.c
++++ b/drivers/hv/vmbus_drv.c
+@@ -466,7 +466,7 @@ static void vmbus_on_msg_dpc(unsigned lo
+                * will not deliver any more messages since there is
+                * no empty slot
+                */
+-              smp_mb();
++              mb();
+               if (msg->header.message_flags.msg_pending) {
+                       /*
index 35dda3a74d4df11ce25f4bb3f5ea7d4a35ed7085..e39513a964ed84d5d5b1974a72af9f3c363b3a07 100644 (file)
@@ -154,3 +154,4 @@ x86-efi-implement-efi_no_storage_paranoia-parameter.patch
 modify-uefi-anti-bricking-code.patch
 x86-efi-fix-dummy-variable-buffer-allocation.patch
 nbd-fsync-and-kill-block-device-on-shutdown.patch
+drivers-hv-switch-to-use-mb-instead-of-smp_mb.patch