From 2654dbe9baf5d854f84996f5428dd96691cdd533 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Sun, 26 Mar 2006 01:39:10 -0800 Subject: [PATCH] --- yaml --- r: 24162 b: refs/heads/master c: 2dfc383ad587bbead84739a9ff9273df3eda983d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-generic/bitops/fls64.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 trunk/include/asm-generic/bitops/fls64.h diff --git a/[refs] b/[refs] index 8d07dfc59e64..83a55b8b64ae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 136abb32d6b4acf196425fb3968ebb368d84280e +refs/heads/master: 2dfc383ad587bbead84739a9ff9273df3eda983d diff --git a/trunk/include/asm-generic/bitops/fls64.h b/trunk/include/asm-generic/bitops/fls64.h new file mode 100644 index 000000000000..716c51e0dd4c --- /dev/null +++ b/trunk/include/asm-generic/bitops/fls64.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ +#define _ASM_GENERIC_BITOPS_FLS64_H_ + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(h) + 32; + return fls(x); +} + +#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */