]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Blackfin: make sure mmiowb inserts a write barrier with SSYNC
authorMichael Hennerich <michael.hennerich@analog.com>
Fri, 18 Jun 2010 08:30:08 +0000 (08:30 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 6 Aug 2010 16:55:51 +0000 (12:55 -0400)
Add SSYNC to our implementation of I/O write barrier to ensure ordering
of I/O space writes.  This will make sure that writes following the
barrier will arrive after all previous writes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/include/asm/io.h

index 29e55b9d88bcdbe0558aea0689a00dc4e7f25c89..234fbac17ec115a6357ae88d05b395ddf80478d3 100644 (file)
@@ -124,7 +124,13 @@ static inline unsigned int readl(const volatile void __iomem *addr)
 #define iowrite16(val, x)              writew(val, x)
 #define iowrite32(val, x)              writel(val, x)
 
-#define mmiowb() wmb()
+/**
+ * I/O write barrier
+ *
+ * Ensure ordering of I/O space writes. This will make sure that writes
+ * following the barrier will arrive after all previous writes.
+ */
+#define mmiowb() do { SSYNC(); wmb(); } while (0)
 
 #define IO_SPACE_LIMIT 0xffffffff