]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: bitops: introduce {clear,set}_bit_le()
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Fri, 21 Sep 2012 01:02:06 +0000 (11:02 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 21 Sep 2012 05:59:12 +0000 (15:59 +1000)
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>
arch/powerpc/include/asm/bitops.h

index efdc92618b38ddfa7da075a53fb3ba93e9c71dae..dc2cf9c6d9e65cc0a3592ce8275dcb114b6d6401 100644 (file)
@@ -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);