Page MenuHomeFreeBSD

D7333.id.diff
No OneTemporary

D7333.id.diff

Index: head/sys/dev/hyperv/vmbus/vmbus_br.c
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_br.c
+++ head/sys/dev/hyperv/vmbus/vmbus_br.c
@@ -209,9 +209,7 @@
if (tbr->txbr_imask)
return (FALSE);
- /* XXX only compiler fence is needed */
- /* Read memory barrier */
- rmb();
+ __compiler_membar();
/*
* This is the only case we need to signal when the
@@ -308,15 +306,10 @@
sizeof(save_windex));
/*
- * XXX only compiler fence is needed.
- * Full memory barrier before upding the write index.
- */
- mb();
-
- /*
* Update the write index _after_ the channel packet
* is copied.
*/
+ __compiler_membar();
tbr->txbr_windex = windex;
mtx_unlock_spin(&tbr->txbr_lock);
@@ -396,16 +389,9 @@
rindex = VMBUS_BR_IDXINC(rindex, sizeof(uint64_t), br_dsize);
/*
- * XXX only compiler fence is needed.
- * 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.
- */
- wmb();
-
- /*
* Update the read index _after_ the channel packet is fetched.
*/
+ __compiler_membar();
rbr->rxbr_rindex = rindex;
mtx_unlock_spin(&rbr->rxbr_lock);

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 7, 12:57 AM (5 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38378662
Default Alt Text
D7333.id.diff (1 KB)

Event Timeline