summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-02-29 04:58:40 +0000
committersephe <sephe@FreeBSD.org>2016-02-29 04:58:40 +0000
commit77e3b4f157e3cdacd1a05938fff6478f8da56d35 (patch)
treefed0a85092cc95983abd67cde600a2ba0e0c1e72
parent42ad3cdf96a6615807695d4ea1124c7368acaa3e (diff)
downloadFreeBSD-src-77e3b4f157e3cdacd1a05938fff6478f8da56d35.zip
FreeBSD-src-77e3b4f157e3cdacd1a05938fff6478f8da56d35.tar.gz
hyperv: Use proper fence function to keep store-load order for msgs
sfence only makes sure about the store-store order, which is not sufficient here. Use atomic_thread_fence_seq_cst() as suggested jhb and kib (a locked op in the nutshell, which should have the Reviewed by: jhb, kib, Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5436
-rw-r--r--sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c b/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
index 8a1e412..4895f71 100644
--- a/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
+++ b/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
@@ -117,7 +117,7 @@ handled:
* not deliver any more messages
* since there is no empty slot
*/
- wmb();
+ atomic_thread_fence_seq_cst();
if (msg->header.message_flags.u.message_pending) {
/*
@@ -187,7 +187,7 @@ hv_vmbus_isr(struct trapframe *frame)
* not deliver any more messages
* since there is no empty slot
*/
- wmb();
+ atomic_thread_fence_seq_cst();
if (msg->header.message_flags.u.message_pending) {
/*
OpenPOWER on IntegriCloud