aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/bitops.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2022-08-26 16:43:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-27 09:49:54 -0700
commitd6ffe6067a54972564552ea45d320fb98db1ac5e (patch)
treef5e9fe0bc2a8eaa1669802af515b91498ea806af /arch/m68k/include/asm/bitops.h
parentMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux (diff)
downloadlinux-dev-d6ffe6067a54972564552ea45d320fb98db1ac5e.tar.xz
linux-dev-d6ffe6067a54972564552ea45d320fb98db1ac5e.zip
provide arch_test_bit_acquire for architectures that define test_bit
Some architectures define their own arch_test_bit and they also need arch_test_bit_acquire, otherwise they won't compile. We also clean up the code by using the generic test_bit if that is equivalent to the arch-specific version. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Fixes: 8238b4579866 ("wait_on_bit: add an acquire memory barrier") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/include/asm/bitops.h')
-rw-r--r--arch/m68k/include/asm/bitops.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h
index 470aed978590..e984af71df6b 100644
--- a/arch/m68k/include/asm/bitops.h
+++ b/arch/m68k/include/asm/bitops.h
@@ -157,11 +157,8 @@ arch___change_bit(unsigned long nr, volatile unsigned long *addr)
change_bit(nr, addr);
}
-static __always_inline bool
-arch_test_bit(unsigned long nr, const volatile unsigned long *addr)
-{
- return (addr[nr >> 5] & (1UL << (nr & 31))) != 0;
-}
+#define arch_test_bit generic_test_bit
+#define arch_test_bit_acquire generic_test_bit_acquire
static inline int bset_reg_test_and_set_bit(int nr,
volatile unsigned long *vaddr)