OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e566d8
)
[ARM SMP] Fix data corruption in test_* bitops
author
Russell King
<rmk@dyn-67.arm.linux.org.uk>
Wed, 27 Jul 2005 22:00:05 +0000
(23:00 +0100)
committer
Russell King
<rmk+kernel@arm.linux.org.uk>
Wed, 27 Jul 2005 22:00:05 +0000
(23:00 +0100)
If we found that the bit was already in the desired state, we
would skip performing the operation, and write random data back.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/lib/bitops.h
patch
|
blob
|
history
diff --git
a/arch/arm/lib/bitops.h
b/arch/arm/lib/bitops.h
index
6976e60
..
5382a30
100644
(file)
--- a/
arch/arm/lib/bitops.h
+++ b/
arch/arm/lib/bitops.h
@@
-19,9
+19,9
@@
mov r3, r2, lsl r3 @ create mask
1: ldrexb r2, [r1]
ands r0, r2, r3 @ save old value of bit
- \instr
ip
, r2, r3 @ toggle bit
- strexb
r2, ip
, [r1]
- cmp
r2
, #0
+ \instr
r2
, r2, r3 @ toggle bit
+ strexb
ip, r2
, [r1]
+ cmp
ip
, #0
bne 1b
cmp r0, #0
movne r0, #1