commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=f9794a17fdfd3489ada3127ae9cf3b2ac5fd3095
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/2011R1

This reverts commit d85c852f245947cb376310d81b0d173730106822.
---
 include/asm-generic/mutex-dec.h  |   10 +---------
 include/asm-generic/mutex-xchg.h |    8 --------
 2 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/include/asm-generic/mutex-dec.h b/include/asm-generic/mutex-dec.h
index 61f722f..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_rmb();
 }
 
 /**
@@ -41,8 +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);
-	else
-		smp_rmb();
 	return 0;
 }
 
@@ -64,8 +60,6 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
 {
 	if (unlikely(atomic_inc_return(count) <= 0))
 		fail_fn(count);
-	else
-		smp_wmb();
 }
 
 #define __mutex_slowpath_needs_to_unlock()		1
@@ -88,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_rmb();
+	if (likely(atomic_cmpxchg(count, 1, 0) == 1))
 		return 1;
-	}
 	return 0;
 }
 
diff --git a/include/asm-generic/mutex-xchg.h b/include/asm-generic/mutex-xchg.h
index 6d6bde8..580a6d3 100644
--- a/include/asm-generic/mutex-xchg.h
+++ b/include/asm-generic/mutex-xchg.h
@@ -27,8 +27,6 @@ __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
 {
 	if (unlikely(atomic_xchg(count, 0) != 1))
 		fail_fn(count);
-	else
-		smp_rmb();
 }
 
 /**
@@ -46,8 +44,6 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
 {
 	if (unlikely(atomic_xchg(count, 0) != 1))
 		return fail_fn(count);
-	else
-		smp_rmb();
 	return 0;
 }
 
@@ -68,8 +64,6 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
 {
 	if (unlikely(atomic_xchg(count, 1) != 0))
 		fail_fn(count);
-	else
-		smp_wmb();
 }
 
 #define __mutex_slowpath_needs_to_unlock()		0
@@ -110,8 +104,6 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
 		if (prev < 0)
 			prev = 0;
 	}
-	if (prev)
-		smp_rmb();
 
 	return prev;
 }
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to