Commit 4acaa93e authored by John Garry's avatar John Garry Committed by Wei Xu

logic_pio: Use _inX() and _outX()

Use _inX() and _outX(), which include memory barriers which may be
overridden per arch.
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>
parent 26c4c6ce
...@@ -235,7 +235,7 @@ type logic_in##bwl(unsigned long addr) \ ...@@ -235,7 +235,7 @@ type logic_in##bwl(unsigned long addr) \
type ret = (type)~0; \ type ret = (type)~0; \
\ \
if (addr < MMIO_UPPER_LIMIT) { \ if (addr < MMIO_UPPER_LIMIT) { \
ret = read##bwl(PCI_IOBASE + addr); \ ret = _in##bwl(addr); \
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \ } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
struct logic_pio_hwaddr *entry = find_io_range(addr); \ struct logic_pio_hwaddr *entry = find_io_range(addr); \
\ \
...@@ -251,7 +251,7 @@ type logic_in##bwl(unsigned long addr) \ ...@@ -251,7 +251,7 @@ type logic_in##bwl(unsigned long addr) \
void logic_out##bwl(type value, unsigned long addr) \ void logic_out##bwl(type value, unsigned long addr) \
{ \ { \
if (addr < MMIO_UPPER_LIMIT) { \ if (addr < MMIO_UPPER_LIMIT) { \
write##bwl(value, PCI_IOBASE + addr); \ _out##bwl(value, addr); \
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \ } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
struct logic_pio_hwaddr *entry = find_io_range(addr); \ struct logic_pio_hwaddr *entry = find_io_range(addr); \
\ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment