Skip to content

Commit 4acaa93

Browse files
John Garryjoyxu
authored andcommitted
logic_pio: Use _inX() and _outX()
Use _inX() and _outX(), which include memory barriers which may be overridden per arch. Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Wei Xu <[email protected]>
1 parent 26c4c6c commit 4acaa93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/logic_pio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ type logic_in##bwl(unsigned long addr) \
235235
type ret = (type)~0; \
236236
\
237237
if (addr < MMIO_UPPER_LIMIT) { \
238-
ret = read##bwl(PCI_IOBASE + addr); \
238+
ret = _in##bwl(addr); \
239239
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
240240
struct logic_pio_hwaddr *entry = find_io_range(addr); \
241241
\
@@ -251,7 +251,7 @@ type logic_in##bwl(unsigned long addr) \
251251
void logic_out##bwl(type value, unsigned long addr) \
252252
{ \
253253
if (addr < MMIO_UPPER_LIMIT) { \
254-
write##bwl(value, PCI_IOBASE + addr); \
254+
_out##bwl(value, addr); \
255255
} else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \
256256
struct logic_pio_hwaddr *entry = find_io_range(addr); \
257257
\

0 commit comments

Comments
 (0)