svn commit: r301914 - stable/10/sys/dev/hyperv/vmbus
Sepherosa Ziehau
sephe at FreeBSD.org
Wed Jun 15 05:31:37 UTC 2016
Author: sephe
Date: Wed Jun 15 05:31:35 2016
New Revision: 301914
URL: https://svnweb.freebsd.org/changeset/base/301914
Log:
MFC 296180,297634
296180
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
297634
hyperv: Use mb() instead of atomic_thread_fence_seq_cst()
Since atomic_thread_fence_seq_cst() will become compiler fence on UP kernel.
Reviewed by: kib, Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5852
Modified:
stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
==============================================================================
--- stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed Jun 15 05:16:37 2016 (r301913)
+++ stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed Jun 15 05:31:35 2016 (r301914)
@@ -116,8 +116,12 @@ handled:
* message_pending and EOMing. Otherwise, the EOMing will
* not deliver any more messages
* since there is no empty slot
+ *
+ * NOTE:
+ * mb() is used here, since atomic_thread_fence_seq_cst()
+ * will become compler fence on UP kernel.
*/
- wmb();
+ mb();
if (msg->header.message_flags.u.message_pending) {
/*
@@ -186,8 +190,12 @@ hv_vmbus_isr(struct trapframe *frame)
* message_pending and EOMing. Otherwise, the EOMing will
* not deliver any more messages
* since there is no empty slot
+ *
+ * NOTE:
+ * mb() is used here, since atomic_thread_fence_seq_cst()
+ * will become compler fence on UP kernel.
*/
- wmb();
+ mb();
if (msg->header.message_flags.u.message_pending) {
/*
More information about the svn-src-stable-10
mailing list