diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2012-10-04 20:13:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:04:55 -0400 |
commit | b9034bf1e96fb8b1bf1b22ca2d3ea2aa7467e5a8 (patch) | |
tree | c7f69d7d56e15efb175befe28ea3b7a9cd1ff753 /include/asm-generic | |
parent | 459a130838e819d5bc7efc572cba4cdd5c4f2dd2 (diff) |
bitops: introduce generic {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: Arnd Bergmann <arnd@arndb.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/bitops/le.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index f95c663a6a41..61731543c00e 100644 --- a/include/asm-generic/bitops/le.h +++ b/include/asm-generic/bitops/le.h | |||
@@ -54,6 +54,16 @@ static inline int test_bit_le(int nr, const void *addr) | |||
54 | return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); | 54 | return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
55 | } | 55 | } |
56 | 56 | ||
57 | static inline void set_bit_le(int nr, void *addr) | ||
58 | { | ||
59 | set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
60 | } | ||
61 | |||
62 | static inline void clear_bit_le(int nr, void *addr) | ||
63 | { | ||
64 | clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
65 | } | ||
66 | |||
57 | static inline void __set_bit_le(int nr, void *addr) | 67 | static inline void __set_bit_le(int nr, void *addr) |
58 | { | 68 | { |
59 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | 69 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); |