Skip to contentSkip to conversation

xtensa: fix change_bit in exclusive access option

PATCH New Max Filippov 1 participant 1 message Oct 16, 2019

Subsystems (3)
lore
Share & tools
lore

Max Filippov

author maintainer
#0 lore raw

PATCH 1/1 xtensa: fix change_bit in exclusive access option

change_bit implementation for XCHAL_HAVE_EXCLUSIVE case changes all bits except the one required due to copy-paste error from clear_bit.

Fixes f7c34874f04a ("xtensa: add exclusive atomics support")
---
 arch/xtensa/include/asm/bitops.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/xtensa/include/asm/bitops.h +1 -1
index aeb15f4c755b..be8b2be5a98b 100644
@@ -148,7 +148,7 @@ static inline void change_bit(unsigned int bit, volatile unsigned long *p)
 			"       getex   %0\n"
 			"       beqz    %0, 1b\n"
 			: "=&a" (tmp)
-			: "a" (~mask), "a" (p)
+			: "a" (mask), "a" (p)
 			: "memory");
 }
 
Signature · 1 line
2.20.1