summaryrefslogtreecommitdiff
path: root/arch/ia64
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/ia64
parente022620b5d056e822e42eb9bc0f24fcb97389d86 (diff)
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/ia64')
-rw-r--r--arch/ia64/include/asm/bitops.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index 9f62af7fd7c4..1accb7842f58 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/ia64/include/asm/bitops.h
@@ -331,11 +331,8 @@ arch___test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
return (old & bit) != 0;
}
-static __always_inline bool
-arch_test_bit(unsigned long nr, const volatile unsigned long *addr)
-{
- return 1 & (((const volatile __u32 *) addr)[nr >> 5] >> (nr & 31));
-}
+#define arch_test_bit generic_test_bit
+#define arch_test_bit_acquire generic_test_bit_acquire
/**
* ffz - find the first zero bit in a long word