]> asedeno.scripts.mit.edu Git - linux.git/commit
MIPS: Correct `mmiowb' barrier for `wbflush' platforms
authorMaciej W. Rozycki <macro@linux-mips.org>
Mon, 8 Oct 2018 00:37:07 +0000 (01:37 +0100)
committerPaul Burton <paul.burton@mips.com>
Tue, 9 Oct 2018 17:42:40 +0000 (10:42 -0700)
commita711d43cbbaa4800a15885c1044348982b6c0c4b
treec65c1fb975a5ac4e84cdc780c97de3c3f5e6ab9a
parent4ae0452bddca8b59e9258759123a652161d07871
MIPS: Correct `mmiowb' barrier for `wbflush' platforms

Redefine `mmiowb' in terms of `iobarrier_w' so that it works correctly
for MIPS I platforms, which have no SYNC machine instruction and use a
call to `wbflush' instead.

This doesn't change the semantics for CONFIG_CPU_CAVIUM_OCTEON, because
`iobarrier_w' expands to `wmb', which is ultimately the same as the
current arrangement.  For MIPS I platforms this not only makes any code
that would happen to use `mmiowb' build and run, but it actually
enforces the ordering required as well, as `iobarrier_w' has it already
covered with the use of `wmb'.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20863/
Cc: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/io.h