summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-05-31 10:47:55 +0000
committernyan <nyan@FreeBSD.org>2000-05-31 10:47:55 +0000
commitb4451d2d3a5af7a66d95431e98f603bd4ef2efc4 (patch)
tree5d55e18bf47f68435024590194866ccc11f73ea5 /sys
parent27d9c9b35acce3c82ed7bfbf0d2fdbcf77d60b7a (diff)
downloadFreeBSD-src-b4451d2d3a5af7a66d95431e98f603bd4ef2efc4.zip
FreeBSD-src-b4451d2d3a5af7a66d95431e98f603bd4ef2efc4.tar.gz
Sync with sys/i386/include/bus_at386.h revision 1.9.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/include/bus_pc98.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/i386/include/bus_pc98.h b/sys/i386/include/bus_pc98.h
index d8a7c33..6aa457a 100644
--- a/sys/i386/include/bus_pc98.h
+++ b/sys/i386/include/bus_pc98.h
@@ -1436,14 +1436,25 @@ bus_space_copy_region_4(bus_space_tag_t tag, bus_space_handle_t bsh1,
* void bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh,
* bus_size_t offset, bus_size_t len, int flags);
*
- * Note: the i386 does not currently require barriers, but we must
- * provide the flags to MI code.
+ *
+ * Note that BUS_SPACE_BARRIER_WRITE doesn't do anything other than
+ * prevent reordering by the compiler; all Intel x86 processors currently
+ * retire operations outside the CPU in program order.
*/
-#define bus_space_barrier(t, h, o, l, f) \
- ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f)))
#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */
+static __inline void
+bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, bus_size_t len, int flags)
+{
+ if (flags & BUS_SPACE_BARRIER_READ)
+ __asm __volatile ("lock; addl $0,0(%esp)" : : : "memory");
+ else
+ __asm __volatile ("" : : : "memory");
+}
+
+
/*
* Flags used in various bus DMA methods.
*/
OpenPOWER on IntegriCloud