commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=585fdeacd4caa45f99cd94a6c0cb1edb8a96d4c4
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk-next

This reverts commit 650f1efa82134043f7d39a8db962986f72fdcb95.

After talking to mainline, the SMP barrier logic we had in our Blackfin
code seems to just date back to an older asm-generic/mutex-dec.h from the
initial SMP port.  Common code moved on, and it shouldn't be an issue for
us to do so as well since the atomic funcs that this file builds on have
explicit core_lock grabbing buried in them.  Plus, the system boots for
me without them, so that's a good sign.

Signed-off-by: Mike Frysinger <[email protected]>
---
 include/asm-generic/mutex-dec.h |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/include/asm-generic/mutex-dec.h b/include/asm-generic/mutex-dec.h
index e746c3c..f104af7 100644
--- a/include/asm-generic/mutex-dec.h
+++ b/include/asm-generic/mutex-dec.h
@@ -22,8 +22,6 @@ __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
 {
 	if (unlikely(atomic_dec_return(count) < 0))
 		fail_fn(count);
-	else
-		smp_mb();
 }
 
 /**
@@ -41,7 +39,6 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
 {
 	if (unlikely(atomic_dec_return(count) < 0))
 		return fail_fn(count);
-	smp_mb();
 	return 0;
 }
 
@@ -61,7 +58,6 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
 static inline void
 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
 {
-	smp_mb();
 	if (unlikely(atomic_inc_return(count) <= 0))
 		fail_fn(count);
 }
@@ -86,10 +82,8 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
 static inline int
 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
 {
-	if (likely(atomic_cmpxchg(count, 1, 0) == 1)) {
-		smp_mb();
+	if (likely(atomic_cmpxchg(count, 1, 0) == 1))
 		return 1;
-	}
 	return 0;
 }
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to