linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: The mandatory barrier rmb() must be a dsb() in for device accesses
@ 2011-03-25 10:16 Catalin Marinas
  2011-03-29 15:02 ` Martin Furmanski
  0 siblings, 1 reply; 12+ messages in thread
From: Catalin Marinas @ 2011-03-25 10:16 UTC (permalink / raw)
  To: linux-arm-kernel

Since mandatory barriers may be used (explicitly or implicitly via readl
etc.) to ensure the ordering between Device and Normal memory accesses,
a DMB is not enough. This patch converts it to a DSB.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm/include/asm/system.h                  |    2 +-
 arch/arm/mach-realview/include/mach/barriers.h |    2 +-
 arch/arm/mach-tegra/include/mach/barriers.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 9a87823..926d867 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -159,7 +159,7 @@ extern unsigned int user_debug;
 #include <mach/barriers.h>
 #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP)
 #define mb()		do { dsb(); outer_sync(); } while (0)
-#define rmb()		dmb()
+#define rmb()		dsb()
 #define wmb()		mb()
 #else
 #include <asm/memory.h>
diff --git a/arch/arm/mach-realview/include/mach/barriers.h b/arch/arm/mach-realview/include/mach/barriers.h
index 0c5d749..9a73219 100644
--- a/arch/arm/mach-realview/include/mach/barriers.h
+++ b/arch/arm/mach-realview/include/mach/barriers.h
@@ -4,5 +4,5 @@
  * operation to deadlock the system.
  */
 #define mb()		dsb()
-#define rmb()		dmb()
+#define rmb()		dsb()
 #define wmb()		mb()
diff --git a/arch/arm/mach-tegra/include/mach/barriers.h b/arch/arm/mach-tegra/include/mach/barriers.h
index cc11517..425b42e 100644
--- a/arch/arm/mach-tegra/include/mach/barriers.h
+++ b/arch/arm/mach-tegra/include/mach/barriers.h
@@ -23,7 +23,7 @@
 
 #include <asm/outercache.h>
 
-#define rmb()		dmb()
+#define rmb()		dsb()
 #define wmb()		do { dsb(); outer_sync(); } while (0)
 #define mb()		wmb()
 

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-04-28 21:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 10:16 [PATCH] ARM: The mandatory barrier rmb() must be a dsb() in for device accesses Catalin Marinas
2011-03-29 15:02 ` Martin Furmanski
2011-03-29 15:21   ` Catalin Marinas
     [not found]     ` <AANLkTim1=686NAO7ox8s-HAd_KT4OjiUb1Y7jrUtgia3@mail.gmail.com>
     [not found]       ` <1301416642.583.101.camel@e102109-lin.cambridge.arm.com>
2011-03-29 21:06         ` Martin Furmanski
2011-03-30  8:53           ` Catalin Marinas
2011-04-07  7:07     ` Ming Lei
2011-04-09  8:57       ` Catalin Marinas
2011-04-09 17:03         ` Ming Lei
2011-04-10 10:10           ` Catalin Marinas
2011-04-11  5:43             ` Ming Lei
2011-04-28 18:45               ` Russell King - ARM Linux
2011-04-28 21:37                 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).