diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index eb357c92c8ee..312eeed7c5bd 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -79,11 +80,23 @@ static inline void set_io_port_base(unsigned long base) * mips_io_port_base for iomap(), but we don't reserve any low addresses for * use with I/O ports. */ + #define HAVE_ARCH_PIO_SIZE #define PIO_OFFSET mips_io_port_base #define PIO_MASK IO_SPACE_LIMIT #define PIO_RESERVED 0x0UL +/* + * Enforce in-order execution of data I/O. In the MIPS architecture + * these are equivalent to corresponding platform-specific memory + * barriers defined in . API pinched from PowerPC, + * with sync additionally defined. + */ +#define iobarrier_rw() mb() +#define iobarrier_r() rmb() +#define iobarrier_w() wmb() +#define iobarrier_sync() iob() + /* * virt_to_phys - map virtual addresses to physical * @address: address to remap