Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Blackfin: make sure mmiowb inserts a write barrier with SSYNC

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>

authored by

Michael Hennerich and committed by
Mike Frysinger
eb964909 d1401e1d

+7 -1
+7 -1
arch/blackfin/include/asm/io.h
··· 124 124 #define iowrite16(val, x) writew(val, x) 125 125 #define iowrite32(val, x) writel(val, x) 126 126 127 - #define mmiowb() wmb() 127 + /** 128 + * I/O write barrier 129 + * 130 + * Ensure ordering of I/O space writes. This will make sure that writes 131 + * following the barrier will arrive after all previous writes. 132 + */ 133 + #define mmiowb() do { SSYNC(); wmb(); } while (0) 128 134 129 135 #define IO_SPACE_LIMIT 0xffffffff 130 136