arm: fix atomic_testand{set,clear}_64 for ops on high bits
The fix in bd03acedb8
worked for 32-bit
ops, and for 64-bit ops for bit arguments of 0 - 95, but then was broken
for operations on the high 32 bits after that.
Reviewed by: markj, mmel
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27897
This commit is contained in:
parent
d189a74dfd
commit
486580c44c
@ -913,9 +913,8 @@ atomic_testandclear_64(volatile uint64_t *p, u_int v)
|
||||
* Assume little-endian,
|
||||
* atomic_testandclear_32() uses only last 5 bits of v
|
||||
*/
|
||||
if (v >= 32) {
|
||||
if ((v & 0x20) != 0)
|
||||
p32++;
|
||||
}
|
||||
return (atomic_testandclear_32(p32, v));
|
||||
}
|
||||
|
||||
@ -973,9 +972,8 @@ atomic_testandset_64(volatile uint64_t *p, u_int v)
|
||||
* Assume little-endian,
|
||||
* atomic_testandset_32() uses only last 5 bits of v
|
||||
*/
|
||||
if (v >= 32) {
|
||||
if ((v & 0x20) != 0)
|
||||
p32++;
|
||||
}
|
||||
return (atomic_testandset_32(p32, v));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user