Revert "ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff"
authorVineet Gupta <vgupta@synopsys.com>
Tue, 31 May 2016 11:01:33 +0000 (16:31 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 2 Jun 2016 05:29:22 +0000 (10:59 +0530)
This reverts commit 10971638701dedadb58c88ce4d31c9375b224ed6.

The issue was fixed in hardware in HS2.1C release and there are no known
external users of affected RTL - so revert thw whole delayed retry
series !

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/atomic.h
arch/arc/include/asm/spinlock.h

index 5f3dcbbc0cc9c14df199c55ff9e916b64be3be0d..75c8226317f44a2599f7eb32f6aa7ba3a61e4df0 100644 (file)
@@ -36,7 +36,8 @@
        "       mov     %[tmp], %[delay]        \n"     /* tmp = delay */       \
        "2:     brne.d  %[tmp], 0, 2b           \n"     /* while (tmp != 0) */  \
        "       sub     %[tmp], %[tmp], 1       \n"     /* tmp-- */             \
-       "       rol     %[delay], %[delay]      \n"     /* delay *= 2 */        \
+       "       asl.f   %[delay], %[delay], 1   \n"     /* delay *= 2 */        \
+       "       mov.z   %[delay], 1             \n"     /* handle overflow */   \
        "       b       1b                      \n"     /* start over */        \
        "4: ; --- success ---                   \n"                             \
 
index 800e7c430ca589724c9467a3a9689aad6faf6bc3..a86cb84fad2a87530ad20cdae29e832db0d5ebe8 100644 (file)
@@ -260,7 +260,8 @@ static inline void arch_write_unlock(arch_rwlock_t *rw)
        "       mov     %[tmp], %[delay]        \n"     /* tmp = delay */       \
        "2:     brne.d  %[tmp], 0, 2b           \n"     /* while (tmp != 0) */  \
        "       sub     %[tmp], %[tmp], 1       \n"     /* tmp-- */             \
-       "       rol     %[delay], %[delay]      \n"     /* delay *= 2 */        \
+       "       asl.f   %[delay], %[delay], 1   \n"     /* delay *= 2 */        \
+       "       mov.z   %[delay], 1             \n"     /* handle overflow */   \
        "       b       1b                      \n"     /* start over */        \
        "                                       \n"                             \
        "4: ; --- done ---                      \n"                             \