]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] armv7: add dedicated ARMv7 barrier instructions
authorCatalin Marinas <catalin.marinas@arm.com>
Tue, 8 May 2007 21:53:44 +0000 (22:53 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 8 May 2007 21:55:57 +0000 (22:55 +0100)
Starting with ARMv7, there are dedicated instruction for the ISB, DSB
and DMB barriers and there is no need to execute them as CP15
operations.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/system.h

index c57555c3709824dd634caee204bc27ff5759df64..41dd49151dae149be79ab614c3c3c40bbf450d9c 100644 (file)
@@ -158,7 +158,11 @@ extern unsigned int user_debug;
 #define vectors_high() (0)
 #endif
 
-#if defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ >= 6
+#if __LINUX_ARM_ARCH__ >= 7
+#define isb() __asm__ __volatile__ ("isb" : : : "memory")
+#define dsb() __asm__ __volatile__ ("dsb" : : : "memory")
+#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
+#elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6
 #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \
                                    : : "r" (0) : "memory")
 #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \