All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@redhat.com>
To: kvm@vger.kernel.org
Cc: "Alexander Gordeev" <agordeev@redhat.com>,
	"Andrew Jones" <drjones@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: [PATCH v2 9/9] io: Disable memory re-ordering for generic memory barriers
Date: Wed, 27 Apr 2016 15:13:58 +0200	[thread overview]
Message-ID: <f6d9859b1ed22e4858afdba4f3157fb6683734dc.1461762419.git.agordeev@redhat.com> (raw)
In-Reply-To: <cover.1461762418.git.agordeev@redhat.com>

Suggested-by: Thomas Huth <thuth@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 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 28fe981..1710cc4 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


  parent reply	other threads:[~2016-04-27 13:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 13:13 [PATCH v2 0/9] Cleanup low-level arch code Alexander Gordeev
2016-04-27 13:13 ` [PATCH v2 1/9] Remove unused and unnecessary PHYS32 macro Alexander Gordeev
2016-04-27 13:13 ` [PATCH v2 2/9] Move phys_addr_t type definition to lib/libcflat.h Alexander Gordeev
2016-04-27 13:42   ` Andrew Jones
2016-04-27 13:13 ` [PATCH v2 3/9] x86: Introduce lib/x86/asm/page.h Alexander Gordeev
2016-04-27 13:45   ` Andrew Jones
2016-04-27 13:13 ` [PATCH v2 4/9] x86: Introduce lib/x86/asm/io.h Alexander Gordeev
2016-04-27 13:46   ` Andrew Jones
2016-04-27 16:23     ` Alexander Gordeev
2016-04-28  9:24       ` Alexander Gordeev
2016-04-28 11:13         ` Andrew Jones
2016-04-27 13:51   ` Andrew Jones
2016-04-27 13:13 ` [PATCH v2 5/9] x86: Introduce lib/x86/asm/barrier.h Alexander Gordeev
2016-04-27 13:52   ` Andrew Jones
2016-04-27 16:26     ` Alexander Gordeev
2016-04-28 16:23       ` Alexander Gordeev
2016-04-28 17:00         ` Andrew Jones
2016-04-27 13:13 ` [PATCH v2 6/9] x86: Optimize virt_to_phys() and phys_to_virt() Alexander Gordeev
2016-04-27 13:58   ` Andrew Jones
2016-04-27 16:54     ` Alexander Gordeev
2016-04-27 18:19       ` Andrew Jones
2016-04-27 13:13 ` [PATCH v2 7/9] io: Make ioremap() prototype conform to Linux one Alexander Gordeev
2016-04-27 13:59   ` Andrew Jones
2016-04-27 13:13 ` [PATCH v2 8/9] io/x86: Factor out ioremap() Alexander Gordeev
2016-04-27 14:11   ` Andrew Jones
2016-04-27 13:13 ` Alexander Gordeev [this message]
2016-04-27 14:14   ` [PATCH v2 9/9] io: Disable memory re-ordering for generic memory barriers Andrew Jones
2016-04-27 13:34 ` [PATCH v2 0/9] Cleanup low-level arch code Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6d9859b1ed22e4858afdba4f3157fb6683734dc.1461762419.git.agordeev@redhat.com \
    --to=agordeev@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.