From 271bed8fd64e0a06d2b6062dbcf6baf5f8d7c947 Mon Sep 17 00:00:00 2001 From: Takuya Yoshikawa Date: Fri, 28 Sep 2012 10:20:21 +1000 Subject: [PATCH] powerpc: bitops: introduce {clear,set}_bit_le() Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is being used for this missing function. Signed-off-by: Takuya Yoshikawa Acked-by: Benjamin Herrenschmidt Cc: Avi Kivity Cc: Marcelo Tosatti Signed-off-by: Andrew Morton --- arch/powerpc/include/asm/bitops.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index efdc92618b38..dc2cf9c6d9e6 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h @@ -288,6 +288,16 @@ static __inline__ int test_bit_le(unsigned long nr, return (tmp[nr >> 3] >> (nr & 7)) & 1; } +static inline void set_bit_le(int nr, void *addr) +{ + set_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + +static inline void clear_bit_le(int nr, void *addr) +{ + clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + static inline void __set_bit_le(int nr, void *addr) { __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); -- 2.39.5