Commit d96da2ac authored by Sinan Kaya's avatar Sinan Kaya Committed by Greg Kroah-Hartman

MIPS: io: Prevent compiler reordering writeX()

[ Upstream commit f6b7aeee ]

writeX() has strong ordering semantics with respect to memory updates.
In the absence of a write barrier or a compiler barrier, the compiler
can reorder register and memory update instructions. This breaks the
writeX() API.
Signed-off-by: default avatarSinan Kaya <>
Cc: Arnd Bergmann <>
Cc: Ralf Baechle <>
Cc: Paul Burton <>
[ Tidy commit message]
Signed-off-by: default avatarJames Hogan <>
Signed-off-by: default avatarSasha Levin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent df5524e5
......@@ -307,7 +307,7 @@ static inline void iounmap(const volatile void __iomem *addr)
#define war_io_reorder_wmb() wmb()
#define war_io_reorder_wmb() do { } while (0)
#define war_io_reorder_wmb() barrier()
#define __BUILD_MEMORY_SINGLE(pfx, bwlq, type, irq) \
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment