diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-03 15:03:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-03 15:03:02 +0200 |
commit | a8cac817764a494705aebd99fd51bdf6cdc28ec9 (patch) | |
tree | 202847337f42b188755a53a7b57b502a7cdc0ad3 /include/asm-mips/bitops.h | |
parent | b4b3bd96f26586e53ab5482f1869221dd1b5ac36 (diff) | |
parent | 543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff) | |
download | kernel-crypto-a8cac817764a494705aebd99fd51bdf6cdc28ec9.tar.gz kernel-crypto-a8cac817764a494705aebd99fd51bdf6cdc28ec9.tar.xz kernel-crypto-a8cac817764a494705aebd99fd51bdf6cdc28ec9.zip |
Merge commit 'v2.6.26-rc8' into x86/mce
Diffstat (limited to 'include/asm-mips/bitops.h')
-rw-r--r-- | include/asm-mips/bitops.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index c2bd126c3b4..642724734eb 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -558,11 +558,13 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * __clear_bit(nr, addr); } +#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) + /* * Return the bit position (0..63) of the most significant 1 bit in a word * Returns -1 if no 1 bit exists */ -static inline int __ilog2(unsigned long x) +static inline unsigned long __fls(unsigned long x) { int lz; @@ -591,13 +593,6 @@ static inline int __ilog2(unsigned long x) return 63 - lz; } -static inline unsigned long __fls(unsigned long x) -{ - return __ilog2(x); -} - -#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) - /* * __ffs - find first bit in word. * @word: The word to search @@ -607,7 +602,7 @@ static inline unsigned long __fls(unsigned long x) */ static inline unsigned long __ffs(unsigned long word) { - return __ilog2(word & -word); + return __fls(word & -word); } /* @@ -654,6 +649,7 @@ static inline int ffs(int word) #else #include <asm-generic/bitops/__ffs.h> +#include <asm-generic/bitops/__fls.h> #include <asm-generic/bitops/ffs.h> #include <asm-generic/bitops/fls.h> #include <asm-generic/bitops/fls64.h> |