Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6-microblaze.git] / include / linux / bitops.h
index 38c2fb7..6a2a19f 100644 (file)
@@ -76,6 +76,15 @@ static __inline__ int generic_fls(int x)
  */
 #include <asm/bitops.h>
 
+
+static inline int generic_fls64(__u64 x)
+{
+       __u32 h = x >> 32;
+       if (h)
+               return fls(x) + 32;
+       return fls(x);
+}
+
 static __inline__ int get_bitmask_order(unsigned int count)
 {
        int order;