Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139351876
D2077.id4242.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D2077.id4242.diff
View Options
Index: sys/dev/sfxge/common/efsys.h
===================================================================
--- sys/dev/sfxge/common/efsys.h
+++ sys/dev/sfxge/common/efsys.h
@@ -786,6 +786,14 @@
EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \
uint32_t, (_edp)->ed_u32[0]); \
\
+ /* \
+ * Make sure that previous writes to the dword have \
+ * been done. It should be cheaper than barrier just \
+ * after the write below. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_dword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_4((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset), (_edp)->ed_u32[0]); \
@@ -809,6 +817,14 @@
uint32_t, (_eqp)->eq_u32[1], \
uint32_t, (_eqp)->eq_u32[0]); \
\
+ /* \
+ * Make sure that previous writes to the qword have \
+ * been done. It should be cheaper than barrier just \
+ * after the write below. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_qword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_8((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset), (_eqp)->eq_u64[0]); \
@@ -829,9 +845,25 @@
uint32_t, (_eqp)->eq_u32[1], \
uint32_t, (_eqp)->eq_u32[0]); \
\
+ /* \
+ * Make sure that previous writes to the qword have \
+ * been done. It should be cheaper than barrier just \
+ * after the last write below. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_qword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_4((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset), (_eqp)->eq_u32[0]); \
+ /* \
+ * It should be guaranteed that the last dword comes \
+ * the last, so barrier entire qword to be sure that \
+ * neither above nor below writes are reordered. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_qword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_4((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset) + 4, (_eqp)->eq_u32[1]); \
@@ -858,9 +890,25 @@
uint32_t, (_eop)->eo_u32[1], \
uint32_t, (_eop)->eo_u32[0]); \
\
+ /* \
+ * Make sure that previous writes to the oword have \
+ * been done. It should be cheaper than barrier just \
+ * after the last write below. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_oword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_8((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset), (_eop)->eo_u64[0]); \
+ /* \
+ * It should be guaranteed that the last qword comes \
+ * the last, so barrier entire oword to be sure that \
+ * neither above nor below writes are reordered. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_oword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_8((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset) + 8, (_eop)->eo_u64[1]); \
@@ -888,6 +936,14 @@
uint32_t, (_eop)->eo_u32[1], \
uint32_t, (_eop)->eo_u32[0]); \
\
+ /* \
+ * Make sure that previous writes to the oword have \
+ * been done. It should be cheaper than barrier just \
+ * after the last write below. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_oword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_4((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset), (_eop)->eo_u32[0]); \
@@ -897,6 +953,14 @@
bus_space_write_stream_4((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset) + 8, (_eop)->eo_u32[2]); \
+ /* \
+ * It should be guaranteed that the last dword comes \
+ * the last, so barrier entire oword to be sure that \
+ * neither above nor below writes are reordered. \
+ */ \
+ bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\
+ (_offset), sizeof (efx_oword_t), \
+ BUS_SPACE_BARRIER_WRITE); \
bus_space_write_stream_4((_esbp)->esb_tag, \
(_esbp)->esb_handle, \
(_offset) + 12, (_eop)->eo_u32[3]); \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 3:13 AM (9 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26887561
Default Alt Text
D2077.id4242.diff (4 KB)
Attached To
Mode
D2077: sfxge: add barriers to BAR write macros
Attached
Detach File
Event Timeline
Log In to Comment