• John Garry's avatar
    io: Provide _inX() and _outX() · f009c89d
    John Garry authored
    Since commit a7851aa5 ("io: change outX() to have their own IO barrier
    overrides") and commit 87fe2d54 ("io: change inX() to have their own
    IO barrier overrides"), the outX and inX functions have memory barriers
    which can be overridden.
    
    However, the generic logic_pio lib has continued to use readl/writel et al
    for IO port accesses, which has weaker barriers on arm64.
    
    Provide generic _inX() and _outX(), which can be used by logic pio.
    
    For consistency, we check for !defined({in,out}X) && !defined(_{in,out}X),
    for defining _{in,out}X, while a check for just !defined({in,out}X) should
    suffice.
    Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
    Signed-off-by: default avatarWei Xu <xuwei5@hisilicon.com>
    f009c89d
io.h 22.3 KB