]> 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)
commit21c9c24e950cbffc3dfd833107aaaf63104136f6
tree5334ad1c8c2a41f1133ae7d3905a5163043184ee
parent9df5c8e15653e9308b645a01047d6eadea82174c
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