svn commit: r296180 - head/sys/dev/hyperv/vmbus

Sepherosa Ziehau sephe at FreeBSD.org
Mon Feb 29 04:58:42 UTC 2016


Author: sephe
Date: Mon Feb 29 04:58:40 2016
New Revision: 296180
URL: https://svnweb.freebsd.org/changeset/base/296180

Log:
  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

Modified:
  head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c

Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c	Mon Feb 29 04:50:24 2016	(r296179)
+++ head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c	Mon Feb 29 04:58:40 2016	(r296180)
@@ -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) {
 			/*


More information about the svn-src-head mailing list