OSDN Git Service

asm-generic/io: Pass result of I/O accessor to __io_[p]ar()
authorWill Deacon <will.deacon@arm.com>
Fri, 22 Feb 2019 18:04:52 +0000 (18:04 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 28 Feb 2019 17:22:47 +0000 (17:22 +0000)
commitabbbbc83a210e95e2ae4ee71e50930a8cec6f081
treecb621c9cd789a12ae84b344ee6eb985fe0f7f008
parent3e32131abc311a5cb9fddecc72cbd0b95ffcc10d
asm-generic/io: Pass result of I/O accessor to __io_[p]ar()

The inX() and readX() I/O accessors must enforce ordering against
subsequent calls to the delay() routines, so that a read-back from a
device can be used to postpone a subsequent write to the same device.

On some architectures, including arm64, this ordering can only be
achieved by creating a dependency on the value returned by the I/O
accessor operation, so we need to pass the value we read to the
__io_par() and __io_ar() macros in these cases.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
include/asm-generic/io.h