aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2007-02-05 08:47:35 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-08 09:49:15 -0500
commitdcda7e4ba1adec80089ec784964b32f9fd653237 (patch)
treebb533911e91ce7a96464f2603638f3c0500bf9c9 /include/asm-arm
parentae0a846e411dc0b568e8ccda584896310ee5f369 (diff)
[ARM] 4126/1: Add the ARM specific barriers
There are three barriers - ISB, DMB and DSB for different scenarious. This patch adds their definitions in the system.h file. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/system.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index aa223fc546af..e5aa372beb94 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -193,11 +193,19 @@ extern unsigned int user_debug;
193#endif 193#endif
194 194
195#if __LINUX_ARM_ARCH__ >= 6 195#if __LINUX_ARM_ARCH__ >= 6
196#define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ 196#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \
197 : : "r" (0) : "memory") 197 : : "r" (0) : "memory")
198#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \
199 : : "r" (0) : "memory")
200#define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \
201 : : "r" (0) : "memory")
198#else 202#else
199#define mb() __asm__ __volatile__ ("" : : : "memory") 203#define isb() __asm__ __volatile__ ("" : : : "memory")
204#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \
205 : : "r" (0) : "memory")
206#define dmb() __asm__ __volatile__ ("" : : : "memory")
200#endif 207#endif
208#define mb() dmb()
201#define rmb() mb() 209#define rmb() mb()
202#define wmb() mb() 210#define wmb() mb()
203#define read_barrier_depends() do { } while(0) 211#define read_barrier_depends() do { } while(0)