diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-03-13 18:00:35 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-18 12:20:45 (GMT) |
commit | ce3609f93445846f7b5a5b4bacb236a9bdc35216 (patch) | |
tree | 89b4eb5b7ae0b9e0dd8b003b481f1a253a1dd0fd /arch/tile/include/asm/barrier.h | |
parent | 56d3648948c202e8b89cd786a004c451a3eb264f (diff) | |
download | linux-ce3609f93445846f7b5a5b4bacb236a9bdc35216.tar.xz |
arch,tile: Convert smp_mb__*()
Implement the new smp_mb__* ops as per the old ones.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Link: http://lkml.kernel.org/n/tip-euuabnf5a3u23fy4fq8m3jcg@git.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chen Gang <gang.chen@asianux.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/tile/include/asm/barrier.h')
-rw-r--r-- | arch/tile/include/asm/barrier.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/tile/include/asm/barrier.h b/arch/tile/include/asm/barrier.h index b5a05d0..96a42ae 100644 --- a/arch/tile/include/asm/barrier.h +++ b/arch/tile/include/asm/barrier.h @@ -72,6 +72,20 @@ mb_incoherent(void) #define mb() fast_mb() #define iob() fast_iob() +#ifndef __tilegx__ /* 32 bit */ +/* + * We need to barrier before modifying the word, since the _atomic_xxx() + * routines just tns the lock and then read/modify/write of the word. + * But after the word is updated, the routine issues an "mf" before returning, + * and since it's a function call, we don't even need a compiler barrier. + */ +#define smp_mb__before_atomic() smp_mb() +#define smp_mb__after_atomic() do { } while (0) +#else /* 64 bit */ +#define smp_mb__before_atomic() smp_mb() +#define smp_mb__after_atomic() smp_mb() +#endif + #include <asm-generic/barrier.h> #endif /* !__ASSEMBLY__ */ |