aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-04-21 14:42:15 +0800
committerAlex Shi <alex.shi@linaro.org>2016-04-21 14:42:15 +0800
commitfd9302c16fc244139c1ddfdffc145d5b772ed9ce (patch)
tree40270feadd63149bcd43380cf3fe402a2dcd85ad /include/asm-generic
parent9b17ba5e21b99587d7c54250059cf10fd51c74f2 (diff)
parent6fe78bc1bfcddabbf3d210e18f91da44fa796d8a (diff)
Merge remote-tracking branch 'lts/linux-4.1.y' into linux-linaro-lsk-v4.1lsk-v4.1-16.04
Conflicts: arch/arm/include/asm/psci.h mm/memcontrol.c
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bitops/lock.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-generic/bitops/lock.h b/include/asm-generic/bitops/lock.h
index c30266e94806..8ef0ccbf8167 100644
--- a/include/asm-generic/bitops/lock.h
+++ b/include/asm-generic/bitops/lock.h
@@ -29,16 +29,16 @@ do { \
* @nr: the bit to set
* @addr: the address to start counting from
*
- * This operation is like clear_bit_unlock, however it is not atomic.
- * It does provide release barrier semantics so it can be used to unlock
- * a bit lock, however it would only be used if no other CPU can modify
- * any bits in the memory until the lock is released (a good example is
- * if the bit lock itself protects access to the other bits in the word).
+ * A weaker form of clear_bit_unlock() as used by __bit_lock_unlock(). If all
+ * the bits in the word are protected by this lock some archs can use weaker
+ * ops to safely unlock.
+ *
+ * See for example x86's implementation.
*/
#define __clear_bit_unlock(nr, addr) \
do { \
- smp_mb(); \
- __clear_bit(nr, addr); \
+ smp_mb__before_atomic(); \
+ clear_bit(nr, addr); \
} while (0)
#endif /* _ASM_GENERIC_BITOPS_LOCK_H_ */