]> git.baikalelectronics.ru Git - kernel.git/commit
alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering #2
authorSinan Kaya <okaya@codeaurora.org>
Mon, 16 Apr 2018 22:16:56 +0000 (18:16 -0400)
committerMatt Turner <mattst88@gmail.com>
Wed, 23 May 2018 01:10:36 +0000 (18:10 -0700)
commitac77c024a4357506888817812a933f69915e7b37
tree5334ad1c8c2a41f1133ae7d3905a5163043184ee
parentaebc6775ecf72103831ed1447da62a5deb3ec5bc
alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering #2

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/kernel/io.c