io: define stronger ordering for the default readX() implementation
authorSinan Kaya <okaya@codeaurora.org>
Thu, 5 Apr 2018 13:09:10 +0000 (09:09 -0400)
committerArnd Bergmann <arnd@arndb.de>
Fri, 6 Apr 2018 10:01:43 +0000 (12:01 +0200)
commit032d59e1cde9dd71bb5918e1f6529776623ee86b
tree4d66120ac6a1d2e4e34545fe68c19d1dd48ddde7
parent64e2c6738b4d49d69d697b5887f72ad07c206ab3
io: define stronger ordering for the default readX() implementation

The default implementation of mapping readX() to __raw_readX() is wrong.
readX() has stronger ordering semantics. Compiler is allowed to reorder
__raw_readX() against the memory accesses following register read.

Use the previously defined __io_ar() and __io_br() macros to harden
code generation according to architecture support.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/io.h