Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40074dec authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

arch,metag: Convert smp_mb__*()



Implement the new barriers; as per the old versions the metag atomic
imply a full barrier.

Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-dqnyo215kq38wi4xcxnbpjw3@git.kernel.org


Cc: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 2db56e86
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -4,6 +4,7 @@
#include <linux/compiler.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/types.h>
#include <asm/cmpxchg.h>
#include <asm/cmpxchg.h>
#include <asm/barrier.h>


#if defined(CONFIG_METAG_ATOMICITY_IRQSOFF)
#if defined(CONFIG_METAG_ATOMICITY_IRQSOFF)
/* The simple UP case. */
/* The simple UP case. */
@@ -39,11 +40,6 @@


#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
#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
#endif


#define atomic_dec_if_positive(v)       atomic_sub_if_positive(1, v)
#define atomic_dec_if_positive(v)       atomic_sub_if_positive(1, v)
+3 −0
Original line number Original line Diff line number Diff line
@@ -97,4 +97,7 @@ do { \
	___p1;								\
	___p1;								\
})
})


#define smp_mb__before_atomic()	barrier()
#define smp_mb__after_atomic()	barrier()

#endif /* _ASM_METAG_BARRIER_H */
#endif /* _ASM_METAG_BARRIER_H */
+0 −6
Original line number Original line Diff line number Diff line
@@ -5,12 +5,6 @@
#include <asm/barrier.h>
#include <asm/barrier.h>
#include <asm/global_lock.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
#ifdef CONFIG_SMP
/*
/*
 * These functions are the basis of our bit ops.
 * These functions are the basis of our bit ops.