diff mbox

ARM: Define wfi(), wfe(), sev() macros for pre-v7 processors

Message ID 1296829243-21313-1-git-send-email-dave.martin@linaro.org (mailing list archive)
State Superseded
Delegated to: Kevin Hilman
Headers show

Commit Message

tip-bot for Dave Martin Feb. 4, 2011, 2:20 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 97f6d60..0e1cae3 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -129,7 +129,14 @@  extern unsigned int user_debug;
 #define sev()	__asm__ __volatile__ ("sev" : : : "memory")
 #define wfe()	__asm__ __volatile__ ("wfe" : : : "memory")
 #define wfi()	__asm__ __volatile__ ("wfi" : : : "memory")
+#else /* __LINUX_ARM_ARCH__ < 7 */
+#define sev()	__asm__ __volatile__ ("" : : : "memory")
+#define wfe()	__asm__ __volatile__ ("" : : : "memory")
+#if __LINUX_ARM_ARCH__ == 6
+#define wfi()	__asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \
+					: : "r" (0) : "memory")
 #endif
+#endif /* __LINUX_ARM_ARCH__ < 7 */
 
 #if __LINUX_ARM_ARCH__ >= 7
 #define isb() __asm__ __volatile__ ("isb" : : : "memory")