[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-dqnyo215kq38wi4xcxnbpjw3@git.kernel.org>
Date: Fri, 18 Apr 2014 06:10:20 -0700
From: tip-bot for Peter Zijlstra <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
will.deacon@....com, torvalds@...ux-foundation.org,
james.hogan@...tec.com, peterz@...radead.org,
paulmck@...ux.vnet.ibm.com, tglx@...utronix.de
Subject: [tip:locking/core] arch,metag: Convert smp_mb__*()
Commit-ID: 40074dece684fc61ab72cfc1689d564cba1c5f64
Gitweb: http://git.kernel.org/tip/40074dece684fc61ab72cfc1689d564cba1c5f64
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Thu, 13 Mar 2014 19:00:36 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 18 Apr 2014 14:20:38 +0200
arch,metag: Convert smp_mb__*()
Implement the new barriers; as per the old versions the metag atomic
imply a full barrier.
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Acked-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-dqnyo215kq38wi4xcxnbpjw3@git.kernel.org
Cc: James Hogan <james.hogan@...tec.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Will Deacon <will.deacon@....com>
Cc: linux-kernel@...r.kernel.org
Cc: linux-metag@...r.kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/metag/include/asm/atomic.h | 6 +-----
arch/metag/include/asm/barrier.h | 3 +++
arch/metag/include/asm/bitops.h | 6 ------
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/arch/metag/include/asm/atomic.h b/arch/metag/include/asm/atomic.h
index 307ecd2..470e365 100644
--- a/arch/metag/include/asm/atomic.h
+++ b/arch/metag/include/asm/atomic.h
@@ -4,6 +4,7 @@
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/cmpxchg.h>
+#include <asm/barrier.h>
#if defined(CONFIG_METAG_ATOMICITY_IRQSOFF)
/* The simple UP case. */
@@ -39,11 +40,6 @@
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-#define smp_mb__before_atomic_dec() barrier()
-#define smp_mb__after_atomic_dec() barrier()
-#define smp_mb__before_atomic_inc() barrier()
-#define smp_mb__after_atomic_inc() barrier()
-
#endif
#define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v)
diff --git a/arch/metag/include/asm/barrier.h b/arch/metag/include/asm/barrier.h
index 5d6b4b4..d1768c6 100644
--- a/arch/metag/include/asm/barrier.h
+++ b/arch/metag/include/asm/barrier.h
@@ -97,4 +97,7 @@ do { \
___p1; \
})
+#define smp_mb__before_atomic() barrier()
+#define smp_mb__after_atomic() barrier()
+
#endif /* _ASM_METAG_BARRIER_H */
diff --git a/arch/metag/include/asm/bitops.h b/arch/metag/include/asm/bitops.h
index c0d0df0..2671134 100644
--- a/arch/metag/include/asm/bitops.h
+++ b/arch/metag/include/asm/bitops.h
@@ -5,12 +5,6 @@
#include <asm/barrier.h>
#include <asm/global_lock.h>
-/*
- * clear_bit() doesn't provide any barrier for the compiler.
- */
-#define smp_mb__before_clear_bit() barrier()
-#define smp_mb__after_clear_bit() barrier()
-
#ifdef CONFIG_SMP
/*
* These functions are the basis of our bit ops.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists