io: define several IO & PIO barrier types for the asm-generic version
authorSinan Kaya <okaya@codeaurora.org>
Thu, 5 Apr 2018 13:09:09 +0000 (09:09 -0400)
committerArnd Bergmann <arnd@arndb.de>
Fri, 6 Apr 2018 10:01:28 +0000 (12:01 +0200)
commit64e2c6738b4d49d69d697b5887f72ad07c206ab3
tree089b698b6c2e94c00afaace0d6f4c0e92f654399
parent0adb32858b0bddf4ada5f364a84ed60b196dbcda
io: define several IO & PIO barrier types for the asm-generic version

Getting ready to harden readX()/writeX() and inX()/outX() semantics for the
generic implementation.

Defining two set of macros as __io_br() and __io_ar() to indicate actions
to be taken before and after MMIO read.

Defining two set of macros as __io_bw() and __io_aw() to indicate actions
to be taken before and after MMIO write.

Defining two set of macros as __io_pbw() and __io_paw() to indicate actions
to be taken before and after Port IO write.

Defining two set of macros as __io_pbr() and __io_par() to indicate actions
to be taken before and after Port IO read.

If rmb() is available for the architecture, prefer rmb() as the default
implementation of __io_ar()/__io_par().

If wmb() is available for the architecture, prefer wmb() as the default
implementation of __io_bw()/__io_pbw().

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