diff options
| author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2012-10-04 20:13:10 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:04:55 -0400 |
| commit | 0ef8fa6962a01e72125b1c640045e8d56be8c43a (patch) | |
| tree | f60cd1b0d5035e0d7fa2bae372fe8f6546daa54f | |
| parent | b9034bf1e96fb8b1bf1b22ca2d3ea2aa7467e5a8 (diff) | |
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 <yoshikawa.takuya@oss.ntt.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | arch/powerpc/include/asm/bitops.h | 10 |
1 files changed, 10 insertions, 0 deletions
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, | |||
| 288 | return (tmp[nr >> 3] >> (nr & 7)) & 1; | 288 | return (tmp[nr >> 3] >> (nr & 7)) & 1; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 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 | |||
| 291 | static inline void __set_bit_le(int nr, void *addr) | 301 | static inline void __set_bit_le(int nr, void *addr) |
| 292 | { | 302 | { |
| 293 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | 303 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
