Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157335900
D7333.id18799.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7333.id18799.diff
View Options
Index: sys/dev/hyperv/vmbus/vmbus_br.c
===================================================================
--- sys/dev/hyperv/vmbus/vmbus_br.c
+++ 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
Details
Attached
Mime Type
text/plain
Expires
Thu, May 21, 10:32 AM (2 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33387086
Default Alt Text
D7333.id18799.diff (1 KB)
Attached To
Mode
D7333: hyperv/vmbus: Avoid unnecessary mb()
Attached
Detach File
Event Timeline
Log In to Comment