[rfc] implement busdma barrier operation
Adrian Chadd
adrian at freebsd.org
Wed Oct 9 00:33:03 UTC 2013
Hi,
I'd like to implement the busdma barrier operation. This is required for
(at least) correct behaviour of devices on the ar9344 (mips74k) core, as
now I actually need to care about the order of device operations.
This (and some local uncommitted changes) are required for the ar9344
ethernet and switchport devices to correctly function.
I've tested this on the other mips24k hardware I have and it works. But
nothing else (including ath, grr) explicitly uses read/write barriers. I'll
eventually add them.
I'd like to bounce this to re@ ASAP to get the approval to commit.
Thanks,
-adrian
Index: sys/mips/mips/bus_space_generic.c
===================================================================
--- sys/mips/mips/bus_space_generic.c (revision 256173)
+++ sys/mips/mips/bus_space_generic.c (working copy)
@@ -749,4 +749,8 @@
if (flags & BUS_SPACE_BARRIER_WRITE)
mips_dcache_wbinv_all();
#endif
+ if (flags & BUS_SPACE_BARRIER_READ)
+ rmb();
+ if (flags & BUS_SPACE_BARRIER_WRITE)
+ wmb();
}
More information about the freebsd-mips
mailing list