Commit a904f5f9 authored by Catalin Marinas's avatar Catalin Marinas Committed by Russell King

ARM: 6870/1: The mandatory barrier rmb() must be a dsb() in for device accesses

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: Colin Cross <ccross@android.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 2af68df0
...@@ -159,7 +159,7 @@ extern unsigned int user_debug; ...@@ -159,7 +159,7 @@ extern unsigned int user_debug;
#include <mach/barriers.h> #include <mach/barriers.h>
#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) #elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP)
#define mb() do { dsb(); outer_sync(); } while (0) #define mb() do { dsb(); outer_sync(); } while (0)
#define rmb() dmb() #define rmb() dsb()
#define wmb() mb() #define wmb() mb()
#else #else
#include <asm/memory.h> #include <asm/memory.h>
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
* operation to deadlock the system. * operation to deadlock the system.
*/ */
#define mb() dsb() #define mb() dsb()
#define rmb() dmb() #define rmb() dsb()
#define wmb() mb() #define wmb() mb()
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <asm/outercache.h> #include <asm/outercache.h>
#define rmb() dmb() #define rmb() dsb()
#define wmb() do { dsb(); outer_sync(); } while (0) #define wmb() do { dsb(); outer_sync(); } while (0)
#define mb() wmb() #define mb() wmb()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment