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: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Catalin Marinas 2011-04-06 16:18:47 +01:00 committed by Russell King
parent 2af68df02f
commit a904f5f9eb
3 changed files with 3 additions and 3 deletions

View file

@ -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>

View file

@ -4,5 +4,5 @@
* operation to deadlock the system.
*/
#define mb() dsb()
#define rmb() dmb()
#define rmb() dsb()
#define wmb() mb()

View file

@ -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()