Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch,m32r: Convert smp_mb__*()

M32r uses asm-generic/barrier.h and its smp_mb() is barrier();
therefore we can use the generic versions which default to smp_mb().

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-wh6xljltyvmpy9t0bc80k1fy@git.kernel.org
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-m32r-ja@ml.linux-m32r.org
Cc: linux-m32r@ml.linux-m32r.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Peter Zijlstra and committed by
Ingo Molnar
89607d5e 0cd64efb

+3 -10
+1 -6
arch/m32r/include/asm/atomic.h
··· 13 13 #include <asm/assembler.h> 14 14 #include <asm/cmpxchg.h> 15 15 #include <asm/dcache_clear.h> 16 + #include <asm/barrier.h> 16 17 17 18 /* 18 19 * Atomic operations that C can't guarantee us. Useful for ··· 308 307 ); 309 308 local_irq_restore(flags); 310 309 } 311 - 312 - /* Atomic operations are already serializing on m32r */ 313 - #define smp_mb__before_atomic_dec() barrier() 314 - #define smp_mb__after_atomic_dec() barrier() 315 - #define smp_mb__before_atomic_inc() barrier() 316 - #define smp_mb__after_atomic_inc() barrier() 317 310 318 311 #endif /* _ASM_M32R_ATOMIC_H */
+2 -4
arch/m32r/include/asm/bitops.h
··· 21 21 #include <asm/byteorder.h> 22 22 #include <asm/dcache_clear.h> 23 23 #include <asm/types.h> 24 + #include <asm/barrier.h> 24 25 25 26 /* 26 27 * These have to be done with inline assembly: that way the bit-setting ··· 74 73 * 75 74 * clear_bit() is atomic and may not be reordered. However, it does 76 75 * not contain a memory barrier, so if it is used for locking purposes, 77 - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() 76 + * you should call smp_mb__before_atomic() and/or smp_mb__after_atomic() 78 77 * in order to ensure changes are visible on other processors. 79 78 */ 80 79 static __inline__ void clear_bit(int nr, volatile void * addr) ··· 103 102 ); 104 103 local_irq_restore(flags); 105 104 } 106 - 107 - #define smp_mb__before_clear_bit() barrier() 108 - #define smp_mb__after_clear_bit() barrier() 109 105 110 106 /** 111 107 * change_bit - Toggle a bit in memory