Skip to content

Commit 0ef8fa6

Browse files
Takuya Yoshikawatorvalds
Takuya Yoshikawa
authored andcommitted
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 <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Marcelo Tosatti <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent b9034bf commit 0ef8fa6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/powerpc/include/asm/bitops.h

+10
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,16 @@ static __inline__ int test_bit_le(unsigned long nr,
288288
return (tmp[nr >> 3] >> (nr & 7)) & 1;
289289
}
290290

291+
static inline void set_bit_le(int nr, void *addr)
292+
{
293+
set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
294+
}
295+
296+
static inline void clear_bit_le(int nr, void *addr)
297+
{
298+
clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
299+
}
300+
291301
static inline void __set_bit_le(int nr, void *addr)
292302
{
293303
__set_bit(nr ^ BITOP_LE_SWIZZLE, addr);

0 commit comments

Comments
 (0)