Suggested-by: Thomas Huth <thuth@xxxxxxxxxx> Cc: Andrew Jones <drjones@xxxxxxxxxx> Cc: Thomas Huth <thuth@xxxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx> Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx> Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx> --- lib/asm-generic/io.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h index 3585ac09fb11..1834720db2ac 100644 --- a/lib/asm-generic/io.h +++ b/lib/asm-generic/io.h @@ -127,11 +127,14 @@ static inline u64 __bswap64(u64 x) ({ u64 __r = !__cpu_is_be() ? __bswap64(x) : ((u64)x); __r; }) #define cpu_to_be64 be64_to_cpu +#ifndef mb +#define mb() asm volatile("":::"memory") +#endif #ifndef rmb -#define rmb() do { } while (0) +#define rmb() asm volatile("":::"memory") #endif #ifndef wmb -#define wmb() do { } while (0) +#define wmb() asm volatile("":::"memory") #endif #define readb(addr) \ -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html