summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-10-15 21:51:43 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-29 09:22:35 +0100
commita47e86abba87c5a625ba34e661a06bc798e40cf3 (patch)
tree88e0f083d14f7ad2abb711d50d1cec1229cb2961 /arch
parent859628f7853eaa580123cfa5dd93906781481dc9 (diff)
downloadlinux-stable-a47e86abba87c5a625ba34e661a06bc798e40cf3.tar.gz
linux-stable-a47e86abba87c5a625ba34e661a06bc798e40cf3.tar.bz2
linux-stable-a47e86abba87c5a625ba34e661a06bc798e40cf3.zip
xtensa: fix change_bit in exclusive access option
commit 775fd6bfefc66a8c33e91dd9687ed530643b954d upstream. change_bit implementation for XCHAL_HAVE_EXCLUSIVE case changes all bits except the one required due to copy-paste error from clear_bit. Cc: stable@vger.kernel.org # v5.2+ Fixes: f7c34874f04a ("xtensa: add exclusive atomics support") Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/xtensa/include/asm/bitops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/bitops.h
index aeb15f4c755b..be8b2be5a98b 100644
--- a/arch/xtensa/include/asm/bitops.h
+++ b/arch/xtensa/include/asm/bitops.h
@@ -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");
}