summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm
diff options
context:
space:
mode:
authorJens Freimann <jfrei@linux.vnet.ibm.com>2017-03-16 17:45:40 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2018-01-26 10:47:38 +0100
commitf3ec471a9832f8365836d70db4d52db9cc4dd6b1 (patch)
treed4a6e6146d5bda7799222eff82b3f9a9d65336d5 /arch/s390/include/asm
parent19114beb73f774e466d9e39b8e8b961812c9f881 (diff)
downloadlinux-f3ec471a9832f8365836d70db4d52db9cc4dd6b1.tar.gz
linux-f3ec471a9832f8365836d70db4d52db9cc4dd6b1.tar.bz2
linux-f3ec471a9832f8365836d70db4d52db9cc4dd6b1.zip
s390/bitops: add test_and_clear_bit_inv()
This patch adds a MSB0 bit numbering version of test_and_clear_bit(). Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r--arch/s390/include/asm/bitops.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h
index 31e400c1a1f3..86e5b2fdee3c 100644
--- a/arch/s390/include/asm/bitops.h
+++ b/arch/s390/include/asm/bitops.h
@@ -261,6 +261,11 @@ static inline void clear_bit_inv(unsigned long nr, volatile unsigned long *ptr)
return clear_bit(nr ^ (BITS_PER_LONG - 1), ptr);
}
+static inline int test_and_clear_bit_inv(unsigned long nr, volatile unsigned long *ptr)
+{
+ return test_and_clear_bit(nr ^ (BITS_PER_LONG - 1), ptr);
+}
+
static inline void __set_bit_inv(unsigned long nr, volatile unsigned long *ptr)
{
return __set_bit(nr ^ (BITS_PER_LONG - 1), ptr);