提交 e7ec0293 编写于 作者: R Russell King 提交者: Russell King

[ARM SMP] Fix another ARMv6 bitop problem

We sometimes forgot to check whether the exclusive store succeeded.
Ensure that we always check.  Also ensure that we always use the
out of line versions, since the inline versions are not SMP safe.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 505d7b19
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
1: ldrexb r2, [r1] 1: ldrexb r2, [r1]
\instr r2, r2, r3 \instr r2, r2, r3
strexb r0, r2, [r1] strexb r0, r2, [r1]
cmpne r0, #0 cmp r0, #0
bne 1b bne 1b
mov pc, lr mov pc, lr
.endm .endm
......
...@@ -229,6 +229,7 @@ extern int _find_next_zero_bit_be(const void * p, int size, int offset); ...@@ -229,6 +229,7 @@ extern int _find_next_zero_bit_be(const void * p, int size, int offset);
extern int _find_first_bit_be(const unsigned long *p, unsigned size); extern int _find_first_bit_be(const unsigned long *p, unsigned size);
extern int _find_next_bit_be(const unsigned long *p, int size, int offset); extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
#ifndef CONFIG_SMP
/* /*
* The __* form of bitops are non-atomic and may be reordered. * The __* form of bitops are non-atomic and may be reordered.
*/ */
...@@ -241,6 +242,10 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); ...@@ -241,6 +242,10 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
(__builtin_constant_p(nr) ? \ (__builtin_constant_p(nr) ? \
____atomic_##name(nr, p) : \ ____atomic_##name(nr, p) : \
_##name##_be(nr,p)) _##name##_be(nr,p))
#else
#define ATOMIC_BITOP_LE(name,nr,p) _##name##_le(nr,p)
#define ATOMIC_BITOP_BE(name,nr,p) _##name##_be(nr,p)
#endif
#define NONATOMIC_BITOP(name,nr,p) \ #define NONATOMIC_BITOP(name,nr,p) \
(____nonatomic_##name(nr, p)) (____nonatomic_##name(nr, p))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册