Skip to content

Commit f627476

Browse files
RISC-V: Use asm-generic for {in,out}{bwlq}
The asm-generic implementation is functionally identical to the RISC-V version. Signed-off-by: Palmer Dabbelt <[email protected]> Reviewed-by: Anup Patel <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 3f1e782 commit f627476

File tree

1 file changed

+0
-13
lines changed
  • arch/riscv/include/asm

1 file changed

+0
-13
lines changed

arch/riscv/include/asm/io.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,6 @@
5252
#define __io_pbw() __asm__ __volatile__ ("fence iow,o" : : : "memory");
5353
#define __io_paw() __asm__ __volatile__ ("fence o,io" : : : "memory");
5454

55-
#define inb(c) ({ u8 __v; __io_pbr(); __v = readb_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
56-
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
57-
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
58-
59-
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
60-
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
61-
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
62-
63-
#ifdef CONFIG_64BIT
64-
#define inq(c) ({ u64 __v; __io_pbr(); __v = readq_cpu((void*)(c)); __io_par(__v); __v; })
65-
#define outq(v,c) ({ __io_pbw(); writeq_cpu((v),(void*)(c)); __io_paw(); })
66-
#endif
67-
6855
/*
6956
* Accesses from a single hart to a single I/O address must be ordered. This
7057
* allows us to use the raw read macros, but we still need to fence before and

0 commit comments

Comments
 (0)