]> git.baikalelectronics.ru Git - kernel.git/commit
alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering
authorSinan Kaya <okaya@codeaurora.org>
Mon, 2 Apr 2018 17:48:00 +0000 (13:48 -0400)
committerMatt Turner <mattst88@gmail.com>
Sat, 7 Apr 2018 22:04:15 +0000 (15:04 -0700)
commit1f0f0fc705fb3943e6df2fbdf25910c618b101a7
tree3cc22abf68b50fb7e220d1554b48a0ebf50804e3
parent40c10d7d955d95000403bc57166a0ec5e2b349e3
alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering

memory-barriers.txt has been updated with the following requirement.

"When using writel(), a prior wmb() is not needed to guarantee that the
cache coherent memory writes have completed before writing to the MMIO
region."

Current writeX() and iowriteX() implementations on alpha are not
satisfying this requirement as the barrier is after the register write.

Move mb() in writeX() and iowriteX() functions to guarantee that HW
observes memory changes before performing register operations.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/include/asm/io.h