Date: Mon, 29 Feb 2016 04:58:40 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296180 - head/sys/dev/hyperv/vmbus Message-ID: <201602290458.u1T4we0O007965@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602290458.u1T4we0O007965>