[PATCH] arm: swsusp build fix
[powerpc.git] / arch / arm / kernel / entry-armv.S
index 78cf84c..39a6c1b 100644 (file)
@@ -308,7 +308,7 @@ __pabt_svc:
        str     r1, [sp]                @ save the "real" r0 copied
                                        @ from the exception stack
 
-#if __LINUX_ARM_ARCH__ < 6
+#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
        @ make sure our user space atomic helper is aborted
        cmp     r2, #VIRT_OFFSET
        bichs   r3, r3, #PSR_Z_BIT
@@ -648,11 +648,17 @@ __kuser_helper_start:
 
 __kuser_cmpxchg:                               @ 0xffff0fc0
 
-#if __LINUX_ARM_ARCH__ < 6
+#if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
 
-#ifdef CONFIG_SMP  /* sanity check */
-#error "CONFIG_SMP on a machine supporting pre-ARMv6 processors?"
-#endif
+       /*
+        * Poor you.  No fast solution possible...
+        * The kernel itself must perform the operation.
+        * A special ghost syscall is used for that (see traps.c).
+        */
+       swi     #0x9ffff0
+       mov     pc, lr
+
+#elif __LINUX_ARM_ARCH__ < 6
 
        /*
         * Theory of operation: